Games Task Scheduler (GTS)
A multi-processor scheduling framework for games engines
CMemoryWrapper

Macros

#define GTS_MALLOC(size)   #error "Replace with custom definition"
 Override malloc. More...
 
#define GTS_FREE(ptr)   #error "Replace with custom definition"
 Override free. More...
 
#define GTS_ALIGNED_MALLOC(size, alignment)   #error "Replace with custom definition"
 Override aligned_malloc. More...
 
#define GTS_ALIGNED_FREE(ptr)   #error "Replace with custom definition"
 Override aligned_free. More...
 

Detailed Description

User defined wrappers for the C memory management API.

Macro Definition Documentation

◆ GTS_ALIGNED_FREE

#define GTS_ALIGNED_FREE (   ptr)    #error "Replace with custom definition"

Override aligned_free.

Remarks
Signature:
void alignedfree(void* ptr)
Parameters
ptrA pointer to the memory to free that was allocated with GTS_ALIGNED_MALLOC.

◆ GTS_ALIGNED_MALLOC

#define GTS_ALIGNED_MALLOC (   size,
  alignment 
)    #error "Replace with custom definition"

Override aligned_malloc.

Remarks
Signature:
void* alignedMalloc(size_t size, size_t alignment)
Parameters
sizeThe size of the memory to allocate.
alignmentThe address alignment of the allocated memory.
Returns
A pointer to the memory or nullptr on fail.

◆ GTS_FREE

#define GTS_FREE (   ptr)    #error "Replace with custom definition"

Override free.

Remarks
Signature: void free(void* ptr)
Parameters
ptrA pointer to the memory to free that was allocated with GTS_MALLOC.

◆ GTS_MALLOC

#define GTS_MALLOC (   size)    #error "Replace with custom definition"

Override malloc.

Remarks
Signature:
void* malloc(size_t size)
Parameters
sizeThe size of the memory to allocate.
Returns
A pointer to the memory or nullptr on fail.