Typed allocation facade for allocator adaptors.
More...
#include <mem_alloc.h>
|
| template<typename T , typename Adaptor = DefaultAllocatorAdaptor> |
| static GAIA_NODISCARD T * | alloc (uint32_t cnt=1) |
| | Allocates storage for objects without constructing them.
|
| |
| template<typename T , typename Adaptor = DefaultAllocatorAdaptor> |
| static GAIA_NODISCARD T * | alloc (const char *name, uint32_t cnt=1) |
| | Allocates named storage for objects without constructing them.
|
| |
| template<typename T , typename Adaptor = DefaultAllocatorAdaptor> |
| static GAIA_NODISCARD T * | alloc_alig (size_t alig, uint32_t cnt=1) |
| | Allocates aligned storage for objects without constructing them.
|
| |
| template<typename T , typename Adaptor = DefaultAllocatorAdaptor> |
| static GAIA_NODISCARD T * | alloc_alig (const char *name, size_t alig, uint32_t cnt=1) |
| | Allocates named aligned storage for objects without constructing them.
|
| |
| template<typename Adaptor = DefaultAllocatorAdaptor> |
| static void | free (void *ptr) |
| | Releases storage allocated through an adaptor.
|
| |
| template<typename Adaptor = DefaultAllocatorAdaptor> |
| static void | free (const char *name, void *ptr) |
| | Releases named storage allocated through an adaptor.
|
| |
| template<typename Adaptor = DefaultAllocatorAdaptor> |
| static void | free_alig (void *ptr) |
| | Releases aligned storage allocated through an adaptor.
|
| |
| template<typename Adaptor = DefaultAllocatorAdaptor> |
| static void | free_alig (const char *name, void *ptr) |
| | Releases named aligned storage allocated through an adaptor.
|
| |
Typed allocation facade for allocator adaptors.
◆ alloc() [1/2]
template<typename T , typename Adaptor = DefaultAllocatorAdaptor>
| static GAIA_NODISCARD T * gaia::mem::AllocHelper::alloc |
( |
const char * |
name, |
|
|
uint32_t |
cnt = 1 |
|
) |
| |
|
inlinestatic |
Allocates named storage for objects without constructing them.
- Template Parameters
-
| T | Object type. |
| Adaptor | Allocator adaptor type. |
- Parameters
-
| name | Allocation name reported to the profiler. |
| cnt | Number of objects to reserve storage for. |
- Returns
- Typed pointer to the allocated storage.
◆ alloc() [2/2]
template<typename T , typename Adaptor = DefaultAllocatorAdaptor>
| static GAIA_NODISCARD T * gaia::mem::AllocHelper::alloc |
( |
uint32_t |
cnt = 1 | ) |
|
|
inlinestatic |
Allocates storage for objects without constructing them.
- Template Parameters
-
| T | Object type. |
| Adaptor | Allocator adaptor type. |
- Parameters
-
| cnt | Number of objects to reserve storage for. |
- Returns
- Typed pointer to the allocated storage.
◆ alloc_alig() [1/2]
template<typename T , typename Adaptor = DefaultAllocatorAdaptor>
| static GAIA_NODISCARD T * gaia::mem::AllocHelper::alloc_alig |
( |
const char * |
name, |
|
|
size_t |
alig, |
|
|
uint32_t |
cnt = 1 |
|
) |
| |
|
inlinestatic |
Allocates named aligned storage for objects without constructing them.
- Template Parameters
-
| T | Object type. |
| Adaptor | Allocator adaptor type. |
- Parameters
-
| name | Allocation name reported to the profiler. |
| alig | Required byte alignment. |
| cnt | Number of objects to reserve storage for. |
- Returns
- Typed pointer to the allocated storage.
◆ alloc_alig() [2/2]
template<typename T , typename Adaptor = DefaultAllocatorAdaptor>
| static GAIA_NODISCARD T * gaia::mem::AllocHelper::alloc_alig |
( |
size_t |
alig, |
|
|
uint32_t |
cnt = 1 |
|
) |
| |
|
inlinestatic |
Allocates aligned storage for objects without constructing them.
- Template Parameters
-
| T | Object type. |
| Adaptor | Allocator adaptor type. |
- Parameters
-
| alig | Required byte alignment. |
| cnt | Number of objects to reserve storage for. |
- Returns
- Typed pointer to the allocated storage.
◆ free() [1/2]
template<typename Adaptor = DefaultAllocatorAdaptor>
| static void gaia::mem::AllocHelper::free |
( |
const char * |
name, |
|
|
void * |
ptr |
|
) |
| |
|
inlinestatic |
Releases named storage allocated through an adaptor.
- Template Parameters
-
| Adaptor | Allocator adaptor type. |
- Parameters
-
| name | Allocation name reported to the profiler. |
| ptr | Pointer to release. |
◆ free() [2/2]
template<typename Adaptor = DefaultAllocatorAdaptor>
| static void gaia::mem::AllocHelper::free |
( |
void * |
ptr | ) |
|
|
inlinestatic |
Releases storage allocated through an adaptor.
- Template Parameters
-
| Adaptor | Allocator adaptor type. |
- Parameters
-
◆ free_alig() [1/2]
template<typename Adaptor = DefaultAllocatorAdaptor>
| static void gaia::mem::AllocHelper::free_alig |
( |
const char * |
name, |
|
|
void * |
ptr |
|
) |
| |
|
inlinestatic |
Releases named aligned storage allocated through an adaptor.
- Template Parameters
-
| Adaptor | Allocator adaptor type. |
- Parameters
-
| name | Allocation name reported to the profiler. |
| ptr | Pointer to release. |
◆ free_alig() [2/2]
template<typename Adaptor = DefaultAllocatorAdaptor>
| static void gaia::mem::AllocHelper::free_alig |
( |
void * |
ptr | ) |
|
|
inlinestatic |
Releases aligned storage allocated through an adaptor.
- Template Parameters
-
| Adaptor | Allocator adaptor type. |
- Parameters
-
The documentation for this struct was generated from the following file:
- /home/runner/work/gaia-ecs/gaia-ecs/include/gaia/mem/mem_alloc.h