26 #define YM_ALLOCATOR_SLOT_REGION_COUNT 4 68 #define YM_MEMORY_TRACKING 70 #ifdef YM_MEMORY_TRACKING 78 #ifdef YM_MEMORY_TRACKING 86 #ifdef YM_MEMORY_TRACKING 87 #define YM_ALLOCATE(allocator, size, ptr) \ 88 ym_allocate(allocator, size, ptr, __FILE__, __LINE__); 90 #define YM_ALLOCATE(allocator, size, ptr) \ 91 ym_allocate(allocator, size, ptr); 94 #ifdef YM_MEMORY_TRACKING 95 #define YM_DEALLOCATE(allocator, size, ptr) \ 96 ym_deallocate(allocator, size, ptr, __FILE__, __LINE__); 98 #define YM_DEALLOCATE(allocator, size, ptr) \ 99 ym_deallocate(allocator, size, ptr); void * mem
Definition: ym_allocator.h:36
u16 used
Definition: ym_allocator.h:38
u16 size
Definition: ym_allocator.h:37
int count
Definition: ym_allocator.h:23
ym_alloc_strategy strategy
Definition: ym_allocator.h:39
int * slot_count
Definition: ym_allocator.h:22
uint16_t u16
Definition: ym_types.h:9
int GLenum UINT size
Definition: wglext.h:321
Definition: ym_allocator.h:28
Definition: ym_allocator.h:16
ym_errc
Used to indicate erroneous behavior within a a function.
Definition: ym_error.h:36
Definition: ym_allocator.h:10
ym_errc ym_allocate(ym_allocator *allocator, int size, void **ptr, char *file, int line)
ym_alloc_strategy
Definition: ym_allocator.h:4
#define YM_ALLOCATOR_SLOT_REGION_COUNT
Definition: ym_allocator.h:26
Definition: ym_allocator.h:7
int id
Definition: ym_allocator.h:32
Definition: ym_allocator.h:9
ym_errc ym_destroy_allocator(ym_allocator *allocator)
Definition: ym_allocator.c:251
ym_errc ym_deallocate(ym_allocator *allocator, int size, void *ptr, char *file, int line)
Definition: ym_allocator.h:8
unsigned uint
Definition: ym_types.h:22
int * slot_size
Definition: ym_allocator.h:21
ym_errc ym_create_allocator(ym_alloc_strategy strategy, void *memory, uint size, ym_allocator_cfg *allocator_cfg, ym_allocator *out_allocator)
Definition: ym_allocator.c:232
uint8_t u8
Definition: ym_types.h:8