DEENESPTFRRUARHIKOZHNL

class ara::core::PolymorphicAllocator

[SWS_CORE_06540] Upstream: RS_AP_00130

template <class Tp = ara::core::Byte> class PolymorphicAllocator {...};

Implementation of std::pmr::polymorphic_allocator from [mem.poly.allocator.class]

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

User GuideAI-GENERATED

Manages polymorphic memory allocation for objects and containers via replaceable memory resources.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 4f3088ca1f09 Provenance Open questions (2)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Manages polymorphic memory allocation for objects and containers via replaceable memory resources.

The template class encapsulates memory-resource-based dynamic allocation for adaptive applications and containers as a completely exception-free implementation of polymorphic allocators [SWS_CORE_06541]. For flexible control of the object lifecycle, the instance delegates all memory requests to an exchangeable memory resource, where failed allocations deterministically return null pointers instead of C++ exceptions [SWS_CORE_06547]. As an essential functional constraint, regular copy assignment is explicitly prevented, while failed deallocation operations during ongoing operation are always silently ignored.

Context

The template class ara::core::PolymorphicAllocator implements the interface for stateful, polymorphic memory allocation in AUTOSAR Adaptive according to the C++ standard pattern and defines the underlying element type value_type [SWS_CORE_06572]. As an adapter, it mediates between calling components—such as containers or application structures—and a concrete memory resource. Via the method resource(), the pointer to the utilized MemoryResource can be queried at any time [SWS_CORE_06557]. Through this encapsulation, the request for memory is semantically decoupled from the concrete implementation of memory management.

diag_context caller Aufrufer / Container allocator PolymorphicAllocator caller->allocator Allokationsaufruf resource MemoryResource allocator->resource Speicherdelegierung

Context diagram: Integration of the allocator between caller and memory resource. Sources: [SWS_CORE_06557], [SWS_CORE_06572].

Lifecycle

Instances of the allocator are constructed either by default [SWS_CORE_06541] or with a pointer to a specific MemoryResource [SWS_CORE_06542]. Since the allocator merely references the memory resource, responsibility for its lifetime presumably lies with the caller. Question Q-adde89798a03cf8b (open) In addition to the regular copy constructor [SWS_CORE_06543], a converting constructor permits initialization from allocators for other element types U [SWS_CORE_06544].

With respect to ownership transfers, the regular copy assignment operator is deleted (=delete) [SWS_CORE_06545]. In contrast, AUTOSAR explicitly defines a move constructor [SWS_CORE_06546] and a default move assignment operator [SWS_CORE_00066]. During container copy operations, the method select_on_container_copy_construction() creates a corresponding allocator instance [SWS_CORE_06573].

Regarding concurrency, the default and converting constructors as well as the query of the memory resource are specified as thread-safe ([SWS_CORE_06541], [SWS_CORE_06542], [SWS_CORE_06544], [SWS_CORE_06557]). In contrast, move operations ([SWS_CORE_06546]), copy selections ([SWS_CORE_06573]), and all allocation, construction, and deallocation operations are declared as non-thread-safe.

Usage Path

The regular flow comprises memory provision, object construction, and their subsequent destruction and deallocation:

  • Memory allocation: Raw memory for n objects of type Tp is requested using allocate() [SWS_CORE_06547]. Alternatively, allocate_bytes() is available for byte-precise allocation with alignment [SWS_CORE_06549], as is the template allocate_object() for typed allocations [SWS_CORE_06551].
  • Object initialization: The method construct() creates objects in the previously allocated memory area [SWS_CORE_06555]. As a combined operation, new_object() provides allocation and in-place construction in a single call [SWS_CORE_06553].
  • Destruction and deallocation: Destruction is performed via destroy() [SWS_CORE_06556], followed by deallocation via deallocate() [SWS_CORE_06548], deallocate_bytes() [SWS_CORE_06550], or deallocate_object() [SWS_CORE_06552]. Alternatively, both can be combined with delete_object() [SWS_CORE_06554].
Sequence of allocation, construction, destruction, and deallocationCallerPolymorphicAllocatorMemoryResourceallocate(n)Speicher anfordernSpeicheradresseTp* (or nullptr)construct(p, args...)Objektkonstruktiondestroy(p)Objektdestruktiondeallocate(p, n)Speicher freigeben

Sequence diagram: Typical flow of allocation, construction, destruction, and deallocation. Sources: [SWS_CORE_06547], [SWS_CORE_06548], [SWS_CORE_06555], [SWS_CORE_06556].

Error Scenarios

The class differs from the ISO C++ standard in key error handling mechanisms in order to satisfy strict requirements for exception-free systems:

This guide is based on the specification of ara::core::PolymorphicAllocator from AUTOSAR R25-11 and was generated automatically.

Member map

Class diagram

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

G nara__core__PolymorphicAllocator970 PolymorphicAllocator + PolymorphicAllocator() + operator=() + allocate() + allocate_bytes() + allocate_object() + construct() + deallocate() + deallocate_bytes() + deallocate_object() + delete_object() + destroy() + new_object() + resource() + select_on_container_copy_construction()

Detail view

Select an entry in the outline.

Constructors and destructor

≙ [mem.poly.allocator.class]

Overloads PolymorphicAllocator 5
PolymorphicAllocator () noexcept; SWS_CORE_06541
PolymorphicAllocator (MemoryResource *r) noexcept; SWS_CORE_06542
PolymorphicAllocator (const PolymorphicAllocator &other) noexcept=default; SWS_CORE_06543
template <class U> PolymorphicAllocator (const PolymorphicAllocator< U > &other) noexcept; SWS_CORE_06544
PolymorphicAllocator (PolymorphicAllocator &&other) noexcept; SWS_CORE_06546

Methods

allocate function

except for the following deviations: 1. The function is noexcept 2. If unsuccessful: nullptr is returned, instead of raising any Exception ≙ [mem.poly.allocator.class]

[[nodiscard]] Tp * allocate (std::size_t n) noexcept;

except for the following deviations: 1. The function is noexcept 2. If unsuccessful: the returned pointer shall be nullptr ≙ [mem.poly.allocator.class]

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

except for the following deviations: 1. The function is noexcept 2. If unsuccessful: the returned pointer shall be nullptr ≙ [mem.poly.allocator.class]

template <class T> [[nodiscard]] T * allocate_object (std::size_t n=1) noexcept;
construct function

except for the following deviations: 1. Function is conditionally noexcept ≙ [mem.poly.allocator.class]

template <class T, class... Args> void construct (T *p, Args &&... args) noexcept(std::is_nothrow_ constructible< T, Args... >::value);
deallocate function

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

void deallocate (Tp *p, std::size_t n) noexcept;

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

void deallocate_bytes (void *p, std::size_t nbytes, std::size_t alignment=alignof(std::max_align_t)) noexcept;

except for the following deviations: 1. Function is nullptr 2. If unsuccessful: errors will be silently ignored ≙ [mem.poly.allocator.class]

template <class T> void deallocate_object (T *p, std::size_t n=1) noexcept;
delete_object function

except for the following deviations: 1. Function is conditionally noexcept 2. If unsuccessful: errors will be silently ignored ≙ [mem.poly.allocator.class]

template <class T> void delete_object (T *p) noexcept(std::is_nothrow_destructible< T >::value);
destroy function

except for the following deviations: 1. Function is conditionally noexcept ≙ [mem.poly.allocator.class]

template <class T> void destroy (T *p) noexcept(std::is_nothrow_destructible< T >::value);
new_object function

except for the following deviations: 1. Function is conditionally noexcept 2. If unsuccessful: nullptr is returned, instead of raising any Exception ≙ [mem.poly.allocator.class]

template <class T, class... CtorArgs> [[nodiscard]] T * new_object (CtorArgs &&... ctor_args) noexcept(std::is_nothrow_constructible< T, CtorArgs... >::value);
resource function

≙ [mem.poly.allocator.class]

MemoryResource * resource () const noexcept;

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

PolymorphicAllocator select_on_container_copy_construction () const noexcept;

Operators

operator= function 2

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

Overloads = 2
PolymorphicAllocator & operator= (PolymorphicAllocator &&other) noexcept=default; SWS_CORE_00066

Type aliases

value_type type alias

≙ [mem.poly.allocator.class]

using value_type = Tp;

Method documentation

function PolymorphicAllocator [SWS_CORE_06541]

PolymorphicAllocator () noexcept;

As per corresponding usage in [mem.poly.allocator.class]

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06541
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06541@rel:R25-11#7e6fd9e5
Content hash
7e6fd9e5
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06541
Status: valid/unmigrated Version: rel:R25-11#195a35ec 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_06541@rel:R25-11#195a35ec
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#7e6fd9e52026-09-30
  • R23-11rel:R23-11#1465b8862026-10-14
  • R24-11rel:R24-11#a1bf01392026-10-14
  • R25-11rel:R25-11#195a35ec2026-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 PolymorphicAllocator [SWS_CORE_06542]

PolymorphicAllocator (MemoryResource *r) noexcept;

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06542
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06542@rel:R25-11#8ff7601b
Content hash
8ff7601b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06542
Status: valid/unmigrated Version: rel:R25-11#8bd93278 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_06542@rel:R25-11#8bd93278
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#8ff7601b2026-09-30
  • R23-11rel:R23-11#d5a7d6172026-10-14
  • R24-11rel:R24-11#728611b82026-10-14
  • R25-11rel:R25-11#8bd932782026-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 PolymorphicAllocator [SWS_CORE_06543]

PolymorphicAllocator (const PolymorphicAllocator &other) noexcept=default;

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

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06543
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06543@rel:R25-11#50677d20
Content hash
50677d20
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06543
Status: valid/unmigrated Version: rel:R25-11#5d62e6ca 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_06543@rel:R25-11#5d62e6ca
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#50677d202026-09-30
  • R23-11rel:R23-11#fc99e5522026-10-14
  • R24-11rel:R24-11#7f7cdd4b2026-10-14
  • R25-11rel:R25-11#5d62e6ca2026-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 PolymorphicAllocator [SWS_CORE_06544]

template <class U> PolymorphicAllocator (const PolymorphicAllocator< U > &other) noexcept;

As per corresponding usage in [mem.poly.allocator.class]

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06544
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06544@rel:R25-11#1facdd41
Content hash
1facdd41
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06544
Status: valid/unmigrated Version: rel:R25-11#539ac7f5 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_06544@rel:R25-11#539ac7f5
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1facdd412026-09-30
  • R23-11rel:R23-11#a331d77c2026-10-14
  • R24-11rel:R24-11#745d118b2026-10-14
  • R25-11rel:R25-11#539ac7f52026-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 PolymorphicAllocator [SWS_CORE_06546] Upstream: RS_AP_00145

PolymorphicAllocator (PolymorphicAllocator &&other) noexcept;

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

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

Parameter (in)

ParameterBeschreibung
otherother PolymorphicAllocator to move from

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

Record
AUTOSAR/AP/record/SWS_CORE_06546
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06546@rel:R25-11#cbffc445
Content hash
cbffc445
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06546
Status: valid/unmigrated Version: rel:R25-11#8cbb6f43 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_06546@rel:R25-11#8cbb6f43
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#cbffc4452026-09-30
  • R23-11rel:R23-11#76904a592026-10-14
  • R24-11rel:R24-11#fb6303702026-10-14
  • R25-11rel:R25-11#8cbb6f432026-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_06547]

[[nodiscard]] Tp * allocate (std::size_t n) noexcept;

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. The function is noexcept 2. If unsuccessful: nullptr is returned, instead of raising any Exception

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

The member function allocate of class ara::core::PolymorphicAllocator serves for synchronously requesting uninitialized memory for n objects of type Tp [SWS_CORE_06547]. It is modeled on the functionality of [mem.poly.allocator.class], but deliberately deviates from the C++ standard through the declaration as noexcept and attribute [[nodiscard]] [SWS_CORE_06547].

In case of error, allocate does not throw an exception such as std::bad_alloc, but returns a nullptr instead [SWS_CORE_06547]. Because of [[nodiscard]], the caller must explicitly receive the return value and check it for nullptr before using the memory area [SWS_CORE_06547]. Regarding concurrency, the function is classified as exception-safe, but is considered not thread-safe (not thread-safe) [SWS_CORE_06547]. Interpretation: A synchronous call via the same allocator from different threads should therefore require external protection by the caller. Question Q-b00116faadf930fe (open)

The fault-tolerant behavior without exceptions corresponds directly to interface ara::core::MemoryResource::allocate [SWS_CORE_06503], which is likewise defined as noexcept and returns nullptr in case of error. Predefined instances such as NullMemoryResource [SWS_CORE_06563] also use this principle and consistently return nullptr upon allocation calls. At a higher level, this mechanism interacts with containers such as ara::core::Vector [SWS_CORE_01315], whose assignment operators are aligned with such allocation characteristics.

This text was generated automatically. The AUTOSAR specification is authoritative.

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

Rückgabewert

TypBeschreibung
Tp *• If successful: As per corresponding usage in [mem.poly.allocator.class] • 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_06547
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06547@rel:R25-11#1a694469
Content hash
1a694469
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06547
Status: valid/unmigrated Version: rel:R25-11#c37fff24 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_06547@rel:R25-11#c37fff24
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#1a6944692026-09-30
  • R23-11rel:R23-11#eca29eb82026-10-14
  • R24-11rel:R24-11#ae9311ae2026-10-14
  • R25-11rel:R25-11#c37fff242026-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_bytes [SWS_CORE_06549]

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

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. The function is noexcept 2. If unsuccessful: the returned pointer shall be nullptr

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

use

The member function allocate_bytes of class ara::core::PolymorphicAllocator reserves raw memory in the amount of nbytes with the specified alignment alignment [SWS_CORE_06549]. The default value for the alignment corresponds to alignof(std::max_align_t) [SWS_CORE_06549]. The function is included via the header ara/core/memory_resource.h and executed synchronously [SWS_CORE_06549].

Error Handling and Semantics

In contrast to the standard behavior according to [mem.poly.allocator.class], the implementation exhibits two deviations [SWS_CORE_06549]:

  • The function is declared as noexcept and throws no exceptions [SWS_CORE_06549].
  • If the allocation fails, the function returns nullptr instead of throwing an exception [SWS_CORE_06549].

Due to the attribute [[nodiscard]], the return value must be evaluated by the caller, in particular by checking for nullptr before accessing the memory area [SWS_CORE_06549].

Concurrency and Limitations

Regarding thread safety, the method is specified as not thread-safe [SWS_CORE_06549]. Parallel calls on the same instance therefore presumably require external synchronization [SWS_CORE_06549]. Question Q-85c74d55563cae38 (open) Regarding exception safety, the operation is considered exception safe [SWS_CORE_06549].

This text was generated by an AI based on the specification.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06549
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06549@rel:R25-11#d65ae27d
Content hash
d65ae27d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06549
Status: valid/unmigrated Version: rel:R25-11#126a0b29 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_06549@rel:R25-11#126a0b29
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#d65ae27d2026-09-30
  • R23-11rel:R23-11#d9ed47762026-10-14
  • R24-11rel:R24-11#9b3f93072026-10-14
  • R25-11rel:R25-11#126a0b292026-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_object [SWS_CORE_06551]

template <class T> [[nodiscard]] T * allocate_object (std::size_t n=1) noexcept;

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. The function is noexcept 2. If unsuccessful: the returned pointer shall be nullptr

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

use

The template member function allocate_object is part of class ara::core::PolymorphicAllocator and is provided via the header file #include "ara/core/memory_resource.h" [SWS_CORE_06551]. It synchronously allocates memory for n objects of type T, with the parameter n populated with the value 1 by default [SWS_CORE_06551]. The compiler attribute [[nodiscard]] obligates callers not to ignore the returned typed pointer T*.

Error handling

The specification defines two explicit deviations from the standard [mem.poly.allocator.class] [SWS_CORE_06551]:

  • No exceptions: The function is declared as noexcept and specified as exception-safe (exception safe) [SWS_CORE_06551].
  • Null pointer in case of error: If the memory allocation fails, no exception is thrown; instead, nullptr must be returned [SWS_CORE_06551].

The caller must therefore check the supplied pointer for nullptr immediately before any further use.

Concurrency and Limitations

The operation is specified as not thread-safe (not thread-safe) [SWS_CORE_06551]. When using the same allocator instance concurrently, external synchronization is likely required to avoid data races. In addition, the function reserves pure memory (interpretation: the construction of objects in the reserved memory is the responsibility of downstream mechanisms). Question Q-c41df2caaeb4c503 (open)

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06551
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06551@rel:R25-11#3b58128a
Content hash
3b58128a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06551
Status: valid/unmigrated Version: rel:R25-11#e1e4da70 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_06551@rel:R25-11#e1e4da70
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#3b58128a2026-09-30
  • R23-11rel:R23-11#68fdb6af2026-10-14
  • R24-11rel:R24-11#e6cdc1b02026-10-14
  • R25-11rel:R25-11#e1e4da702026-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 construct [SWS_CORE_06555]

template <class T, class... Args> void construct (T *p, Args &&... args) noexcept(std::is_nothrow_ constructible< T, Args... >::value);

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. Function is conditionally noexcept

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

The template function construct of class ara::core::PolymorphicAllocator ([SWS_CORE_06555]) serves to synchronously create an object of type T at the passed memory address p while forwarding the arguments args.... It is defined via the header ara/core/memory_resource.h and essentially follows the requirements from [mem.poly.allocator.class].

An explicit deviation from the C++ standard concerns exception handling: According to [SWS_CORE_06555], the function is conditionally declared as noexcept, depending on whether std::is_nothrow_constructible<T, Args...>::value applies. The specification thus assigns it the attribute conditionally exception safe. Interpretation: Provided that T cannot be constructed exception-free, any constructor exceptions are likely to be propagated unhindered to the caller, as no internal error codes or separate interception mechanisms are defined. Question Q-ad77510f396e59ae (open)

Regarding concurrency and boundary conditions, construct is specified as not thread-safe (not thread-safe) ([SWS_CORE_06555]). In case of parallel accesses to the same allocator instance or the same memory area, external synchronization in the call context is therefore mandatory.

The architectural pattern of a type-dependent noexcept declaration corresponds to the conventions in ara::core, as used among others also for the constructors of ara::core::Result ([SWS_CORE_00725], [SWS_CORE_00726]).

This usage note was generated automatically and relies exclusively on the specification of AUTOSAR Adaptive Release R25-11.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
Exception-Sicherheitconditionally exception 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_06555
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06555@rel:R25-11#797687e3
Content hash
797687e3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06555
Status: valid/unmigrated Version: rel:R25-11#0973fb97 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_06555@rel:R25-11#0973fb97
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#797687e32026-09-30
  • R23-11rel:R23-11#62b249762026-10-14
  • R24-11rel:R24-11#44e873a92026-10-14
  • R25-11rel:R25-11#0973fb972026-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_06548]

void deallocate (Tp *p, std::size_t n) noexcept;

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

use

The member function deallocate of class ara::core::PolymorphicAllocator deallocates previously allocated memory for n objects of type Tp starting at address p [SWS_CORE_06548]. The declaration takes place via header ara/core/memory_resource.h [SWS_CORE_06548]. The function generally follows the semantics of the standard C++ allocator according to [mem.poly.allocator.class], but exhibits two specific deviations [SWS_CORE_06548].

Error Handling and Exception Safety

As a key deviation, the operation is declared as noexcept and specified as exception-safe (exception safe) [SWS_CORE_06548]. If freeing the memory fails, occurring errors are silently ignored (silently ignored), so that neither exceptions are thrown nor explicit error codes are returned [SWS_CORE_06548].

Concurrency and Interaction

Regarding the call context, deallocate is classified as not thread-safe (not thread-safe) [SWS_CORE_06548]. In the memory management concept, this function corresponds to method deallocate of the underlying base class ara::core::MemoryResource [SWS_CORE_06504], for which the same deviations regarding noexcept and silent error handling apply.

This usage note was created automatically and is based exclusively on the specification requirements of AUTOSAR Adaptive.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06548
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06548@rel:R25-11#824b5be3
Content hash
824b5be3
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06548
Status: valid/unmigrated Version: rel:R25-11#d1d0b454 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_06548@rel:R25-11#d1d0b454
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#824b5be32026-09-30
  • R23-11rel:R23-11#af3c4e332026-10-14
  • R24-11rel:R24-11#92f9b2332026-10-14
  • R25-11rel:R25-11#d1d0b4542026-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_bytes [SWS_CORE_06550]

void deallocate_bytes (void *p, std::size_t nbytes, std::size_t alignment=alignof(std::max_align_t)) noexcept;

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

The function deallocate_bytes of class ara::core::PolymorphicAllocator serves to deallocate a previously allocated memory area according to [SWS_CORE_06550]. It is provided via the header ara/core/memory_resource.h and is fundamentally oriented towards the semantics from [mem.poly.allocator.class].

The call is performed synchronously and expects the following parameters according to [SWS_CORE_06550]:

  • p: Pointer (void*) to the memory area to be deallocated.
  • nbytes: Size of the memory to be deallocated in bytes (std::size_t).
  • alignment: Desired alignment (default value alignof(std::max_align_t)).

Regarding error behavior, the implementation exhibits specific deviations from the standard: The function is declared as noexcept and considered exception-safe (exception safe). If the deallocation fails, occurring errors are silently ignored (silently ignored) according to [SWS_CORE_06550]. No exceptions are thrown and no return values are provided.

With respect to concurrency and restrictions, the function is explicitly specified as not thread-safe (not thread-safe) [SWS_CORE_06550]. Concurrent access to the same allocator instance without external synchronization is therefore likely to lead to undefined behavior. Question Q-33c80e3bb50ed64f (open)

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06550
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06550@rel:R25-11#b90edcee
Content hash
b90edcee
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06550
Status: valid/unmigrated Version: rel:R25-11#7305c652 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_06550@rel:R25-11#7305c652
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b90edcee2026-09-30
  • R23-11rel:R23-11#9a13c45b2026-10-14
  • R24-11rel:R24-11#eeb59aac2026-10-14
  • R25-11rel:R25-11#7305c6522026-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_object [SWS_CORE_06552]

template <class T> void deallocate_object (T *p, std::size_t n=1) noexcept;

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. Function is nullptr 2. If unsuccessful: errors will be silently ignored

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

The template function deallocate_object of class ara::core::PolymorphicAllocator serves to deallocate previously reserved object memory [SWS_CORE_06552]. It is based on the corresponding C++ standard use according to [mem.poly.allocator.class], but exhibits specific deviations [SWS_CORE_06552].

Regarding parameters and call context, the following properties apply [SWS_CORE_06552]:

  • Signature: template <class T> void deallocate_object (T *p, std::size_t n=1) noexcept; [SWS_CORE_06552].
  • Header: The function is available via #include "ara/core/memory_resource.h" [SWS_CORE_06552].
  • Return value: The operation yields no return value (void) [SWS_CORE_06552].
  • Null pointer behavior: As an explicit deviation, it is specified that the function takes effect when passing nullptr or supports null pointers (“Function is nullptr”) [SWS_CORE_06552].

Regarding error handling, the function is declared as noexcept and considered exception-safe (exception safe) [SWS_CORE_06552]. If a deallocation fails, occurring errors are silently ignored (“errors will be silently ignored”), so that no exceptions are propagated to the outside [SWS_CORE_06552].

As a major restriction, deallocate_object is classified as not thread-safe (not thread-safe) [SWS_CORE_06552]. For parallel accesses to the same allocator instance from multiple threads, calls must therefore be protected by external synchronization mechanisms.

This text was created by an AI and is based exclusively on the specifications of Release R25-11.

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06552
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06552@rel:R25-11#97b0add9
Content hash
97b0add9
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06552
Status: valid/unmigrated Version: rel:R25-11#8e127a90 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_06552@rel:R25-11#8e127a90
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#97b0add92026-09-30
  • R23-11rel:R23-11#0e144f892026-10-14
  • R24-11rel:R24-11#30aa2ab62026-10-14
  • R25-11rel:R25-11#8e127a902026-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 delete_object [SWS_CORE_06554]

template <class T> void delete_object (T *p) noexcept(std::is_nothrow_destructible< T >::value);

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. Function is conditionally noexcept 2. If unsuccessful: errors will be silently ignored

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

The member function delete_object of class ara::core::PolymorphicAllocator serves according to [SWS_CORE_06554] to destroy and deallocate an object of type T pointed to by the passed pointer p. The function is provided via the header file #include "ara/core/memory_resource.h" and follows the behavior from [mem.poly.allocator.class] with specific deviations.

Regarding call context and semantics, the following properties apply:

  • Return value and exceptions: The function has no return value (void). It is conditionally exception-safe (conditionally noexcept) with the specification noexcept(std::is_nothrow_destructible<T>::value), meaning it throws no exceptions provided that the destructor of T is declared as non-throwing [SWS_CORE_06554].
  • Error handling: If the operation fails, occurring errors are silently ignored (errors will be silently ignored) [SWS_CORE_06554]. Interpretation: Callers thus receive neither an error message nor an error code or an exception in the event of an error. Question Q-9393b0f68a055e4b (open)
  • Thread safety: The operation is specified as not thread-safe (not thread-safe) [SWS_CORE_06554]. When using the same allocator concurrently across multiple threads, synchronization is the responsibility of the caller.

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
Exception-Sicherheitconditionally exception 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_06554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06554@rel:R25-11#052ca749
Content hash
052ca749
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06554
Status: valid/unmigrated Version: rel:R25-11#9b4d40a0 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_06554@rel:R25-11#9b4d40a0
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#052ca7492026-09-30
  • R23-11rel:R23-11#3c9cbc572026-10-14
  • R24-11rel:R24-11#d8a2d49d2026-10-14
  • R25-11rel:R25-11#9b4d40a02026-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 destroy [SWS_CORE_06556]

template <class T> void destroy (T *p) noexcept(std::is_nothrow_destructible< T >::value);

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. Function is conditionally noexcept

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

use

The template member function destroy of class ara::core::PolymorphicAllocator ([SWS_CORE_06556]) serves to destroy an object of type T pointed to by the pointer p. The function is declared in header ara/core/memory_resource.h and fundamentally follows the standardized behavior from [mem.poly.allocator.class] ([SWS_CORE_06556]). The method call yields no return value and is executed synchronously in the context of the calling thread. Interpretation: It is likely assumed here that p points to a valid, previously instantiated object. Question Q-a4faf7034eb683dd (open)

Error Handling and Exception Safety

Regarding error handling, the function is classified as conditionally exception-safe (conditionally exception safe) ([SWS_CORE_06556]). As a specific deviation from the standard requirement [mem.poly.allocator.class], destroy is conditionally declared with noexcept(std::is_nothrow_destructible<T>::value) ([SWS_CORE_06556]). Provided that the destructor of the passed type T throws no exceptions, exception freedom applies to the entire call; otherwise, exceptions resulting from the destructor can escape.

Concurrency and Limitations

Regarding concurrency behavior, destroy is specified as not thread-safe (not thread-safe) ([SWS_CORE_06556]). If multiple threads access the same instance of ara::core::PolymorphicAllocator or the object to be destroyed at the same time, suitable external synchronization mechanisms must be established.

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
Exception-Sicherheitconditionally exception 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_06556
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06556@rel:R25-11#b20f3b52
Content hash
b20f3b52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06556
Status: valid/unmigrated Version: rel:R25-11#abadf693 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_06556@rel:R25-11#abadf693
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#b20f3b522026-09-30
  • R23-11rel:R23-11#4cffca7a2026-10-14
  • R24-11rel:R24-11#c0cdac192026-10-14
  • R25-11rel:R25-11#abadf6932026-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 new_object [SWS_CORE_06553]

template <class T, class... CtorArgs> [[nodiscard]] T * new_object (CtorArgs &&... ctor_args) noexcept(std::is_nothrow_constructible< T, CtorArgs... >::value);

As per corresponding usage in [mem.poly.allocator.class] except for the following deviations: 1. Function is conditionally noexcept 2. If unsuccessful: nullptr is returned, instead of raising any Exception

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

The template member function new_object of class ara::core::PolymorphicAllocator (defined in #include "ara/core/memory_resource.h") synchronously allocates memory and constructs an object of type T with the passed constructor arguments ctor_args [SWS_CORE_06553].

The use is subject to the following stipulations and deviations from the standard [mem.poly.allocator.class] [SWS_CORE_06553]:

  • Call and return value: Upon successful object creation, a typed pointer T* to the new instance is returned. The attribute [[nodiscard]] obligates callers to evaluate the return value.
  • Error handling: In the event of failure, deviating from [mem.poly.allocator.class], no exception is thrown; instead, nullptr is returned. The caller must therefore imperatively check the resulting pointer for nullptr prior to access.
  • Exception safety: The function is specified as conditionally exception-safe (conditionally exception safe). It is noexcept if and only if the object creation itself is guaranteed not to throw an exception (noexcept(std::is_nothrow_constructible<T, CtorArgs...>::value)).
  • Concurrency: The function is declared as not thread-safe (not thread-safe). Interpretation: In case of simultaneous access to the same instance of ara::core::PolymorphicAllocator, the caller is likely responsible for suitable external synchronization. Question Q-3d0ecfe34187c91e (open)

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
Exception-Sicherheitconditionally exception safe
Thread-Sicherheitnot thread-safe

Rückgabewert

TypBeschreibung
T*• If successful: As per corresponding usage in [mem.poly.allocator.class] • 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_06553
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06553@rel:R25-11#d2723bd6
Content hash
d2723bd6
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06553
Status: valid/unmigrated Version: rel:R25-11#a6ad2786 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_06553@rel:R25-11#a6ad2786
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#d2723bd62026-09-30
  • R23-11rel:R23-11#914b6df22026-10-14
  • R24-11rel:R24-11#700266922026-10-14
  • R25-11rel:R25-11#a6ad27862026-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_00066] Upstream: RS_AP_00145

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

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

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

Parameter (in)

ParameterBeschreibung
otherother PolymorphicAllocator to move from

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

Record
AUTOSAR/AP/record/SWS_CORE_00066
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00066@rel:R25-11#9ab9307f
Content hash
9ab9307f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00066
Status: valid/unmigrated Version: rel:R25-11#b0c562e4 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_00066@rel:R25-11#b0c562e4
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#9ab9307f2026-09-30
  • R24-11rel:R24-11#49e75ee42026-10-14
  • R25-11rel:R25-11#b0c562e42026-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_06545]

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

As per corresponding usage in [mem.poly.allocator.class]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06545
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06545@rel:R25-11#6662d26d
Content hash
6662d26d
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06545
Status: valid/unmigrated Version: rel:R25-11#ebba2fe5 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_06545@rel:R25-11#ebba2fe5
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#6662d26d2026-09-30
  • R23-11rel:R23-11#19b7dc922026-10-14
  • R24-11rel:R24-11#9e9fa6da2026-10-14
  • R25-11rel:R25-11#ebba2fe52026-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 resource [SWS_CORE_06557]

MemoryResource * resource () const noexcept;

As per corresponding usage in [mem.poly.allocator.class]

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

The method resource is a const member function of class ara::core::PolymorphicAllocator from the header file #include "ara/core/memory_resource.h" [SWS_CORE_06557]. According to the specification reference to [mem.poly.allocator.class], it serves to synchronously retrieve the associated memory resource [SWS_CORE_06557].

Usage and signature

The function signature is MemoryResource * resource () const noexcept; [SWS_CORE_06557]. The call is parameterless and synchronous on an instance of ara::core::PolymorphicAllocator. As a return value, the function returns a pointer of type MemoryResource* [SWS_CORE_06557]. Interpretation: The returned pointer is likely to point directly to the concrete memory resource used by the allocator for memory operations. Question Q-392683a38a4e490b (open)

Error Handling and Concurrency

  • Exception safety: The function is declared as noexcept and classified as exception safe [SWS_CORE_06557]. It throws no exceptions, and no specific error codes are defined.
  • Thread safety: The specification explicitly identifies the method as thread-safe [SWS_CORE_06557]. Through the qualification as const, concurrent read access across multiple threads is safe.

Interaction

In module core, resource provides the interface to query the MemoryResource encapsulated by ara::core::PolymorphicAllocator and to address its operations [SWS_CORE_06557].

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06557
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06557@rel:R25-11#03dbf6b1
Content hash
03dbf6b1
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06557
Status: valid/unmigrated Version: rel:R25-11#95a9a731 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_06557@rel:R25-11#95a9a731
Point-in-Time History:
Recorded Revisions (4):
  • R25-11rel:R25-11#03dbf6b12026-09-30
  • R23-11rel:R23-11#071c0a122026-10-14
  • R24-11rel:R24-11#4d44fc3f2026-10-14
  • R25-11rel:R25-11#95a9a7312026-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 select_on_container_copy_construction [SWS_CORE_06573]

PolymorphicAllocator select_on_container_copy_construction () const noexcept;

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

use

The member function select_on_container_copy_construction belongs to the scope of class ara::core::PolymorphicAllocator and is declared via the header file #include "ara/core/memory_resource.h" ([SWS_CORE_06573]). It is called synchronously to create a new instance of PolymorphicAllocator upon copy construction of a container ([SWS_CORE_06573]). The functional behavior follows the requirement [mem.poly.allocator.class] ([SWS_CORE_06573]). Interpretation: The resulting allocator is likely default-constructed and thus falls back to the default memory resource instead of necessarily copying the memory resource of the source container. Question Q-134ed967dc22e133 (open)

Error Handling and Exception Safety

A central deviation from the general C++ specification is that the function in AUTOSAR is explicitly declared as noexcept ([SWS_CORE_06573]). Execution is defined as exception-safe (exception safe) ([SWS_CORE_06573]). Specific error codes, return values for error indication, or messages to DET or DEM are not provided for this interface, as the call is guaranteed to terminate without errors.

Concurrency and Limitations

According to the specification, the function is classified as not thread-safe ([SWS_CORE_06573]). This means that simultaneous calls on the same PolymorphicAllocator instance from multiple threads without external synchronization can lead to data races. Before copying a container in concurrent environments, access to the allocator object must be protected by the user.

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

Header-Datei#include "ara/core/memory_resource.h"
Scopeclass ara::core::PolymorphicAllocator
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_06573
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06573@rel:R25-11#f78e279c
Content hash
f78e279c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06573
Status: valid/unmigrated Version: rel:R25-11#23e4ce94 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_06573@rel:R25-11#23e4ce94
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#f78e279c2026-09-30
  • R24-11rel:R24-11#70871b2b2026-10-14
  • R25-11rel:R25-11#23e4ce942026-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

Type alias documentation

type alias value_type [SWS_CORE_06572]

using value_type = Tp;

As per corresponding usage in [mem.poly.allocator.class]

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

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

Record
AUTOSAR/AP/record/SWS_CORE_06572
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_06572@rel:R25-11#2bb07c52
Content hash
2bb07c52
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_06572
Status: valid/unmigrated Version: rel:R25-11#8c0c50c3 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_06572@rel:R25-11#8c0c50c3
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#2bb07c522026-09-30
  • R24-11rel:R24-11#92a2e3f52026-10-14
  • R25-11rel:R25-11#8c0c50c32026-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