DEENESPTFRRUARHIKOZHNL

class ara::core::MemoryResource

[SWS_CORE_06500] Upstream: RS_AP_00130

class MemoryResource {...};

Implementation of std::pmr::memory_resource type from [mem.res.class]

Header-Datei#include "ara/core/memory_resource.h"
Forwarding-Header#include "ara/core/core_fwd.h"
Scopenamespace ara::core

User GuideAI-GENERATED

Serves as a base interface for exception-free memory allocation and deallocation.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: efd95fd8a941 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Serves as a base interface for exception-free memory allocation and deallocation.

The class provides an abstract base interface for polymorphic memory resources modeled after the C++ standard interface. Via the Non-Virtual Interface pattern, it delegates allocation and deallocation requests to derived resource classes [SWS_CORE_06503]. In contrast to the C++ standard, all interface functions are declared exception-safe, which is why memory errors are not signaled via an exception, but by returning a null pointer [SWS_CORE_06566]. Furthermore, allocation and deallocation operations are by default not designed to be thread-safe.

Context

The class ara::core::MemoryResource provides an abstract base interface for memory management in the AUTOSAR Adaptive Platform (module core), modeled after the C++ standard type std::pmr::memory_resource. It serves as a common foundation for interchangeable allocation strategies and decouples calling data structures from the concrete mechanisms of memory provisioning. As a key difference from the ISO C++ standard, the AUTOSAR specification completely dispenses with dynamic exceptions and formulates strict noexcept guarantees for all operations [SWS_CORE_06501].

The architecture follows the Non-Virtual Interface pattern (NVI): public, non-virtual member functions define the fixed interface for callers, whereas the actual behavior must be implemented in derived classes via private, pure virtual member functions. Interpretation: Concrete memory resources derive from ara::core::MemoryResource and override the private base interfaces do_allocate [SWS_CORE_06566], do_deallocate [SWS_CORE_06567], and do_is_equal [SWS_CORE_06568] to provide application-specific buffer or pool managements. Question Q-d09d47b0a8f6b822 (open)

Lifecycle

Specializations are instantiated via the parameterless default constructor, which is specified as noexcept=default [SWS_CORE_06501]. A noexcept copy constructor [SWS_CORE_06502] and a noexcept copy assignment operator [SWS_CORE_06507] are likewise available. In addition to the C++ standard, AUTOSAR explicitly defines a move constructor [SWS_CORE_06574] and a move assignment operator [SWS_CORE_06575], both of which are specified as noexcept=default.

The lifecycle of polymorphic instances is secured by a virtual destructor declared as exception-safe [SWS_CORE_06506]. Regarding concurrency, it should be noted that both the destructor and the allocation and deallocation functions allocate [SWS_CORE_06503] and deallocate [SWS_CORE_06504] are specified as not thread-safe. Interpretation: Higher-level synchronization mechanisms or specialized subclasses are likely responsible for thread-safe allocations and deallocations, since the base methods are specified as not thread-safe. Question Q-adac4b6cf6e0db7c (open) Equality comparison via is_equal, on the other hand, is explicitly designed to be thread-safe [SWS_CORE_06505].

Usage Path

The primary workflow in memory management consists of requesting, optionally checking identity, and subsequently releasing memory blocks via the public NVI interface:

  • Memory allocation: The caller invokes allocate, specifying the byte size and optional alignment [SWS_CORE_06503]. The method delegates internally to the private pure virtual function do_allocate of the concrete class [SWS_CORE_06566].
  • Equality comparison: To determine whether two memory resources are equivalent to each other and memory from one can be deallocated by the other, the user invokes is_equal [SWS_CORE_06505], which delegates to do_is_equal [SWS_CORE_06568].
  • Memory deallocation: After usage is complete, the block is returned via deallocate, specifying the pointer, byte size, and alignment [SWS_CORE_06504], which triggers internal forwarding to do_deallocate [SWS_CORE_06567].
NVI call delegation for memory allocation and deallocationCallerMemoryResourceKonkreteResourceUse Case: Speicherallokationallocate(bytes, alignment)do_allocate(bytes, alignment)altAllokation erfolgreichSpeicherzeigerSpeicherzeiger pAllokation fehlgeschlagennullptrnullptrUse Case: Speicherfreigabedeallocate(p, bytes, alignment)do_deallocate(p, bytes, alignment)ReturnReturn

Sequence diagram: Call delegation via the NVI pattern during allocation and deallocation. Sources: [SWS_CORE_06503], [SWS_CORE_06504], [SWS_CORE_06566], [SWS_CORE_06567]

Error Scenarios

A central characteristic of the class is the complete elimination of exceptions. While the ISO C++ standard specifies an exception of type std::bad_alloc in case of exhaustion, AUTOSAR intentionally deviates from this: If an allocation fails in allocate or do_allocate, the function mandatorily returns nullptr [SWS_CORE_06503], [SWS_CORE_06566]. The attribute [[nodiscard]] on allocate obligates the caller to always receive the return value and check it for validity prior to access.

For the deallocation operations deallocate and do_deallocate, any errors during the return of memory are silently ignored [SWS_CORE_06504], [SWS_CORE_06567]. Neither exceptions are thrown nor error codes returned, which facilitates compliance with hard real-time and safety requirements in the Adaptive Platform context.

This text was curated by an AI and is based exclusively on the specifications of the AUTOSAR Adaptive Platform R25-11.

Member map

Constructors and destructor

2

Operators

1

Class diagram

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

G nara__core__MemoryResource130 MemoryResource + MemoryResource() + operator=() + ~MemoryResource() + allocate() + deallocate() + is_() + do_() nara__core__MonotonicBufferResource118 MonotonicBufferResource nara__core__MonotonicBufferResource118->nara__core__MemoryResource130 nara__core__SynchronizedPoolResource481 SynchronizedPoolResource nara__core__SynchronizedPoolResource481->nara__core__MemoryResource130 nara__core__UnsynchronizedPoolResource176 UnsynchronizedPoolResource nara__core__UnsynchronizedPoolResource176->nara__core__MemoryResource130

Detail view

Select an entry in the outline.

Constructors and destructor

MemoryResource function 3

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

Overloads MemoryResource 3
MemoryResource () noexcept=default; SWS_CORE_06501
MemoryResource (const MemoryResource &other) noexcept=default; SWS_CORE_06502
MemoryResource (MemoryResource &&other) noexcept=default; SWS_CORE_06574

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

virtual ~MemoryResource () noexcept;

Methods

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

[[nodiscard]] void * allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) noexcept;
deallocate function

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

void deallocate (void *p, std::size_t bytes, std::size_t alignment=max_align) noexcept;
do_ function 3

in [15] 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

Overloads do_ 3
virtual void * do_allocate (std::size_t bytes, std::size_t alignment) noexcept=0; SWS_CORE_06566
virtual void do_deallocate (void *p, std::size_t bytes, std::size_t alignment) noexcept=0; SWS_CORE_06567
virtual bool do_is_equal (const MemoryResource &other) const noexcept=0; SWS_CORE_06568
is_ function

≙ [mem.res]

bool is_equal (const MemoryResource &other) const noexcept;

Operators

operator= function 2

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

Overloads = 2
MemoryResource & operator= (const MemoryResource &other) noexcept=default; SWS_CORE_06507
MemoryResource & operator= (MemoryResource &&other) noexcept=default; SWS_CORE_06575

Method documentation

function MemoryResource [SWS_CORE_06501]

MemoryResource () noexcept=default;

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06501
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06501@rel:R25-11#9befd404
Content hash
9befd404
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06501
Status: valid/unmigrated Version: rel:R25-11#b9f1b788 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_06501@rel:R25-11#b9f1b788
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#9befd4042026-09-30
  • R23-11rel:R23-11#f033a21e2026-10-14
  • R24-11rel:R24-11#fd91462c2026-10-14
  • R25-11rel:R25-11#b9f1b7882026-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 MemoryResource [SWS_CORE_06502] Upstream: RS_AP_00130

MemoryResource (const MemoryResource &other) noexcept=default;

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06502
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06502@rel:R25-11#54ec446b
Content hash
54ec446b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06502
Status: valid/unmigrated Version: rel:R25-11#c99831b9 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_06502@rel:R25-11#c99831b9
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#54ec446b2026-09-30
  • R23-11rel:R23-11#0d9d49792026-10-14
  • R24-11rel:R24-11#95d8ae9e2026-10-14
  • R25-11rel:R25-11#c99831b92026-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 MemoryResource [SWS_CORE_06574] Upstream: RS_AP_00145

MemoryResource (MemoryResource &&other) noexcept=default;

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

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

Parameter (in)

ParameterBeschreibung
otherother MemoryResource to move from

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

Record
AUTOSAR/AP/record/SWS_CORE_06574
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06574@rel:R25-11#265cf3bf
Content hash
265cf3bf
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06574
Status: valid/unmigrated Version: rel:R25-11#95490182 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_06574@rel:R25-11#95490182
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#265cf3bf2026-09-30
  • R24-11rel:R24-11#ab47979b2026-10-14
  • R25-11rel:R25-11#954901822026-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 allocate [SWS_CORE_06503]

[[nodiscard]] void * allocate (std::size_t bytes, std::size_t alignment=alignof(std::max_align_t)) noexcept;

As per corresponding usage in [mem.res] 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: 6735dc6d085f Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The member function allocate of class ara::core::MemoryResource serves for allocating linear memory with a specified byte size and alignment [SWS_CORE_06503]. It is modeled on the C++ standard interface [mem.res], but deviates significantly in exception handling [SWS_CORE_06503].

Usage and Parameters

The call is synchronous via parameters bytes (number of bytes to request) and the optional alignment, which is set to alignof(std::max_align_t) by default [SWS_CORE_06503]. The return value is marked with attribute [[nodiscard]], which is why the returned pointer of type void* must be evaluated by the caller [SWS_CORE_06503].

Error Handling and Exception Safety

In contrast to standard behavior, the function does not throw an exception of type std::bad_alloc in case of error, but is declared as noexcept and considered exception-safe (exception safe) [SWS_CORE_06503]:

  • Success: Returns a valid pointer to the allocated memory area according to [mem.res] [SWS_CORE_06503].
  • Failure: If memory allocation fails, the function returns nullptr instead [SWS_CORE_06503]. The caller must therefore always explicitly check the result for a null pointer.

Concurrency and Interaction

The function is specified as not thread-safe (not thread-safe) [SWS_CORE_06503]. Parallel calls on the same instance of MemoryResource consequently require external synchronization by the caller. This fault-tolerant, exception-free pattern is found consistently in other memory components of AUTOSAR Adaptive: Thus, ara::core::PolymorphicAllocator::allocate uses the same approach without exceptions [SWS_CORE_06547], and the special instance NullMemoryResource also signals memory exhaustion by returning nullptr [SWS_CORE_06563].

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

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

Rückgabewert

TypBeschreibung
void *• If successful: As per corresponding usage in [mem.res] • 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_06503
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06503@rel:R25-11#1fa3c319
Content hash
1fa3c319
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06503
Status: valid/unmigrated Version: rel:R25-11#8ff560e7 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_06503@rel:R25-11#8ff560e7
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1fa3c3192026-09-30
  • R23-11rel:R23-11#a898640f2026-10-14
  • R24-11rel:R24-11#f8eb1c392026-10-14
  • R25-11rel:R25-11#8ff560e72026-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 deallocate [SWS_CORE_06504]

void deallocate (void *p, std::size_t bytes, std::size_t alignment=max_align) noexcept;

As per corresponding usage in [mem.res] 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: 65d739156bbe Provenance
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Function deallocate of class ara::core::MemoryResource serves for deallocating memory areas according to [SWS_CORE_06504]. The usage generally follows the standard behavior from [mem.res], but exhibits specific deviations. The call takes place synchronously via signature void deallocate(void *p, std::size_t bytes, std::size_t alignment=max_align) noexcept, passing the pointer p to the block to be freed, the size bytes, as well as optionally the alignment [SWS_CORE_06504].

Regarding error behavior, the function is specified as noexcept and exception-safe (exception safe) [SWS_CORE_06504]. If deallocation fails, errors will be silently ignored (errors will be silently ignored) [SWS_CORE_06504]. No exceptions are thrown and no error messages are issued via DET or DEM.

With respect to concurrency, the function is explicitly classified as not thread-safe (not thread-safe) [SWS_CORE_06504]. Concurrent accesses to the same resource instance must therefore be synchronized externally by the caller.

In interaction with the allocator concept, this function corresponds to the typed interface deallocate of class ara::core::PolymorphicAllocator from [SWS_CORE_06548], which exhibits similar deviations regarding noexcept and silent error handling.

This usage note was created automatically by an AI curation assistant and is based exclusively on the specification data of AUTOSAR R25-11.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MemoryResource
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_06504
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06504@rel:R25-11#9fe074b5
Content hash
9fe074b5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06504
Status: valid/unmigrated Version: rel:R25-11#6dfbadd7 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_06504@rel:R25-11#6dfbadd7
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#9fe074b52026-09-30
  • R23-11rel:R23-11#99cc78692026-10-14
  • R24-11rel:R24-11#8ebb7f8c2026-10-14
  • R25-11rel:R25-11#6dfbadd72026-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_ [SWS_CORE_06566]

virtual void * do_allocate (std::size_t bytes, std::size_t alignment) noexcept=0;

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

Literaturverzeichnis SWS Core: [15] ISO/IEC 14882:2020, Programming languages – C++ – www.iso.org

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

The pure virtual method do_allocate of class ara::core::MemoryResource serves for the allocation of memory blocks with a specified byte size and alignment [SWS_CORE_06566]. As parameters, it takes the number of bytes (bytes) as well as the required alignment (alignment). Upon successful allocation, it synchronously returns a pointer of type void * to the reserved memory area [SWS_CORE_06566].

With regard to error handling, the function purposefully deviates from the regular C++ standard: It is declared as noexcept and does not throw a std::bad_alloc exception on failure, but returns nullptr instead [SWS_CORE_06566]. Callers must therefore always check the allocation result for a null pointer.

Regarding concurrency, the method is specified as not thread-safe [SWS_CORE_06566]. Concurrent calls on the same instance require external synchronization unless the derived implementation provides its own protection. Due to the private visibility, invocation by users is likely to occur typically indirectly via the overarching interface of the base class. Question Q-5cbdabf121ed4550 (open)

In the interplay of memory management, the method forms the direct counterpart to do_deallocate, which is responsible for freeing the allocated memory and silently ignores errors [SWS_CORE_06567]. The comparison function do_is_equal furthermore checks whether two resource instances are compatible with each other regarding allocation and deallocation [SWS_CORE_06568].

This usage note was generated automatically based on the specification.

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

Rückgabewert

TypBeschreibung
void *• If successful: As per corresponding usage in [mem.res] • 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_06566
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06566@rel:R25-11#b88f7855
Content hash
b88f7855
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06566
Status: valid/unmigrated Version: rel:R25-11#f000b35f 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_06566@rel:R25-11#f000b35f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#b88f78552026-09-30
  • R24-11rel:R24-11#1a8107de2026-10-14
  • R25-11rel:R25-11#f000b35f2026-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_ [SWS_CORE_06567]

virtual void do_deallocate (void *p, std::size_t bytes, std::size_t alignment) noexcept=0;

As per corresponding usage in [mem.res] 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: fca1a9bccecb Provenance Open questions (1)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

The pure virtual member function do_deallocate of class ara::core::MemoryResource (declared in ara/core/memory_resource.h) serves according to [SWS_CORE_06567] for deallocating previously reserved memory. It accepts the pointer p to the memory area as well as its size bytes and required alignment alignment. The semantics basically correspond to the C++ standard [mem.res], but exhibit two significant adaptive-specific deviations [SWS_CORE_06567].

First, the function is declared as noexcept and guarantees exception safety (exception safe) [SWS_CORE_06567]. Second, any errors during deallocation are silently ignored, so that failed operations must neither throw error messages nor interrupt the program flow [SWS_CORE_06567].

Regarding concurrency, do_deallocate is specified as not thread-safe and has private visibility [SWS_CORE_06567]. As an implementation detail of a polymorphic memory resource, it is likely to be executed synchronously via the overarching public invocation interface. Question Q-3f97e122ee7fb281 (open) Competing deallocations on the same resource must be synchronized independently by derived classes if necessary.

In module core, the function forms the counterpart to allocation do_allocate [SWS_CORE_06566], which returns nullptr instead of an exception in the event of an error. Comparison with other resources is performed via the method do_is_equal [SWS_CORE_06568], which, in contrast to deallocation, is explicitly defined as thread-safe.

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06567
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06567@rel:R25-11#7bf9805c
Content hash
7bf9805c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06567
Status: valid/unmigrated Version: rel:R25-11#d951e36f 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_06567@rel:R25-11#d951e36f
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#7bf9805c2026-09-30
  • R24-11rel:R24-11#3e71af902026-10-14
  • R25-11rel:R25-11#d951e36f2026-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_ [SWS_CORE_06568]

virtual bool do_is_equal (const MemoryResource &other) const noexcept=0;

As per corresponding usage in [mem.res]

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

The pure virtual member function do_is_equal is declared in header #include "ara/core/memory_resource.h" in the namespace of ara::core::MemoryResource ([SWS_CORE_06568]). According to the C++ specification [mem.res], it serves for the synchronous equality comparison of the current memory resource with a passed reference const MemoryResource &other ([SWS_CORE_06568]). Since the method is defined with private visibility (private), its invocation is likely to be handled polymorphically as an implementation detail via the public interface of class ara::core::MemoryResource ([SWS_CORE_06568]). Question Q-cbe02f652b43d6ec (open)

Regarding execution and fault tolerance, do_is_equal is declared as exception safe as well as noexcept ([SWS_CORE_06568]). Accordingly, it must not throw exceptions under any circumstances and signals the result directly via the boolean return value ([SWS_CORE_06568]). In addition, the method is specified as thread-safe, so that derived implementations must guarantee thread safety even during concurrent comparisons ([SWS_CORE_06568]).

In interaction with the other virtual methods of memory management, do_is_equal completes the trio of customization points of derived resource classes ([SWS_CORE_06568]). While memory allocation do_allocate returns nullptr in case of error ([SWS_CORE_06566]) and do_deallocate silently ignores errors ([SWS_CORE_06567]), both functions, in contrast to do_is_equal, are designated as not thread-safe (not thread-safe) ([SWS_CORE_06566], [SWS_CORE_06567]). This emphasizes the special requirement on do_is_equal to safeguard concurrent resource comparisons ([SWS_CORE_06568]).

This text was generated by an AI and serves as a usage note based on the AUTOSAR specification.

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06568
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06568@rel:R25-11#6efe7dbb
Content hash
6efe7dbb
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06568
Status: valid/unmigrated Version: rel:R25-11#2eae7169 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_06568@rel:R25-11#2eae7169
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#6efe7dbb2026-09-30
  • R24-11rel:R24-11#111ffd482026-10-14
  • R25-11rel:R25-11#2eae71692026-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 is_ [SWS_CORE_06505]

bool is_equal (const MemoryResource &other) const noexcept;

As per corresponding usage in [mem.res]

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MemoryResource
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_06505
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06505@rel:R25-11#1cb79817
Content hash
1cb79817
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06505
Status: valid/unmigrated Version: rel:R25-11#fe89774e 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_06505@rel:R25-11#fe89774e
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1cb798172026-09-30
  • R23-11rel:R23-11#f33063dc2026-10-14
  • R24-11rel:R24-11#657307fe2026-10-14
  • R25-11rel:R25-11#fe89774e2026-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_06507] Upstream: RS_AP_00130

MemoryResource & operator= (const MemoryResource &other) noexcept=default;

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06507
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06507@rel:R25-11#653993ea
Content hash
653993ea
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06507
Status: valid/unmigrated Version: rel:R25-11#63abe892 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_06507@rel:R25-11#63abe892
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#653993ea2026-09-30
  • R23-11rel:R23-11#af6672232026-10-14
  • R24-11rel:R24-11#85add1f52026-10-14
  • R25-11rel:R25-11#63abe8922026-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_06575] Upstream: RS_AP_00145

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

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

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

Parameter (in)

ParameterBeschreibung
otherother MemoryResource to move from

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

Record
AUTOSAR/AP/record/SWS_CORE_06575
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06575@rel:R25-11#948a97b3
Content hash
948a97b3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06575
Status: valid/unmigrated Version: rel:R25-11#8fb64462 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_06575@rel:R25-11#8fb64462
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#948a97b32026-09-30
  • R24-11rel:R24-11#617a865d2026-10-14
  • R25-11rel:R25-11#8fb644622026-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 ~MemoryResource [SWS_CORE_06506]

virtual ~MemoryResource () noexcept;

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::MemoryResource
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_06506
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06506@rel:R25-11#1cb78828
Content hash
1cb78828
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06506
Status: valid/unmigrated Version: rel:R25-11#2e224948 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_06506@rel:R25-11#2e224948
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1cb788282026-09-30
  • R23-11rel:R23-11#2af784a02026-10-14
  • R24-11rel:R24-11#5a037c852026-10-14
  • R25-11rel:R25-11#2e2249482026-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