DEENESPTFRRUARHIKOZHNL

class ara::core::MonotonicBufferResource

[SWS_CORE_06520] Upstream: RS_AP_00130

class MonotonicBufferResource :            public MemoryResource {...};

Implementation of std::pmr::monotonic_buffer_resource type from [mem.res.monotonic.buffer]

Header-Datei#include "ara/core/memory_resource.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core
Basisklasse(n)MemoryResource

User GuideAI-GENERATED

Manages memory blocks in a monotonically growing buffer with exception-free allocation and bundled deallocation.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 993d3b66f0fc Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Manages memory blocks in a monotonically growing buffer with exception-free allocation and bundled deallocation.

The class ara::core::MonotonicBufferResource provides a specialized memory resource for fast, monotonic allocations from a fixed memory buffer or via an upstream resource. Requested memory is allocated incrementally and is not freed immediately upon individual deallocations, but is instead reset collectively via release() ([SWS_CORE_06530]). All operations are declared completely exception-free, with an out-of-memory condition signaled by returning nullptr instead of an exception ([SWS_CORE_06569]). The instances are not copyable and require external synchronization for concurrent access from multiple threads.

Context

The class ara::core::MonotonicBufferResource is a concrete memory resource within the module core of the AUTOSAR Adaptive Platform and inherits from the base class ara::core::MemoryResource. It adapts the concept of std::pmr::monotonic_buffer_resource from [mem.res.monotonic.buffer], known from the C++ standard, for safety-relevant and deterministic automotive applications. The primary role of the class is to serve allocation requests with minimal management overhead from a contiguous memory area by allocating memory monotonically.

Calling components, polymorphic allocators, and containers that request memory blocks at runtime act as interaction partners on the one hand. On the other hand, the class interacts with an optional upstream memory resource (MemoryResource). This upstream resource can be passed via constructors such as [SWS_CORE_06521] and queried via the accessor method upstream_resource() ([SWS_CORE_06531]).

Lifecycle

The initialization of ara::core::MonotonicBufferResource can be controlled via multiple constructors. In addition to a parameterless default constructor ([SWS_CORE_06524]), overloads are available that accept an explicit upstream resource ([SWS_CORE_06521]), define an initial buffer size ([SWS_CORE_06525], [SWS_CORE_06522]), or utilize an externally provided raw memory area (void* buffer, std::size_t buffer_size) as the initial buffer ([SWS_CORE_06526], [SWS_CORE_06523]).

Regarding ownership semantics, the class is defined as strictly non-copyable: the copy constructor ([SWS_CORE_06527]) and the copy assignment operator ([SWS_CORE_06529]) are deleted (=delete). In contrast to the ISO 14882 standard, however, the AUTOSAR class implements explicit move semantics via the move constructor ([SWS_CORE_06576]) and the move assignment operator ([SWS_CORE_06577]), each defined as noexcept=default.

Destruction takes place via the destructor ~MonotonicBufferResource() ([SWS_CORE_06528]). A significant AUTOSAR deviation from the standard is that the destructor is not declared virtual. Via the method release() ([SWS_CORE_06530]), all allocated memory can be reset before the end of the object lifetime.

For concurrency, a strict distinction must be observed: the parameterless constructor ([SWS_CORE_06524]), the equality check do_is_equal() ([SWS_CORE_06571]), and the query upstream_resource() ([SWS_CORE_06531]) are declared thread-safe. All parameterized constructors ([SWS_CORE_06521], [SWS_CORE_06522], [SWS_CORE_06523], [SWS_CORE_06525], [SWS_CORE_06526]), allocation operations ([SWS_CORE_06569], [SWS_CORE_06570]), release() ([SWS_CORE_06530]), as well as the destructor ([SWS_CORE_06528]) are not thread-safe and require external synchronization during concurrent access.

Usage Path

A typical application flow comprises provisioning, continuous allocation, and bundled deallocation:

  1. Instantiation: The application creates an instance, for example by specifying a buffer size and an upstream resource ([SWS_CORE_06522]) or a fixed buffer ([SWS_CORE_06526]).
  2. Allocation: Memory requests are served via the protected method do_allocate(bytes, alignment) ([SWS_CORE_06569]). If the available buffer is insufficient, the instance obtains a new buffer from the upstream resource.
  3. Deallocation: Calls to do_deallocate(p, bytes, alignment) ([SWS_CORE_06570]) do not shrink the buffer individually; the internal allocation pointer advances monotonically.
  4. Buffer reset: With release() ([SWS_CORE_06530]), all memory blocks obtained via upstream are released at once, and the buffer is ready for new cycles.
  5. Resource comparison: Via do_is_equal() ([SWS_CORE_06571]), it can be checked whether two memory resources are identical.
Monotonic allocation and deallocation cycleApplicationMonotonicBufferResourceUpstream-MemoryResourceErzeugungMonotonicBufferResource(initial_size, upstream)Speicher anforderndo_allocate(bytes, alignment)optInitialer Puffer unzureichendSpeicherblock anfordernallocate(bytes, alignment)Pufferspeicher bereitstellenPointer to memory area (or nullptr)Speicher freigebendo_deallocate(p, bytes, alignment)Freigabe stillschweigend ignorierenReset bufferrelease()Allokierten Speicher freigeben

Sequence diagram: Typical memory cycle from allocation through ignored deallocation to collective reset via release(). Sources: [SWS_CORE_06522], [SWS_CORE_06569], [SWS_CORE_06570], [SWS_CORE_06530]

Error Scenarios

The class follows strict requirements for exception-free embedded systems: all member functions, constructors, and operators are declared as noexcept and provide complete exception safety.

In the event of an error, the behavior deliberately deviates from the standard library:

  • Failed allocation: If a request in do_allocate() ([SWS_CORE_06569]) cannot be served, no exception std::bad_alloc is thrown; instead, nullptr is returned. Callers must check the return value for nullptr.
  • Error during deallocation: If an error occurs during deallocation in do_deallocate() ([SWS_CORE_06570]), it is silently ignored according to the specification.
  • Destruction via base pointer: Since the destructor ([SWS_CORE_06528]) is not virtual, destruction via a pointer to the base class MemoryResource is likely to lead to undefined behavior (Interpretation: destruction must occur via the concrete type). Question Q-add18020b48f3131 (open)

This guide was generated by an AI system based on the AUTOSAR Adaptive R25-11 specification.

Member map

Class diagram

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__core__MonotonicBufferResource118 MonotonicBufferResource + MonotonicBufferResource() + operator=() + ~MonotonicBufferResource() + release() + upstream_resource() + do_allocate() + do_deallocate() + do_is_equal() nara__core__MemoryResource130 MemoryResource nara__core__MonotonicBufferResource118->nara__core__MemoryResource130

Detail view

Select an entry in the outline.

Constructors and destructor

except for the following deviations: 1. The function is noexcept ≙ [mem.res.monotonic.buffer]

Overloads MonotonicBufferResource 8
explicit MonotonicBufferResource (MemoryResource *upstream) noexcept; SWS_CORE_06521
MonotonicBufferResource (std::size_t initial_size, MemoryResource *upstream) noexcept; SWS_CORE_06522
MonotonicBufferResource (void *buffer, std::size_t buffer_size, Memory Resource *upstream) noexcept; SWS_CORE_06523
MonotonicBufferResource () noexcept; SWS_CORE_06524
explicit MonotonicBufferResource (std::size_t initial_size) noexcept; SWS_CORE_06525
MonotonicBufferResource (void *buffer, std::size_t buffer_size) noexcept; SWS_CORE_06526
MonotonicBufferResource (const MonotonicBufferResource &)=delete; SWS_CORE_06527
MonotonicBufferResource (MonotonicBufferResource &&other) noexcept=default; SWS_CORE_06576

except for the following deviations: 1. The function is noexcept 2. The function is not virtual ≙ [mem.res.monotonic.buffer]

~MonotonicBufferResource () noexcept override;

Methods

do_allocate function

except for the following deviations: 1. The function is noexcept 2. The function returns nullptr instead of (potentially) throwing a std::bad_alloc exception ≙ std::bad_alloc

void * do_allocate (std::size_t bytes, std::size_t alignment) noexcept override;
do_deallocate function

except for the following deviations: 1. The function is noexcept 2. If unsuccessful: errors will be silently ignored ≙ [mem.res.monotonic.buffer]

void do_deallocate (void *p, std::size_t bytes, std::size_t alignment) noexcept override;
do_is_equal function

except for the following deviations: 1. The function is noexcept ≙ [mem.res.monotonic.buffer]

bool do_is_equal (const MemoryResource &other) const noexcept override;
release function

except for the following deviations: 1. The function is noexcept ≙ [mem.res.monotonic.buffer]

void release () noexcept;

except for the following deviations: 1. The function is noexcept ≙ [mem.res.monotonic.buffer]

MemoryResource * upstream_resource () const noexcept;

Operators

operator= function 2

≙ [mem.res.monotonic.buffer]

Overloads = 2

Method documentation

function MonotonicBufferResource [SWS_CORE_06521]

explicit MonotonicBufferResource (MemoryResource *upstream) noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06521
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06521@rel:R25-11#b68d044b
Content hash
b68d044b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06521
Status: valid/unmigrated Version: rel:R25-11#cf52252c Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06521@rel:R25-11#cf52252c
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b68d044b2026-09-30
  • R23-11rel:R23-11#76605f842026-10-14
  • R24-11rel:R24-11#5675ddf82026-10-14
  • R25-11rel:R25-11#cf52252c2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06522]

MonotonicBufferResource (std::size_t initial_size, MemoryResource *upstream) noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06522
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06522@rel:R25-11#c83baca3
Content hash
c83baca3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06522
Status: valid/unmigrated Version: rel:R25-11#954d5cab Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06522@rel:R25-11#954d5cab
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#c83baca32026-09-30
  • R23-11rel:R23-11#759123a42026-10-14
  • R24-11rel:R24-11#4300fbe72026-10-14
  • R25-11rel:R25-11#954d5cab2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06523]

MonotonicBufferResource (void *buffer, std::size_t buffer_size, Memory Resource *upstream) noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06523
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06523@rel:R25-11#acb6a946
Content hash
acb6a946
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06523
Status: valid/unmigrated Version: rel:R25-11#18805d3b Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06523@rel:R25-11#18805d3b
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#acb6a9462026-09-30
  • R23-11rel:R23-11#f41e1e9f2026-10-14
  • R24-11rel:R24-11#ed78a94e2026-10-14
  • R25-11rel:R25-11#18805d3b2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06524]

MonotonicBufferResource () noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06524
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06524@rel:R25-11#cdaba7a1
Content hash
cdaba7a1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06524
Status: valid/unmigrated Version: rel:R25-11#d691adfe Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06524@rel:R25-11#d691adfe
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#cdaba7a12026-09-30
  • R23-11rel:R23-11#c4b16a1a2026-10-14
  • R24-11rel:R24-11#7548fbae2026-10-14
  • R25-11rel:R25-11#d691adfe2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06525]

explicit MonotonicBufferResource (std::size_t initial_size) noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06525
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06525@rel:R25-11#5049fb97
Content hash
5049fb97
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06525
Status: valid/unmigrated Version: rel:R25-11#0e59defc Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06525@rel:R25-11#0e59defc
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#5049fb972026-09-30
  • R23-11rel:R23-11#c421df4a2026-10-14
  • R24-11rel:R24-11#d5aca05b2026-10-14
  • R25-11rel:R25-11#0e59defc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06526]

MonotonicBufferResource (void *buffer, std::size_t buffer_size) noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06526
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06526@rel:R25-11#2cca31c0
Content hash
2cca31c0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06526
Status: valid/unmigrated Version: rel:R25-11#f89b06c1 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06526@rel:R25-11#f89b06c1
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#2cca31c02026-09-30
  • R23-11rel:R23-11#d5cf48d92026-10-14
  • R24-11rel:R24-11#6c43aeda2026-10-14
  • R25-11rel:R25-11#f89b06c12026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06527]

MonotonicBufferResource (const MonotonicBufferResource &)=delete;

As per corresponding usage in [mem.res.monotonic.buffer]

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06527
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06527@rel:R25-11#a2a4321d
Content hash
a2a4321d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06527
Status: valid/unmigrated Version: rel:R25-11#16e6cac0 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06527@rel:R25-11#16e6cac0
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#a2a4321d2026-09-30
  • R23-11rel:R23-11#6632fcf42026-10-14
  • R24-11rel:R24-11#de03506d2026-10-14
  • R25-11rel:R25-11#16e6cac02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function MonotonicBufferResource [SWS_CORE_06576] Upstream: RS_AP_00145

MonotonicBufferResource (MonotonicBufferResource &&other) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Move constructor

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherother MonotonicBufferResource to move from

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06576
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06576@rel:R25-11#f2440230
Content hash
f2440230
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06576
Status: valid/unmigrated Version: rel:R25-11#4c2df3e5 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06576@rel:R25-11#4c2df3e5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f24402302026-09-30
  • R24-11rel:R24-11#4990130a2026-10-14
  • R25-11rel:R25-11#4c2df3e52026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function do_allocate [SWS_CORE_06569]

void * do_allocate (std::size_t bytes, std::size_t alignment) noexcept override;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept 2. The function returns nullptr instead of (potentially) throwing a std::bad_alloc exception

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 601be17f5d68 Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The protected member function do_allocate of class ara::core::MonotonicBufferResource serves for allocating memory areas according to [mem.res.monotonic.buffer] [SWS_CORE_06569]. It implements the pure virtual interface do_allocate of base class ara::core::MemoryResource [SWS_CORE_06566]. As an interpretation, the synchronous call should primarily occur indirectly via the public allocation methods of the base class due to the protected visibility. Question Q-21b2da19c0fd7f8f (open) The function accepts the requested size in bytes as well as the desired alignment (alignment).

Error Handling and Exception Safety

In contrast to the C++ standard behavior, the function does not throw an std::bad_alloc exception on allocation errors, but returns a nullptr instead [SWS_CORE_06569]. Due to the declaration with noexcept, the method is specified as exception-safe [SWS_CORE_06569]. Callers must therefore always check the result for nullptr to detect insufficient memory.

Concurrency and Interaction

The method is specified as not thread-safe [SWS_CORE_06569]. If allocations are triggered concurrently from multiple threads, synchronization must occur externally via the calling site. This corresponds to the behavior of ara::core::UnsynchronizedPoolResource::do_allocate [SWS_CORE_00058], whereas ara::core::SynchronizedPoolResource::do_allocate is designed to be thread-safe for concurrent calls [SWS_CORE_00061].

This usage note was generated automatically based on specification AUTOSAR R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Sichtbarkeitprotected

Rückgabewert

TypBeschreibung
void *• If successful: As per corresponding usage in [mem.res.monotonic.buffer] • If unsuccessful: the returned pointer shall be nullptr

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06569
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06569@rel:R25-11#abbfa0d6
Content hash
abbfa0d6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06569
Status: valid/unmigrated Version: rel:R25-11#b9ee8ac6 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06569@rel:R25-11#b9ee8ac6
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#abbfa0d62026-09-30
  • R24-11rel:R24-11#59103c462026-10-14
  • R25-11rel:R25-11#b9ee8ac62026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function do_deallocate [SWS_CORE_06570]

void do_deallocate (void *p, std::size_t bytes, std::size_t alignment) noexcept override;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept 2. If unsuccessful: errors will be silently ignored

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: e7d49ed79e7c Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

use

The member function do_deallocate of class ara::core::MonotonicBufferResource serves for deallocating memory areas according to [SWS_CORE_06570]. It is defined via header file #include "ara/core/memory_resource.h" [SWS_CORE_06570]. The function takes a pointer p to the memory area to be deallocated as well as parameters bytes and alignment (each of type std::size_t) and returns no value (void) [SWS_CORE_06570]. The semantics follow the definition in [mem.res.monotonic.buffer] with specific AUTOSAR deviations [SWS_CORE_06570].

Error handling

The function is declared as noexcept and guarantees exception safety (exception safe) [SWS_CORE_06570]. If an error occurs during execution, it is silently ignored (errors will be silently ignored) [SWS_CORE_06570]. Neither return values nor specific error codes for error messages exist.

Concurrency and Limitations

Regarding concurrency, do_deallocate is specified as not thread-safe (not thread-safe) [SWS_CORE_06570]. Concurrent invocation from multiple threads without external synchronization is not permitted. The method has visibility protected and overrides the pure virtual interface of base class ara::core::MemoryResource [SWS_CORE_06567]. Interpretation: Calls should regularly be handled via the public deallocation interface of the base class. Question Q-6916292acaa8993b (open)

Interaction

While base class ara::core::MemoryResource specifies the deallocation method with private visibility [SWS_CORE_06567], MonotonicBufferResource as well as the related classes ara::core::SynchronizedPoolResource [SWS_CORE_00041] and ara::core::UnsynchronizedPoolResource [SWS_CORE_00059] implement it protected (protected) with silent error handling. In contrast to the synchronized pool resource [SWS_CORE_00041], which is thread-safe, MonotonicBufferResource like ara::core::UnsynchronizedPoolResource [SWS_CORE_00059] requires the exclusion of parallel accesses.

This usage note was created by an AI and is based on the definitions of specification AUTOSAR Adaptive R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe
Sichtbarkeitprotected

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06570
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06570@rel:R25-11#46e37842
Content hash
46e37842
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06570
Status: valid/unmigrated Version: rel:R25-11#f3b1bdb5 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06570@rel:R25-11#f3b1bdb5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#46e378422026-09-30
  • R24-11rel:R24-11#19c0e1ee2026-10-14
  • R25-11rel:R25-11#f3b1bdb52026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function do_is_equal [SWS_CORE_06571]

bool do_is_equal (const MemoryResource &other) const noexcept override;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: fc4ade44f9c3 Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The protected method do_is_equal of class ara::core::MonotonicBufferResource overrides the pure virtual interface of base class ara::core::MemoryResource according to [SWS_CORE_06571]. It compares the current instance synchronously with a passed const MemoryResource &other for equality with respect to memory management semantics.

Usage and Semantics

The call typically occurs indirectly via the public interface of MemoryResource. According to [SWS_CORE_06571], the behavior follows the usage in [mem.res.monotonic.buffer], but exhibits the explicit deviation that the function is declared as noexcept. The return value is a bool indicating whether the two resources are interchangeable or identical.

Error Handling and Concurrency

  • Exception safety: The function is specified as exception safe and does not throw any exceptions due to the noexcept signature according to [SWS_CORE_06571]. Specific error codes or DET/DEM messages do not exist.
  • Thread safety: The operation is classified as thread-safe ([SWS_CORE_06571]) and can be executed concurrently.

Interaction

The function implements the virtual contract from ara::core::MemoryResource ([SWS_CORE_06568]). Similar implementations of the equality comparison can also be found in other memory resources such as ara::core::SynchronizedPoolResource ([SWS_CORE_00042]) and ara::core::UnsynchronizedPoolResource ([SWS_CORE_00060]).

This text was generated by an AI based on specification R25-11.

Implementer's Guide to follow (complexity I1)

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe
Sichtbarkeitprotected

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06571
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06571@rel:R25-11#455886dc
Content hash
455886dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06571
Status: valid/unmigrated Version: rel:R25-11#5dc73006 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06571@rel:R25-11#5dc73006
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#455886dc2026-09-30
  • R24-11rel:R24-11#ceb8fc942026-10-14
  • R25-11rel:R25-11#5dc730062026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CORE_06529]

MonotonicBufferResource & operator= (const MonotonicBufferResource &)=delete;

As per corresponding usage in [mem.res.monotonic.buffer]

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06529
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06529@rel:R25-11#c667aa8a
Content hash
c667aa8a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06529
Status: valid/unmigrated Version: rel:R25-11#2502c929 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06529@rel:R25-11#2502c929
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#c667aa8a2026-09-30
  • R23-11rel:R23-11#65eba1772026-10-14
  • R24-11rel:R24-11#e0f799bc2026-10-14
  • R25-11rel:R25-11#2502c9292026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function operator= [SWS_CORE_06577] Upstream: RS_AP_00145

MonotonicBufferResource & operator= (MonotonicBufferResource &&other) noexcept=default;

[AUTOSAR defined] not present in ISO-14882. Move assignment operator

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe

Parameter (in)

ParameterBeschreibung
otherother MonotonicBufferResource to move from

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06577
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06577@rel:R25-11#3aca8c88
Content hash
3aca8c88
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06577
Status: valid/unmigrated Version: rel:R25-11#088d07f5 Versionshistorie & Revisions (1 transition, 3 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06577@rel:R25-11#088d07f5
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3aca8c882026-09-30
  • R24-11rel:R24-11#e89e6dab2026-10-14
  • R25-11rel:R25-11#088d07f52026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function release [SWS_CORE_06530]

void release () noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 082c843665ce Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function release() of class ara::core::MonotonicBufferResource ([SWS_CORE_06530]) serves for deallocating the memory managed by the buffer resource. The call is synchronous, takes no parameters, and returns no value (void).

Regarding error handling, the function is declared as noexcept and specified as exception-safe (exception safe) ([SWS_CORE_06530]). Specific error codes do not exist, and no error messages are dispatched to central diagnostic or reporting entities.

With regard to concurrency, release() is explicitly classified as not thread-safe (not thread-safe) ([SWS_CORE_06530]). Concurrent access to the same instance without external synchronization is not permitted. Interpretation: Due to the modeled semantics from [mem.res.monotonic.buffer], all memory areas previously provided via this resource should become invalid with the call. Question Q-bd46bd9971926d95 (open)

In the interplay of memory resources from #include "ara/core/memory_resource.h", the function differs in concurrency behavior from ara::core::SynchronizedPoolResource::release(), which is thread-safe ([SWS_CORE_00037]), while it behaves analogously to ara::core::UnsynchronizedPoolResource::release(), which is likewise not thread-safe ([SWS_CORE_00065]).

This text was generated by an AI based on the specification requirements of AUTOSAR R25-11.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06530
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06530@rel:R25-11#81967621
Content hash
81967621
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06530
Status: valid/unmigrated Version: rel:R25-11#69f783e0 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06530@rel:R25-11#69f783e0
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#819676212026-09-30
  • R23-11rel:R23-11#691b1b062026-10-14
  • R24-11rel:R24-11#83f3869e2026-10-14
  • R25-11rel:R25-11#69f783e02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function upstream_resource [SWS_CORE_06531]

MemoryResource * upstream_resource () const noexcept;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept

AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 34a11a1fee7a Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function upstream_resource() of class ara::core::MonotonicBufferResource synchronously returns a pointer to the upstream memory resource of type MemoryResource* [SWS_CORE_06531]. The call is made via header #include "ara/core/memory_resource.h" and takes no parameters [SWS_CORE_06531]. Interpretation: The returned memory resource should act as an upstream buffer if the instance's internal buffer is insufficient for allocations. Question Q-e01e234e281bc4c6 (open)

Regarding error handling and exception safety, the method is declared as noexcept and completely exception-safe (exception safe) [SWS_CORE_06531]. Specific error codes, error objects, or diagnostic messages such as DET or DEM are not provided in the specification for this pure getter call [SWS_CORE_06531].

Regarding concurrency, the method is specified as const and thread-safe (thread-safe) [SWS_CORE_06531]. As a result, the pointer to the upstream resource can be queried from multiple threads in parallel without external synchronization.

The functional semantics follow the definition in [mem.res.monotonic.buffer], but exhibit the normative deviation that the function is explicitly defined as noexcept in the AUTOSAR Adaptive standard [SWS_CORE_06531]. An analogous interface pattern for providing the upstream resource is also used by the related classes ara::core::SynchronizedPoolResource [SWS_CORE_00038] and ara::core::UnsynchronizedPoolResource [SWS_CORE_00056].

This text was created by an AI based on the specification data.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06531
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06531@rel:R25-11#6499d8ca
Content hash
6499d8ca
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06531
Status: valid/unmigrated Version: rel:R25-11#c0075ddb Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06531@rel:R25-11#c0075ddb
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#6499d8ca2026-09-30
  • R23-11rel:R23-11#ae18043d2026-10-14
  • R24-11rel:R24-11#888f90212026-10-14
  • R25-11rel:R25-11#c0075ddb2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

function ~MonotonicBufferResource [SWS_CORE_06528]

~MonotonicBufferResource () noexcept override;

As per corresponding usage in [mem.res.monotonic.buffer] except for the following deviations: 1. The function is noexcept 2. The function is not virtual

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MonotonicBufferResource
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_CORE_06528
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06528@rel:R25-11#91d465f2
Content hash
91d465f2
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06528
Status: valid/unmigrated Version: rel:R25-11#cb9c3608 Versionshistorie & Revisions (1 transition, 4 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_CORE_06528@rel:R25-11#cb9c3608
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#91d465f22026-09-30
  • R23-11rel:R23-11#6339e5982026-10-14
  • R24-11rel:R24-11#e078b9482026-10-14
  • R25-11rel:R25-11#cb9c36082026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill