DEENESPTFRRUARHIKOZHNL

क्लास 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

उपयोगकर्ता गाइडएआई जनित

विनिमेय मेमोरी संसाधनों के माध्यम से ऑब्जेक्ट्स और कंटेनरों के लिए बहुरूपी (Polymorphic) मेमोरी आवंटन का प्रबंधन करता है।
एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 4f3088ca1f09 उद्गम खुले प्रश्न (2)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

विनिमेय मेमोरी संसाधनों के माध्यम से ऑब्जेक्ट्स और कंटेनरों के लिए बहुरूपी (Polymorphic) मेमोरी आवंटन का प्रबंधन करता है।

टेम्प्लेट क्लास अनुकूली एप्लिकेशन्स और कंटेनरों के लिए मेमोरी-संसाधन-आधारित डायनेमिक आवंटन को बहुरूपी एलोकेटर्स [SWS_CORE_06541] के पूर्णतः अपवाद-मुक्त कार्यान्वयन के रूप में एनकैप्सुलेट करती है। ऑब्जेक्ट जीवनचक्र के लचीले नियंत्रण के लिए, इंस्टेंस सभी मेमोरी अनुरोधों को एक विनिमेय मेमोरी संसाधन को सौंपता है, जहाँ विफल आवंटन C++ अपवादों के बजाय नियतात्मक रूप से शून्य पॉइंटर्स लौटाते हैं [SWS_CORE_06547]। एक आवश्यक कार्यात्मक सीमा के रूप में, नियमित कॉपी असाइनमेंट स्पष्ट रूप से निषिद्ध है, जबकि चालू संचालन के दौरान दोषपूर्ण डी-आवंटन संचालन हमेशा चुपचाप अनदेखा कर दिया जाता है।

संदर्भ

टेम्प्लेट क्लास ara::core::PolymorphicAllocator AUTOSAR Adaptive में C++ मानक पैटर्न के अनुसार स्टेटफुल, बहुरूपी मेमोरी आवंटन के लिए इंटरफ़ेस को लागू करती है और अंतर्निहित तत्व प्रकार value_type [SWS_CORE_06572] को परिभाषित करती है। यह कॉलिंग घटकों - जैसे कंटेनर या एप्लिकेशन संरचनाओं - और एक ठोस मेमोरी संसाधन के बीच एक एडेप्टर के रूप में मध्यस्थता करती है। विधि resource() के माध्यम से उपयोग किए गए MemoryResource के पॉइंटर को किसी भी समय पूछा जा सकता है [SWS_CORE_06557]। यह एनकैप्सुलेशन मेमोरी के अनुरोध को मेमोरी प्रबंधन के ठोस कार्यान्वयन से सिमेंटिक रूप से अलग करता है।

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

संदर्भ आरेख: कॉलर और मेमोरी संसाधन के बीच एलोकेटर का एकीकरण। स्रोत: [SWS_CORE_06557], [SWS_CORE_06572]।

जीवनचक्र

एलोकेटर के इंस्टेंस या तो डिफ़ॉल्ट रूप से [SWS_CORE_06541] या किसी विशिष्ट MemoryResource के पॉइंटर के साथ निर्मित किए जाते हैं [SWS_CORE_06542]। चूँकि एलोकेटर केवल मेमोरी संसाधन को संदर्भित करता है, इसके जीवनकाल का उत्तरदायित्व संभवतः कॉलर पर होता है। प्रश्न Q-adde89798a03cf8b (खुला) नियमित कॉपी कंस्ट्रक्टर [SWS_CORE_06543] के अलावा, एक रूपांतरण कंस्ट्रक्टर अन्य तत्व प्रकारों U [SWS_CORE_06544] के लिए एलोकेटर्स से आरंभीकरण की अनुमति देता है।

स्वामित्व परिवर्तनों के संबंध में, नियमित कॉपी असाइनमेंट ऑपरेटर हटा दिया गया है (=delete) [SWS_CORE_06545]। इसके विपरीत, AUTOSAR स्पष्ट रूप से एक मूव कंस्ट्रक्टर [SWS_CORE_06546] और एक मानक मूव असाइनमेंट ऑपरेटर [SWS_CORE_00066] को परिभाषित करता है। कंटेनरों के कॉपी संचालन में, विधि select_on_container_copy_construction() एक संगत एलोकेटर इंस्टेंस बनाती है [SWS_CORE_06573]।

समवर्ती के संबंध में, डिफ़ॉल्ट और रूपांतरण कंस्ट्रक्टर्स के साथ-साथ मेमोरी संसाधन की क्वेरी को थ्रेड-सुरक्षित ([SWS_CORE_06541], [SWS_CORE_06542], [SWS_CORE_06544], [SWS_CORE_06557]) के रूप में निर्दिष्ट किया गया है। इसके विपरीत, मूव ऑपरेशन्स ([SWS_CORE_06546]), कॉपी चयन ([SWS_CORE_06573]) और सभी आवंटन, निर्माण और डी-आवंटन ऑपरेशन्स गैर-थ्रेड-सुरक्षित घोषित किए गए हैं।

उपयोग पथ

नियमित क्रम में मेमोरी का प्रावधान, ऑब्जेक्ट्स का निर्माण और साथ ही उनका बाद में विनाश और रिलीज शामिल है:

  • मेमोरी आवंटन: प्रकार Tp के n ऑब्जेक्ट्स के लिए कच्ची मेमोरी का अनुरोध allocate() [SWS_CORE_06547] के माध्यम से किया जाता है। वैकल्पिक रूप से, संरेखण [SWS_CORE_06549] के साथ बाइट-सटीक आवंटन के लिए allocate_bytes() और टाइप्ड आवंटन के लिए टेम्प्लेट allocate_object() उपलब्ध हैं [SWS_CORE_06551]।
  • ऑब्जेक्ट आरंभीकरण: विधि construct() पहले से आवंटित मेमोरी क्षेत्र [SWS_CORE_06555] पर ऑब्जेक्ट बनाती है। एक संयुक्त ऑपरेशन के रूप में, new_object() एक ही कॉल [SWS_CORE_06553] में आवंटन और इन-प्लेस निर्माण प्रदान करता है।
  • विनाश और विमोचन: विनाश destroy() [SWS_CORE_06556] के माध्यम से होता है, जिसके बाद deallocate() [SWS_CORE_06548], deallocate_bytes() [SWS_CORE_06550] या deallocate_object() [SWS_CORE_06552] के माध्यम से विमोचन होता है। दोनों को वैकल्पिक रूप से delete_object() [SWS_CORE_06554] के साथ जोड़ा जा सकता है।
आवंटन, निर्माण, विनाश और विमोचन का प्रवाहकॉलरPolymorphicAllocatorMemoryResourceallocate(n)Speicher anfordernSpeicheradresseTp* (या nullptr)construct(p, args...)Objektkonstruktiondestroy(p)Objektdestruktiondeallocate(p, n)Speicher freigeben

अनुक्रम आरेख: आवंटन, निर्माण, विनाश और विमोचन का विशिष्ट प्रवाह। स्रोत: [SWS_CORE_06547], [SWS_CORE_06548], [SWS_CORE_06555], [SWS_CORE_06556]।

त्रुटि परिदृश्य

अपवाद-मुक्त प्रणालियों की सख्त आवश्यकताओं को पूरा करने के लिए यह क्लास आवश्यक त्रुटि प्रबंधन तंत्रों में ISO-C++ मानक से भिन्न है:

  • आवंटन पर अपवादों की अनुपस्थिति: सभी आवंटन विधियाँ (allocate() [SWS_CORE_06547], allocate_bytes() [SWS_CORE_06549] और allocate_object() [SWS_CORE_06551]) noexcept हैं। यदि मेमोरी आरक्षण विफल हो जाता है, तो किसी अपवाद के बजाय एक nullptr लौटाया जाता है। आगे उपयोग से पहले कॉलर को निश्चित रूप से पॉइंटर को सत्यापित करना होगा। प्रश्न Q-a12cbeeba5edd1d0 (खुला)
  • सशर्त अपवाद सुरक्षा: निर्माण और विनाश दिनचर्याएँ (construct() [SWS_CORE_06555], destroy() [SWS_CORE_06556], new_object() [SWS_CORE_06553] और delete_object() [SWS_CORE_06554]) प्रभावित प्रकारों के std::is_nothrow_constructible या std::is_nothrow_destructible के आधार पर सशर्त रूप से noexcept हैं। new_object() के विफल होने पर, nullptr भी वापस कर दिया जाता है [SWS_CORE_06553]।
  • डी-आवंटन पर त्रुटि दमन: यदि विमोचन संचालन विफल हो जाते हैं, तो deallocate() [SWS_CORE_06548], deallocate_bytes() [SWS_CORE_06550], deallocate_object() [SWS_CORE_06552] और delete_object() [SWS_CORE_06554] में होने वाली त्रुटियों को बिना किसी अपवाद के चुपचाप अनदेखा कर दिया जाता है।

यह गाइड AUTOSAR R25-11 से ara::core::PolymorphicAllocator के विनिर्देश पर आधारित है और स्वचालित रूप से तैयार किया गया था।

सदस्य मानचित्र

कंस्ट्रक्टर और डिस्ट्रक्टर

1

ऑपरेटर

1

टाइप उपनाम

1

क्लास आरेख

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()

विवरण दृश्य

रूपरेखा में कोई प्रविष्टि चुनें।

कंस्ट्रक्टर और डिस्ट्रक्टर

PolymorphicAllocator फ़ंक्शन 5

≙ [mem.poly.allocator.class]

ओवरलोड 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

मेथड

allocate फ़ंक्शन

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;
allocate_bytes फ़ंक्शन

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;
allocate_object फ़ंक्शन

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 फ़ंक्शन

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 फ़ंक्शन

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;
deallocate_bytes फ़ंक्शन

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;
deallocate_object फ़ंक्शन

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 फ़ंक्शन

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 फ़ंक्शन

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 फ़ंक्शन

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 फ़ंक्शन

≙ [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;

ऑपरेटर

operator= फ़ंक्शन 2

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

ओवरलोड = 2
PolymorphicAllocator & operator= (PolymorphicAllocator &&other) noexcept=default; SWS_CORE_00066

टाइप उपनाम

value_type टाइप उपनाम

≙ [mem.poly.allocator.class]

using value_type = Tp;

मेथड का प्रलेखन

फ़ंक्शन 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#ec6bacc0
Content hash
ec6bacc0
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

फ़ंक्शन 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#178dfd76
Content hash
178dfd76
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

फ़ंक्शन 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#d787509c
Content hash
d787509c
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

फ़ंक्शन 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#d912c2dc
Content hash
d912c2dc
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

फ़ंक्शन 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#44a3924a
Content hash
44a3924a
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: e24ff27c5b25 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

वर्ग ara::core::PolymorphicAllocator का सदस्य फलन allocate प्रकार Tp [SWS_CORE_06547] की n वस्तुओं के लिए असारंभीकृत (uninitialized) मेमोरी के समकालिक अनुरोध के लिए कार्य करता है। यह [mem.poly.allocator.class] की कार्यक्षमता पर आधारित है, लेकिन noexcept के रूप में घोषणा और [[nodiscard]] विशेषता के माध्यम से लक्षित रूप से C++ मानक से विचलित होता है [SWS_CORE_06547]।

त्रुटि की स्थिति में, allocate std::bad_alloc जैसा कोई अपवाद नहीं फेंकता है, बल्कि इसके बजाय nullptr लौटाता है [SWS_CORE_06547]। [[nodiscard]] के कारण, मेमोरी क्षेत्र का उपयोग करने से पहले कॉलर को वापसी मान को स्पष्ट रूप से प्राप्त करना होगा और nullptr के लिए जाँचना होगा [SWS_CORE_06547]। समवर्तीता के संबंध में, फलन को अपवाद-सुरक्षित (Exception-Safe) के रूप में वर्गीकृत किया गया है, लेकिन इसे गैर-थ्रेड-सुरक्षित (not thread-safe) माना जाता है [SWS_CORE_06547]। व्याख्या: विभिन्न थ्रेड्स से समान एलोकेटर के माध्यम से एक समकालिक कॉल के लिए कॉलर द्वारा बाहरी सुरक्षा की आवश्यकता हो सकती है। प्रश्न Q-b00116faadf930fe (खुला)

अपवादों के बिना यह त्रुटि-सहिष्णु व्यवहार सीधे इंटरफ़ेस ara::core::MemoryResource::allocate [SWS_CORE_06503] से मेल खाता है, जिसे noexcept के रूप में भी परिभाषित किया गया है और त्रुटि की स्थिति में nullptr लौटाता है। पूर्वनिर्धारित इंस्टेंस जैसे NullMemoryResource [SWS_CORE_06563] भी इस सिद्धांत का उपयोग करते हैं और आवंटन कॉल पर लगातार nullptr लौटाते हैं। उच्च स्तर पर, यह तंत्र ara::core::Vector [SWS_CORE_01315] जैसे कंटेनरों के साथ इंटरैक्ट करता है, जिनके असाइनमेंट ऑपरेटर ऐसे आवंटन गुणों के साथ संरेखित होते हैं।

यह पाठ स्वचालित रूप से तैयार किया गया था। AUTOSAR विनिर्देश ही प्रामाणिक है।

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#42182c66
Content hash
42182c66
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: ed713f104c1d उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

क्लास ara::core::PolymorphicAllocator का मेंबर फ़ंक्शन allocate_bytes निर्दिष्ट अलाइनमेंट alignment के साथ nbytes के आकार में रॉ मेमोरी आरक्षित करता है [SWS_CORE_06549]। अलाइनमेंट का डिफ़ॉल्ट मान alignof(std::max_align_t) से मेल खाता है [SWS_CORE_06549]। फ़ंक्शन हेडर ara/core/memory_resource.h के माध्यम से शामिल किया जाता है और सिंक्रोनस रूप से निष्पादित होता है [SWS_CORE_06549]।

त्रुटि प्रबंधन और सिमेंटिक्स

[mem.poly.allocator.class] के अनुसार मानक व्यवहार के विपरीत, कार्यान्वयन में दो विचलन शामिल हैं [SWS_CORE_06549]:

  • फ़ंक्शन को noexcept के रूप में घोषित किया गया है और यह कोई अपवाद नहीं फेंकता है [SWS_CORE_06549]।
  • यदि आवंटन विफल हो जाता है, तो फ़ंक्शन अपवाद ट्रिगर करने के बजाय nullptr लौटाता है [SWS_CORE_06549]।

विशेषता [[nodiscard]] के कारण, कॉलर द्वारा रिटर्न मान का मूल्यांकन किया जाना चाहिए, विशेष रूप से मेमोरी क्षेत्र [SWS_CORE_06549] तक पहुँचने से पहले nullptr के लिए जाँच करके।

समवर्तीता और प्रतिबंध

थ्रेड सुरक्षा के संबंध में, मेथड को not thread-safe के रूप में निर्दिष्ट किया गया है [SWS_CORE_06549]। इसलिए, समान इंस्टेंस पर समानांतर कॉल के लिए संभवतः बाहरी सिंक्रोनाइज़ेशन की आवश्यकता होती है [SWS_CORE_06549]। प्रश्न Q-85c74d55563cae38 (खुला) अपवाद सुरक्षा के संबंध में, ऑपरेशन को exception safe माना जाता है [SWS_CORE_06549]।

यह पाठ विनिर्देश के आधार पर AI द्वारा तैयार किया गया था।

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#f6f01feb
Content hash
f6f01feb
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: c04a4d5d02ff उद्गम खुले प्रश्न (2)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

टेम्पलेट मेंबर फ़ंक्शन allocate_object क्लास ara::core::PolymorphicAllocator का हिस्सा है और हेडर फ़ाइल #include "ara/core/memory_resource.h" के माध्यम से प्रदान किया जाता है [SWS_CORE_06551]। यह प्रकार T के n ऑब्जेक्ट्स के लिए सिंक्रोनस रूप से मेमोरी आवंटित करता है, जहाँ पैरामीटर n डिफ़ॉल्ट रूप से मान 1 पर सेट होता है [SWS_CORE_06551]। कंपाइलर विशेषता [[nodiscard]] कॉलर्स को लौटाए गए टाइप्ड पॉइंटर T* को अनदेखा न करने के लिए बाध्य करती है।

त्रुटि प्रबंधन

विनिर्देश मानक [mem.poly.allocator.class] से दो स्पष्ट विचलनों को परिभाषित करता है [SWS_CORE_06551]:

  • कोई अपवाद नहीं: फ़ंक्शन को noexcept के रूप में घोषित किया गया है और अपवाद-सुरक्षित (exception safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_06551]।
  • त्रुटि की स्थिति में शून्य पॉइंटर: यदि मेमोरी आवंटन विफल हो जाता है, तो कोई अपवाद नहीं फेंका जाता है, बल्कि अनिवार्य रूप से nullptr लौटाया जाता है [SWS_CORE_06551]।

इसलिए कॉलर को आगे उपयोग से ठीक पहले प्राप्त पॉइंटर की nullptr के लिए जाँच करनी चाहिए।

समवर्तीता और प्रतिबंध

ऑपरेशन को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_06551]। डेटा रेस से बचने के लिए, एक ही एलोकेटर इंस्टेंस के समवर्ती उपयोग के मामले में बाहरी सिंक्रोनाइज़ेशन की आवश्यकता हो सकती है। इसके अतिरिक्त, फ़ंक्शन केवल मेमोरी आरक्षित करता है (व्याख्या: आरक्षित मेमोरी में ऑब्जेक्ट्स का निर्माण अनुवर्ती तंत्रों का दायित्व है)। प्रश्न Q-c41df2caaeb4c503 (खुला)

यह पाठ एक AI द्वारा तैयार किया गया था और 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#04f6e338
Content hash
04f6e338
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: b824902bd6dd उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::PolymorphicAllocator ([SWS_CORE_06555]) का टेम्पलेट फ़ंक्शन construct तर्कों args... को अग्रेषित करते हुए पास किए गए मेमोरी पते p पर प्रकार T का एक ऑब्जेक्ट सिंक्रोनस रूप से बनाने का काम करता है। यह हेडर ara/core/memory_resource.h के माध्यम से परिभाषित है और मुख्य रूप से [mem.poly.allocator.class] के विनिर्देशों का अनुसरण करता है।

C++ मानक से एक स्पष्ट विचलन अपवाद प्रबंधन से संबंधित है: [SWS_CORE_06555] के अनुसार फ़ंक्शन को सशर्त रूप से noexcept के रूप में घोषित किया गया है, जो इस बात पर निर्भर करता है कि क्या std::is_nothrow_constructible<T, Args...>::value लागू होता है। विनिर्देश इस प्रकार इसे conditionally exception safe विशेषता प्रदान करता है। व्याख्या: जब तक T को अपवाद-मुक्त रूप से निर्मित नहीं किया जा सकता, तब तक कोई भी कंस्ट्रक्टर अपवाद बिना किसी रुकावट के कॉलर तक प्रसारित हो सकते हैं, क्योंकि कोई आंतरिक त्रुटि कोड या अलग कैप्चर तंत्र परिभाषित नहीं हैं। प्रश्न Q-ad77510f396e59ae (खुला)

कनकरेंसी और सीमा शर्तों के संबंध में, construct को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में निर्दिष्ट किया गया है ([SWS_CORE_06555])। समान Allocator इंस्टेंस या समान मेमोरी क्षेत्र पर समानांतर एक्सेस के मामले में, कॉल संदर्भ में बाहरी सिंक्रोनाइज़ेशन अनिवार्य रूप से आवश्यक है।

प्रकार-निर्भर noexcept घोषणा का आर्किटेक्चर पैटर्न ara::core के सम्मेलनों के अनुरूप है, जैसा कि अन्य बातों के अलावा ara::core::Result के कंस्ट्रक्टरों में भी उपयोग किया जाता है ([SWS_CORE_00725], [SWS_CORE_00726])।

यह उपयोग नोट स्वचालित रूप से जनरेट किया गया था और पूरी तरह से 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#5631b5bf
Content hash
5631b5bf
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 2c2725501203 उद्गम
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

वर्ग ara::core::PolymorphicAllocator का सदस्य फलन deallocate पता p से शुरू होकर प्रकार Tp की n वस्तुओं के लिए पहले से आवंटित मेमोरी को मुक्त करता है [SWS_CORE_06548]। घोषणा हेडर ara/core/memory_resource.h [SWS_CORE_06548] के माध्यम से की जाती है। फलन मूल रूप से [mem.poly.allocator.class] के अनुसार मानक C++ एलोकेटर के सिमेंटिक्स का पालन करता है, लेकिन इसमें दो विशिष्ट विचलन हैं [SWS_CORE_06548]।

त्रुटि प्रबंधन और अपवाद सुरक्षा

एक प्रमुख विचलन के रूप में, ऑपरेशन को noexcept के रूप में घोषित किया गया है और अपवाद-सुरक्षित (exception safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_06548]। यदि मेमोरी को मुक्त करना विफल हो जाता है, तो होने वाली त्रुटियों को बिना किसी सूचना के अनदेखा कर दिया जाता है (silently ignored), ताकि न तो कोई अपवाद फेंका जाए और न ही कोई स्पष्ट त्रुटि कोड वापस रिपोर्ट किया जाए [SWS_CORE_06548]।

समवर्तीता और परस्पर क्रिया

कॉल संदर्भ के संबंध में, deallocate को गैर-थ्रेड-सुरक्षित (not thread-safe) के रूप में वर्गीकृत किया गया है [SWS_CORE_06548]। मेमोरी प्रबंधन अवधारणा में, यह फलन अंतर्निहित बेस क्लास ara::core::MemoryResource [SWS_CORE_06504] के मेथड deallocate से मेल खाता है, जिसके लिए noexcept और मौन त्रुटि प्रबंधन के संबंध में समान विचलन लागू होते हैं।

यह उपयोग नोट स्वचालित रूप से बनाया गया था और यह पूरी तरह से 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#4f142ceb
Content hash
4f142ceb
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: faf22ebd97f2 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::PolymorphicAllocator का फ़ंक्शन deallocate_bytes [SWS_CORE_06550] के अनुसार पहले आवंटित मेमोरी क्षेत्र को मुक्त करने का काम करता है। यह हेडर ara/core/memory_resource.h के माध्यम से प्रदान किया जाता है और मूल रूप से [mem.poly.allocator.class] के सिमेंटिक्स पर आधारित है।

कॉल सिंक्रोनस रूप से होती है और [SWS_CORE_06550] के अनुसार निम्नलिखित पैरामीटरों की अपेक्षा करती है:

  • p: मुक्त किए जाने वाले मेमोरी क्षेत्र का पॉइंटर (void*)।
  • nbytes: बाइट्स में मुक्त की जाने वाली मेमोरी का आकार (std::size_t)।
  • alignment: वांछित अलाइनमेंट (डिफ़ॉल्ट मान alignof(std::max_align_t))।

त्रुटि व्यवहार के संबंध में, कार्यान्वयन मानक से विशिष्ट विचलन प्रदर्शित करता है: फ़ंक्शन को noexcept के रूप में घोषित किया गया है और इसे अपवाद-सुरक्षित (exception safe) माना जाता है। यदि डीअलोकेशन विफल हो जाता है, तो उत्पन्न होने वाली त्रुटियों को [SWS_CORE_06550] के अनुसार चुपचाप अनदेखा (silently ignored) कर दिया जाता है। कोई अपवाद नहीं फेंके जाते हैं और कोई रिटर्न मान प्रदान नहीं किए जाते हैं।

कनकरेंसी और सीमाओं के संबंध में, फ़ंक्शन को स्पष्ट रूप से थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_06550]। इसलिए, बाहरी सिंक्रोनाइज़ेशन के बिना समान एलोकेटर इंस्टेंस पर समवर्ती एक्सेस से अपरिभाषित व्यवहार (undefined behavior) हो सकता है। प्रश्न Q-33c80e3bb50ed64f (खुला)

यह उपयोग नोट रिलीज़ 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#226ace9e
Content hash
226ace9e
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: d1e41bdb2142 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::PolymorphicAllocator का टेम्पलेट फ़ंक्शन deallocate_object पहले से आरक्षित ऑब्जेक्ट मेमोरी को मुक्त करने का काम करता है [SWS_CORE_06552]। यह [mem.poly.allocator.class] के अनुसार संबंधित C++ मानक उपयोग पर आधारित है, लेकिन विशिष्ट विचलन प्रदर्शित करता है [SWS_CORE_06552]।

पैरामीटरों और कॉल संदर्भ के संबंध में निम्नलिखित गुण लागू होते हैं [SWS_CORE_06552]:

  • सिग्नेचर: template <class T> void deallocate_object (T *p, std::size_t n=1) noexcept; [SWS_CORE_06552]।
  • हेडर: फ़ंक्शन #include "ara/core/memory_resource.h" के माध्यम से उपलब्ध है [SWS_CORE_06552]।
  • रिटर्न मान: ऑपरेशन कोई रिटर्न मान नहीं देता है (void) [SWS_CORE_06552]।
  • शून्य पॉइंटर व्यवहार: एक स्पष्ट विचलन के रूप में, यह निर्दिष्ट किया गया है कि फ़ंक्शन nullptr पास किए जाने पर प्रभावी होता है या शून्य पॉइंटर का समर्थन करता है (“Function is nullptr”) [SWS_CORE_06552]।

त्रुटि प्रबंधन के संबंध में, फ़ंक्शन को noexcept के रूप में घोषित किया गया है और इसे अपवाद-सुरक्षित (exception safe) माना जाता है [SWS_CORE_06552]। यदि डीअलोकेशन विफल हो जाता है, तो उत्पन्न होने वाली त्रुटियों को चुपचाप अनदेखा कर दिया जाता है (“errors will be silently ignored”), ताकि कोई भी अपवाद बाहर प्रसारित न हो [SWS_CORE_06552]।

एक प्रमुख सीमा के रूप में, deallocate_object को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में वर्गीकृत किया गया है [SWS_CORE_06552]। कई थ्रेड्स से समान Allocator इंस्टेंस पर समानांतर एक्सेस के मामले में, इसलिए कॉल को बाहरी सिंक्रोनाइज़ेशन तंत्रों द्वारा सुरक्षित किया जाना चाहिए।

यह पाठ एक AI द्वारा तैयार किया गया था और पूरी तरह से रिलीज़ 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#a301abec
Content hash
a301abec
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: c42857d5d063 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::PolymorphicAllocator का मेंबर फ़ंक्शन delete_object [SWS_CORE_06554] के अनुसार प्रकार T के उस ऑब्जेक्ट को नष्ट करने और मुक्त करने का काम करता है, जिसे पास किया गया पॉइंटर p संदर्भित करता है। फ़ंक्शन हेडर फ़ाइल #include "ara/core/memory_resource.h" के माध्यम से प्रदान किया जाता है और विशिष्ट विचलनों के साथ [mem.poly.allocator.class] के व्यवहार का अनुसरण करता है।

कॉल संदर्भ और सिमेंटिक्स के संबंध में निम्नलिखित गुण लागू होते हैं:

  • रिटर्न मान और अपवाद: फ़ंक्शन का कोई रिटर्न मान नहीं है (void)। यह विनिर्देश noexcept(std::is_nothrow_destructible<T>::value) के साथ सशर्त रूप से अपवाद-सुरक्षित (conditionally noexcept) है, यानी यह कोई अपवाद नहीं फेंकता है यदि T का डिस्ट्रक्टर गैर-फेंकने वाले (non-throwing) के रूप में घोषित किया गया है [SWS_CORE_06554]।
  • त्रुटि प्रबंधन: यदि ऑपरेशन विफल हो जाता है, तो उत्पन्न होने वाली त्रुटियों को चुपचाप अनदेखा कर दिया जाता है (errors will be silently ignored) [SWS_CORE_06554]। व्याख्या: इस प्रकार विफलता के मामले में कॉलर्स को न तो कोई त्रुटि संदेश प्राप्त होता है और न ही कोई त्रुटि कोड या अपवाद। प्रश्न Q-9393b0f68a055e4b (खुला)
  • थ्रेड सुरक्षा: ऑपरेशन को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में निर्दिष्ट किया गया है [SWS_CORE_06554]। कई थ्रेड्स में एक ही एलोकेटर के समवर्ती उपयोग के मामले में, सिंक्रोनाइज़ेशन कॉलर की जिम्मेदारी है।

यह पाठ R25-11 विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।

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#d51be316
Content hash
d51be316
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: d8b5334c8292 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

क्लास ara::core::PolymorphicAllocator ([SWS_CORE_06556]) का टेम्पलेट मेंबर फ़ंक्शन destroy प्रकार T के उस ऑब्जेक्ट को नष्ट करने का काम करता है, जिसे पॉइंटर p संदर्भित करता है। फ़ंक्शन हेडर ara/core/memory_resource.h में घोषित किया गया है और मूल रूप से [mem.poly.allocator.class] ([SWS_CORE_06556]) के मानकीकृत व्यवहार का अनुसरण करता है। मेथड कॉल कोई रिटर्न मान नहीं देती है और कॉलिंग थ्रेड के संदर्भ में सिंक्रोनस रूप से निष्पादित होती है। व्याख्या: यहाँ यह मान लिया गया है कि p पहले से इंस्टेंसिएट किए गए एक मान्य ऑब्जेक्ट को संदर्भित करता है। प्रश्न Q-a4faf7034eb683dd (खुला)

त्रुटि प्रबंधन और अपवाद सुरक्षा

त्रुटि प्रबंधन के संबंध में, फ़ंक्शन को सशर्त रूप से अपवाद-सुरक्षित (conditionally exception safe) के रूप में वर्गीकृत किया गया है ([SWS_CORE_06556])। मानक आवश्यकता [mem.poly.allocator.class] से एक विशिष्ट विचलन के रूप में, destroy को सशर्त रूप से noexcept(std::is_nothrow_destructible<T>::value) के साथ घोषित किया गया है ([SWS_CORE_06556])। यदि पास किए गए प्रकार T का डिस्ट्रक्टर कोई अपवाद नहीं फेंकता है, तो पूरी कॉल के लिए अपवाद-मुक्त स्थिति लागू होती है; अन्यथा डिस्ट्रक्टर से उत्पन्न होने वाले अपवाद बाहर निकल सकते हैं।

समवर्तीता और प्रतिबंध

कनकरेंसी व्यवहार के संबंध में, destroy को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में निर्दिष्ट किया गया है ([SWS_CORE_06556])। यदि एकाधिक थ्रेड्स एक साथ ara::core::PolymorphicAllocator के समान इंस्टेंस या नष्ट किए जाने वाले ऑब्जेक्ट तक पहुँचते हैं, तो उपयुक्त बाहरी सिंक्रोनाइज़ेशन तंत्र स्थापित किए जाने चाहिए।

यह उपयोग नोट 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#79df488c
Content hash
79df488c
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: d4720bb5fd75 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

क्लास ara::core::PolymorphicAllocator (#include "ara/core/memory_resource.h" में परिभाषित) का टेम्पलेट मेंबर फ़ंक्शन new_object सिंक्रोनस रूप से मेमोरी आवंटित करता है और पास किए गए कंस्ट्रक्टर तर्कों ctor_args के साथ प्रकार T का एक ऑब्जेक्ट बनाता है [SWS_CORE_06553]।

उपयोग मानक [mem.poly.allocator.class] से निम्नलिखित निर्धारणों और विचलनों के अधीन है [SWS_CORE_06553]:

  • कॉल और रिटर्न मान: सफल ऑब्जेक्ट निर्माण पर, नए इंस्टेंस के लिए एक टाइप्ड पॉइंटर T* लौटाया जाता है। विशेषता [[nodiscard]] कॉलर्स को रिटर्न मान का मूल्यांकन करने के लिए बाध्य करती है।
  • त्रुटि प्रबंधन: विफलता की स्थिति में, [mem.poly.allocator.class] से भिन्न, कोई अपवाद ट्रिगर नहीं किया जाता है, बल्कि nullptr लौटाया जाता है। इसलिए कॉलर को एक्सेस से पहले परिणामी पॉइंटर की अनिवार्य रूप से nullptr के लिए जाँच करनी चाहिए।
  • अपवाद सुरक्षा: फ़ंक्शन को सशर्त रूप से अपवाद-सुरक्षित (conditionally exception safe) के रूप में निर्दिष्ट किया गया है। यह केवल और केवल तभी noexcept है जब ऑब्जेक्ट निर्माण स्वयं गारंटी देता है कि कोई अपवाद नहीं फेंका जाएगा (noexcept(std::is_nothrow_constructible<T, CtorArgs...>::value))।
  • कनकरेंसी: फ़ंक्शन को थ्रेड-सुरक्षित नहीं (not thread-safe) के रूप में घोषित किया गया है। व्याख्या: ara::core::PolymorphicAllocator के समान इंस्टेंस पर समवर्ती एक्सेस के मामले में, उपयुक्त बाहरी सिंक्रोनाइज़ेशन के लिए संभवतः कॉलर जिम्मेदार होता है। प्रश्न Q-3d0ecfe34187c91e (खुला)

यह उपयोग नोट 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#c331a45c
Content hash
c331a45c
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

फ़ंक्शन 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#f2ed045a
Content hash
f2ed045a
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

फ़ंक्शन 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#7f3ed062
Content hash
7f3ed062
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

फ़ंक्शन resource [SWS_CORE_06557]

MemoryResource * resource () const noexcept;

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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: 90f4d7f53a57 उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

मेथड resource हेडर फ़ाइल #include "ara/core/memory_resource.h" [SWS_CORE_06557] से क्लास ara::core::PolymorphicAllocator का एक कॉन्सटेंट मेंबर फ़ंक्शन है। यह [mem.poly.allocator.class] के विनिर्देश संदर्भ के अनुसार संबद्ध मेमोरी संसाधन [SWS_CORE_06557] को सिंक्रोनस रूप से प्राप्त करने का काम करता है।

उपयोग और सिग्नेचर

फ़ंक्शन सिग्नेचर MemoryResource * resource () const noexcept; [SWS_CORE_06557] है। कॉल ara::core::PolymorphicAllocator के एक इंस्टेंस पर पैरामीटर-रहित और सिंक्रोनस रूप से की जाती है। रिटर्न मान के रूप में, फ़ंक्शन प्रकार MemoryResource* का एक पॉइंटर लौटाता है [SWS_CORE_06557]। व्याख्या: लौटाया गया पॉइंटर संभवतः सीधे उस ठोस मेमोरी संसाधन को संदर्भित करता है जिसे एलोकेटर मेमोरी ऑपरेशनों के लिए उपयोग करता है। प्रश्न Q-392683a38a4e490b (खुला)

त्रुटि हैंडलिंग और समवर्तीता

  • अपवाद सुरक्षा: फ़ंक्शन को noexcept के रूप में घोषित किया गया है और exception safe के रूप में वर्गीकृत किया गया है [SWS_CORE_06557]। यह कोई अपवाद नहीं फेंकता है, और कोई विशिष्ट त्रुटि कोड परिभाषित नहीं हैं।
  • थ्रेड सुरक्षा: विनिर्देश स्पष्ट रूप से मेथड को thread-safe के रूप में नामित करता है [SWS_CORE_06557]। const के रूप में योग्यता के कारण, एकाधिक थ्रेड्स में समवर्ती रीड एक्सेस सुरक्षित है।

इंटरैक्शन

मॉड्यूल core में, resource वह इंटरफ़ेस प्रदान करता है जिससे ara::core::PolymorphicAllocator द्वारा इनकैप्सुलेटेड MemoryResource को क्वेरी किया जा सके और उसके ऑपरेशनों को संबोधित किया जा सके [SWS_CORE_06557]।

यह उपयोग नोट AUTOSAR Adaptive R25-11 विनिर्देश के आधार पर एक AI द्वारा जनरेट किया गया था।

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#4e4c9fed
Content hash
4e4c9fed
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

फ़ंक्शन 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

एआई-जनित असत्यापित मॉडल: gemini-3.8-flash-medium · प्रयास: medium · तापमान: नियंत्रित नहीं किया जा सकता · प्रॉम्प्ट: c103d893236c उद्गम खुले प्रश्न (1)
जर्मन मार्गदर्शिका से अनूदितgemini-3.8-flash-low · 2026-10-13 · जर्मन मूल

उपयोग

मेंबर फ़ंक्शन select_on_container_copy_construction क्लास ara::core::PolymorphicAllocator के स्कोप से संबंधित है और हेडर फ़ाइल #include "ara/core/memory_resource.h" के माध्यम से घोषित किया जाता है ([SWS_CORE_06573])। कंटेनर के कॉपी निर्माण के दौरान PolymorphicAllocator का एक नया इंस्टेंस बनाने के लिए इसे सिंक्रोनस रूप से कॉल किया जाता है ([SWS_CORE_06573])। कार्यात्मक व्यवहार विनिर्देश [mem.poly.allocator.class] का अनुसरण करता है ([SWS_CORE_06573])। व्याख्या: परिणामी एलोकेटर संभवतः डिफ़ॉल्ट रूप से निर्मित होना चाहिए और इस प्रकार स्रोत कंटेनर के मेमोरी संसाधन की अनिवार्य रूप से प्रतिलिपि बनाने के बजाय डिफ़ॉल्ट मेमोरी संसाधन का उपयोग करना चाहिए। प्रश्न Q-134ed967dc22e133 (खुला)

त्रुटि प्रबंधन और अपवाद सुरक्षा

सामान्य C++ विनिर्देश से एक केंद्रीय विचलन यह है कि AUTOSAR में फ़ंक्शन को स्पष्ट रूप से noexcept के रूप में घोषित किया गया है ([SWS_CORE_06573])। निष्पादन को अपवाद-सुरक्षित (exception safe) के रूप में परिभाषित किया गया है ([SWS_CORE_06573])। विशिष्ट त्रुटि कोड, त्रुटि संकेत के लिए रिटर्न मान या DET अथवा DEM को संदेश इस इंटरफ़ेस के लिए प्रदान नहीं किए गए हैं, क्योंकि कॉल त्रुटि-मुक्त समाप्त होने की गारंटी देती है।

समवर्तीता और प्रतिबंध

विनिर्देश के अनुसार, फ़ंक्शन को not thread-safe के रूप में वर्गीकृत किया गया है ([SWS_CORE_06573])। इसका अर्थ है कि बाहरी सिंक्रोनाइज़ेशन के बिना कई थ्रेड्स से समान PolymorphicAllocator इंस्टेंस पर समवर्ती कॉल डेटा रेस का कारण बन सकती हैं। समवर्ती परिवेशों में कंटेनर की प्रतिलिपि बनाने से पहले, उपयोगकर्ता द्वारा एलोकेटर ऑब्जेक्ट तक पहुँच को सुरक्षित किया जाना चाहिए।

यह उपयोग नोट रिलीज़ R25-11 के लिए AUTOSAR विनिर्देश के आधार पर स्वचालित रूप से तैयार किया गया था।

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#eceb4e39
Content hash
eceb4e39
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

टाइप उपनामों का प्रलेखन

टाइप उपनाम 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#c635ee5e
Content hash
c635ee5e
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