52 template <
typename T,
typename ...Args >
53 static T * __accessor_on_construct(
void * data, Args &&... args)
56 auto p = ::new(data) T(::std::forward<Args>(args)...);
63 template <
typename T >
64 static void __accessor_on_destruct(T * p)
72 template <
a_particle PARTICLE,
typename ...Args >
73 static inline PARTICLE * __on_construct(
void * data, memsize s, Args &&... args)
77#if REFERENCING_DEBUGGING
78 __on_start_construct(data, s,
true);
80#if REFERENCING_DEBUGGING
82 auto p = __on_referencing_debugging_construct<PARTICLE>(data, s, ::std::forward<Args>(args)...);
84 __on_after_construct_subparticle(p);
88 auto p = __on_normal_construct<PARTICLE>(data, s, ::std::forward<Args>(args)...);
100 inline static NON_PARTICLE * __on_construct(
void * data, memsize s, Args &&... args)
102#if REFERENCING_DEBUGGING
104 __on_start_construct(data, s,
false);
106#if REFERENCING_DEBUGGING
108 auto p = __on_referencing_debugging_construct<NON_PARTICLE>(data, s, ::std::forward<Args>(args)...);
110 __on_after_construct();
116 return __on_normal_construct<NON_PARTICLE>(data, s, ::std::forward<Args>(args)...);
123 template <
a_particle PARTICLE,
typename ...Args >
124 inline static PARTICLE * __on_referencing_debugging_construct(
void * data, memsize s, Args &&... args)
129 auto p = __accessor_on_construct<PARTICLE>(data, ::std::forward<Args>(args)...);
138 template <
non_particle NON_PARTICLE,
typename ...Args >
139 inline static NON_PARTICLE * __on_referencing_debugging_construct(
void * data, memsize s, Args &&... args)
143#if REFERENCING_DEBUGGING
145 ::allocator::defer_erase_referer();
147 auto p = __accessor_on_construct<NON_PARTICLE>(data, ::std::forward<Args>(args)...);
167 template <
a_particle PARTICLE,
typename ...Args >
168 inline static PARTICLE * __on_normal_construct(
void * data, memsize s, Args &&... args)
173 auto p = __accessor_on_construct<PARTICLE>(data, ::std::forward<Args>(args)...);
175#if REFERENCING_DEBUGGING
176 on_after_construct_particle(p);
184 template <
non_particle NON_PARTICLE,
typename ...Args >
185 inline static NON_PARTICLE * __on_normal_construct(
void * data, memsize s, Args &&... args)
190 auto p = __accessor_on_construct<NON_PARTICLE>(data, ::std::forward <Args>(args)...);
197 template <
typename T >
198 inline static void __on_destruct(T * p)
203 __accessor_on_destruct<T>(p);
208 template <
typename T,
typename ...Args >
209 static ::pointer < T > __allocator_base_allocate(
::heap::allocator_base * pallocatorbase, Args &&... args)
212#if REFERENCING_DEBUGGING
214 auto preferer = ::allocator::get_top_referer();
218 auto p = __allocator_base_new< T >(pallocatorbase, ::std::forward < Args >(args)...);
222#if REFERENCING_DEBUGGING
224 if (!p->is_referencing_debugging_enabled())
227 pointer.m_preferer =
nullptr;
233 pointer.m_preferer = preferer;
239 return ::transfer(pointer);
323 template <
typename T,
typename ...Args >
324 static ::pointer < T > __memory_allocate(::heap::enum_memory ememory, Args &&... args)
327 auto pheapmanagement = ::acme::get()->m_pheapmanagement;
329 auto & pmemory = pheapmanagement->m_memorya[ememory];
331 auto p = ::transfer(__allocator_base_allocate< T >(
333 ::std::forward<Args>(args)...));
335 return ::transfer(p);
340 template <
typename T,
typename ...Args >
341 inline static T * __memory_new(::heap::enum_memory ememory, Args &&... args)
344 auto pheapmanagement = ::acme::get()->m_pheapmanagement;
346 auto & pmemory = pheapmanagement->m_memorya[ememory];
348 auto p = __allocator_base_new < T >(
350 ::std::forward < Args >(args)...);
357 template <
typename T >
358 inline static T * __memory_new_array(::heap::enum_memory ememory, ::collection::count c)
361 auto pheapmanagement = ::acme::get()->m_pheapmanagement;
363 auto & pmemory = pheapmanagement->m_memorya[ememory];
365 auto p = __allocator_base_new_array < T >(
374 template <
typename T >
375 static void __memory_delete(::heap::enum_memory ememory, T * p)
378 auto pheapmanagement = ::acme::get()->m_pheapmanagement;
380 auto & pmemory = pheapmanagement->m_memorya[ememory];
382 __allocator_base_delete< T >(
389 template <
typename T >
390 static void __memory_delete(::heap::enum_memory ememory, T* p,
void * pAllocation)
393 auto pheapmanagement = ::acme::get()->m_pheapmanagement;
395 auto & pmemory = pheapmanagement->m_memorya[ememory];
397 __allocator_base_delete< T >(
405 template <
typename T,
typename ...Args >
406 ::pointer < T >
static __call_allocate(Args &&... args)
409 auto p = ::transfer(__memory_allocate< T >(
410 ::heap::e_memory_main,
411 ::std::forward<Args>(args)...));
413 return ::transfer(p);
418#if REFERENCING_DEBUGGING
421 accessor * __call__add_referer(const ::reference_referer & referer)
const
424#if REFERENCING_DEBUGGING
426 ::allocator::push_referer(referer);
437 template <
typename T,
typename ...Args >
438 inline static T * __call_allocate(Args &&... args)
441 auto p = __memory_new < T >(
442 ::heap::e_memory_main,
443 ::std::forward < Args >(args)...);
450 template <
typename T >
451 inline static T * øallocate_array(::collection::count c)
454 auto p = __memory_new_array < T >(
455 ::heap::e_memory_main,
463 template <
typename T >
464 static void __call__delete(T * p)
467 __memory_delete< T >(
468 ::heap::e_memory_main,
474 template <
typename T >
475 static void __call__delete(T* p,
void * pAllocation)
478 __memory_delete< T >(
479 ::heap::e_memory_main,
Definition _initial_concepts.h:860
Definition _initial_concepts.h:863