function Allocate [SWS_CM_90438] Upstream: RS_CM_00201, RS_AP_00114, RS_AP_00115, RS_AP_00120
ara::com::SampleAllocateePtr< SampleType > Allocate ();
Allocating data for event transfer when Communication Management is responsible for the data.
The method Allocate is called at the skeleton level for an event ([SWS_CM_90438]; AUTOSAR_AP_EXP_ARAComAPI §5.4.1 “Skeleton Class API’s”) in order to allocate memory for the transmission of event data when Communication Management (ara::com) is responsible for managing the data ([SWS_CM_90438]). It returns an instance of type ara::com::SampleAllocateePtr<SampleType> ([SWS_CM_90438]). This pointer type conceptually behaves like a std::unique_ptr<T>, so that only one party owns the pointer at any given time (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”).
Regarding error handling and exception safety, Allocate is specified as not exception safe ([SWS_CM_90438]). The specification defines two possible violations:
SampleAllocationViolation: Insufficient memory resources are available to allocate the data ([SWS_CM_90438]).AllocateUsageViolation: The allocation was impermissibly performed via a custom allocator ([SWS_CM_90438]).
The concept behind Allocate primarily aims at supporting zero-copy mechanisms, particularly with shared-memory-based IPC transport, where strict synchronization between readers and writers is assumed (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”). Implementers must note that serialization requirements can negate zero-copy if data types in deployment are not configured to be binary compatible or detection logic precludes this (ARAComAPI §6 “Event Allocate/Send sample Binding implementer hint”).
In interaction with sending events, the memory pointer obtained via Allocate is passed to Send(ara::com::SampleAllocateePtr<SampleType> data) ([SWS_CM_90437]). After calling Send, the service application may no longer access the data once Communication Management transmits the data to all subscribing applications ([SWS_CM_90437]).
This text was created by an AI and is based exclusively on the specification documents of AUTOSAR release R25-11.
Implementer's Guide to follow (complexity I2)
| Header-Datei | #include "<SiNamespaceDerivedDirectoryPath>/<SiShortname>_skeleton.h" |
|---|---|
| Scope | class <SI-Namespace>::skeleton:: events::<Event> |
| Exception-Sicherheit | not exception safe |
| Verletzungen (Violations) | SampleAllocation- Not enough memory resources can be allocated Violation AllocateUsageVio- The allocation was illegally done via custom allocator lation |
Rückgabewert
| Typ | Beschreibung |
|---|---|
| ara::com::Sample | A ara::com::SampleAllocateePtr to an event sample AllocateePtr< Sample Type > |
Request a governed re-review of this record. The record is not changed immediately.
- Record
AUTOSAR/AP/record/SWS_CM_90438- Status
- valid/unmigrated
- Version
AUTOSAR/AP/record/SWS_CM_90438@rel:R25-11#b02a325f- Content hash
b02a325f- Source
- https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_CommunicationManagement.pdf#nameddest=SWS_CM_90438
Status: valid/unmigrated
Version: rel:R25-11#3059e6d8
Versionshistorie & Revisions (1 transition, 8 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_CM_90438@rel:R25-11#3059e6d8
Recorded Revisions (8):
- R25-11
rel:R25-11#b02a325f2026-09-30 - R19-11
rel:R19-11#b404edd72026-10-14 - R20-11
rel:R20-11#8f3783f62026-10-14 - R21-11
rel:R21-11#a234befb2026-10-14 - R22-11
rel:R22-11#340e44dd2026-10-14 - R23-11
rel:R23-11#340e44dd2026-10-14 - R24-11
rel:R24-11#2e4120f42026-10-14 - R25-11
rel:R25-11#3059e6d82026-10-14 active
Requirement Text as-of this release:
Curation Decisions:
Reachable Artifacts & Dependents:
| Date | Actor | Transition | Reason / Rationale | Campaign |
|---|---|---|---|---|
| 2026-08-13 | tool | none → valid/unmigrated | mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record | 2026-08-13-status-backfill |
gemini-3.8-flash-low· 2026-10-13 · German original