DEENESPTFRRUARHIKOZHNL

struct ara::core::PoolOptions

[SWS_CORE_00026] Upstream: RS_AP_00130

struct PoolOptions {...};

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

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

User GuideAI-GENERATED

Configures block and chunk limits for pool-based memory resources.
AI-GENERATED unreviewed Model: gemini-3.8-flash-medium · Effort: medium · Temperature: not controllable · Prompt: 79719d3800dc Provenance Open questions (3)
translated from the German guidegemini-3.8-flash-low · 2026-10-13 · German original

Configures block and chunk limits for pool-based memory resources.

The structure ara::core::PoolOptions is used to configure pool-based memory resources according to std::pmr::pool_options. It allows limiting the maximum number of blocks per chunk via max_blocks_per_chunk [SWS_CORE_00027] and specifying the maximum pool block size via largest_required_pool_block [SWS_CORE_00028]. As a simple data aggregate, the structure is populated prior to initialization of the memory resource and passed to its constructor. Interpretation: Since no intrinsic validation takes place, developers must ensure that the configured threshold values do not overwhelm the physical RAM. Question (open)

Context

The data structure ara::core::PoolOptions provides configuration parameters for memory-pool-based resources in module core of the AUTOSAR Adaptive Platform. It serves the targeted control of allocation behavior and is based on the C++ standard functionality of std::pmr::pool_options. The structure is included via header <ara/core/memory_resource.h> and interacts closely with pool memory resources that hold contiguous chunks and blocks for recurring memory requests.

In safety-critical and near-real-time systems, the limitation and predictability of dynamic memory operations are essential. In this context, ara::core::PoolOptions assumes the role of a decoupler between application-specific capacity requirements and the internal management of memory pools. Via the structure, developers can define the maximum number of blocks that may be grouped within a chunk [SWS_CORE_00027] and which maximum block size still has to be serviced via the specialized pools [SWS_CORE_00028]. Application software that instantiates memory resources uses these options to avoid excessive fragmentation and to deterministically control allocation limits.

Lifecycle

As a simple configuration type (struct), ara::core::PoolOptions has a lightweight lifecycle without complex internal state transitions. Creation typically takes place as a local stack object or as a static configuration constant prior to the instantiation of the associated memory resource. Upon instantiation, the two attributes max_blocks_per_chunk [SWS_CORE_00027] and largest_required_pool_block [SWS_CORE_00028] are initialized by default with the value 0.

Interpretation: A value of 0 is likely to signal to the receiving memory resource that platform-specific default limits should take effect. Question (open) Since it is a pure value object, ara::core::PoolOptions owns no resources in the sense of RAII and executes no cleanup actions upon destruction. The lifecycle of the structure is usually coupled to the creation phase of the memory resource: once the options have been passed to the pool resource, the resource retains the parameters internally, allowing the PoolOptions object itself to be safely destroyed or reused.

Regarding concurrency, the structure itself provides no inherent synchronization mechanism. Concurrent read accesses to an unmodified PoolOptions object are thread-safe, whereas simultaneous modifications must be synchronized externally. However, since the object is primarily configured prior to being passed, write access generally no longer takes place after initialization.

Usage Path

The primary use case encompasses defining allocation limits and forwarding them to a memory-managing component. First, the caller creates an instance of ara::core::PoolOptions and sets the desired parameters. Via max_blocks_per_chunk, the upper bound for blocks per chunk is defined [SWS_CORE_00027], while largest_required_pool_block defines the upper limit for allocations that are still to be covered by the pool [SWS_CORE_00028].

Subsequently, the populated structure is passed to the constructor of a corresponding pool memory resource. The memory resource reads the configured values and configures its internal pools accordingly. If memory requests arrive during runtime, the resource decides based on the previously configured thresholds whether the request can be serviced from a pool or must be forwarded to a higher-level upstream resource. Interpretation: It can be assumed that requests exceeding largest_required_pool_block are typically delegated directly to the upstream memory manager. Question (open)

Configuration and usage of PoolOptionsApplicationPoolOptionsSpeicherressourceUse Case: KonfigurationParameter max_blocks_per_chunkand set largest_required_pool_blockUse Case: Initialization of the memory resourceConstruction with PoolOptionsOptionen auslesenReturn parameter valuesUse Case: Laufzeit-AllokationSpeicher anfordernSpeicherblock bereitstellen

Sequence diagram: Typical procedure for configuring a pool memory resource via PoolOptions. Sources: [SWS_CORE_00027], [SWS_CORE_00028].

Error Scenarios

Since ara::core::PoolOptions is defined as a simple data aggregate (struct), creating or populating the fields throws no C++ exceptions and returns no error codes. Potential error conditions arise only during the interpretation of the values by the receiving memory resource.

Interpretation: If unrealistic values are configured — for example, an extremely large value for max_blocks_per_chunk [SWS_CORE_00027] or for largest_required_pool_block [SWS_CORE_00028] —, this can cause the downstream memory resource to hit system limits when allocating chunks and trigger out-of-memory conditions. Question (open) A prerequisite for stable operation is therefore careful coordination of the two parameters with the physically available RAM and the expected load profile of the application. If the values remain at 0, it is up to the target resource to use robust default sizes.

This guide is based on the AUTOSAR Adaptive Platform Release R25-11 specification. All technical statements rely exclusively on the requirements contained in the specification payload.

UML class diagram

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

G nara__core__PoolOptions463 «struct» PoolOptions + largest_ + max_

Constants

largest_ variable

≙ [mem.res.pool]

std::size_t largest_required_pool_block = 0;
max_ variable

≙ [mem.res.pool]

std::size_t max_blocks_per_chunk = 0;

Documentation of constants / variables

variable largest_ [SWS_CORE_00028]

std::size_t largest_required_pool_block = 0;

As per corresponding usage in [mem.res.pool]

Header-Datei#include "ara/core/memory_resource.h"
Scopestruct ara::core::PoolOptions
Symbollargest_required_pool_block
Typstd::size_t

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

Record
AUTOSAR/AP/record/SWS_CORE_00028
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00028@rel:R25-11#09a93b7f
Content hash
09a93b7f
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00028
Status: valid/unmigrated Version: rel:R25-11#a3bf6d56 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_00028@rel:R25-11#a3bf6d56
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#09a93b7f2026-09-30
  • R24-11rel:R24-11#0f29769e2026-10-14
  • R25-11rel:R25-11#a3bf6d562026-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

variable max_ [SWS_CORE_00027]

std::size_t max_blocks_per_chunk = 0;

As per corresponding usage in [mem.res.pool]

Header-Datei#include "ara/core/memory_resource.h"
Scopestruct ara::core::PoolOptions
Symbolmax_blocks_per_chunk
Typstd::size_t

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

Record
AUTOSAR/AP/record/SWS_CORE_00027
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_CORE_00027@rel:R25-11#3e26306e
Content hash
3e26306e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Core.pdf#nameddest=SWS_CORE_00027
Status: valid/unmigrated Version: rel:R25-11#fc3e04ef 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_00027@rel:R25-11#fc3e04ef
Point-in-Time History:
Recorded Revisions (3):
  • R25-11rel:R25-11#3e26306e2026-09-30
  • R24-11rel:R24-11#cd619fd92026-10-14
  • R25-11rel:R25-11#fc3e04ef2026-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