Stateless allocator backed by the platform heap.
More...
#include <mem_alloc.h>
|
| static GAIA_NODISCARD void * | alloc (size_t size) |
| | Allocates an unaligned memory region.
|
| |
| static GAIA_NODISCARD void * | alloc (const char *name, size_t size) |
| | Allocates a named unaligned memory region.
|
| |
| static GAIA_NODISCARD void * | alloc_alig (size_t size, size_t alig) |
| | Allocates an aligned memory region.
|
| |
| static GAIA_NODISCARD void * | alloc_alig (const char *name, size_t size, size_t alig) |
| | Allocates a named aligned memory region.
|
| |
| static void | free (void *ptr) |
| | Releases an unaligned memory region.
|
| |
| static void | free (const char *name, void *ptr) |
| | Releases a named unaligned memory region.
|
| |
| static void | free_alig (void *ptr) |
| | Releases an aligned memory region.
|
| |
| static void | free_alig (const char *name, void *ptr) |
| | Releases a named aligned memory region.
|
| |
Stateless allocator backed by the platform heap.
◆ alloc() [1/2]
| static GAIA_NODISCARD void * gaia::mem::DefaultAllocator::alloc |
( |
const char * |
name, |
|
|
size_t |
size |
|
) |
| |
|
inlinestatic |
Allocates a named unaligned memory region.
- Parameters
-
| name | Allocation name reported to the profiler. |
| size | Number of bytes to allocate. |
- Returns
- Pointer to the allocated region.
◆ alloc() [2/2]
| static GAIA_NODISCARD void * gaia::mem::DefaultAllocator::alloc |
( |
size_t |
size | ) |
|
|
inlinestatic |
Allocates an unaligned memory region.
- Parameters
-
| size | Number of bytes to allocate. |
- Returns
- Pointer to the allocated region.
◆ alloc_alig() [1/2]
| static GAIA_NODISCARD void * gaia::mem::DefaultAllocator::alloc_alig |
( |
const char * |
name, |
|
|
size_t |
size, |
|
|
size_t |
alig |
|
) |
| |
|
inlinestatic |
Allocates a named aligned memory region.
- Parameters
-
| name | Allocation name reported to the profiler. |
| size | Number of bytes to allocate. |
| alig | Required byte alignment. |
- Returns
- Pointer to the allocated region.
◆ alloc_alig() [2/2]
| static GAIA_NODISCARD void * gaia::mem::DefaultAllocator::alloc_alig |
( |
size_t |
size, |
|
|
size_t |
alig |
|
) |
| |
|
inlinestatic |
Allocates an aligned memory region.
- Parameters
-
| size | Number of bytes to allocate. |
| alig | Required byte alignment. |
- Returns
- Pointer to the allocated region.
◆ free() [1/2]
| static void gaia::mem::DefaultAllocator::free |
( |
const char * |
name, |
|
|
void * |
ptr |
|
) |
| |
|
inlinestatic |
Releases a named unaligned memory region.
- Parameters
-
| name | Allocation name reported to the profiler. |
| ptr | Pointer returned by alloc(). |
◆ free() [2/2]
| static void gaia::mem::DefaultAllocator::free |
( |
void * |
ptr | ) |
|
|
inlinestatic |
Releases an unaligned memory region.
- Parameters
-
◆ free_alig() [1/2]
| static void gaia::mem::DefaultAllocator::free_alig |
( |
const char * |
name, |
|
|
void * |
ptr |
|
) |
| |
|
inlinestatic |
Releases a named aligned memory region.
- Parameters
-
| name | Allocation name reported to the profiler. |
| ptr | Pointer returned by alloc_alig(). |
◆ free_alig() [2/2]
| static void gaia::mem::DefaultAllocator::free_alig |
( |
void * |
ptr | ) |
|
|
inlinestatic |
Releases an aligned memory region.
- 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