13#ifndef ML_MEMORY_ALLOCATOR_H
14#define ML_MEMORY_ALLOCATOR_H
18#include "../mlMemoryManagerDllExport.h"
22typedef void* (*MLAllocationCallback)(
size_t size);
45#ifndef DOXYGEN_SHOULD_SKIP_THIS
54 static unsigned int _alreadyAllocatedMemory;
The memory allocator used by the memory manager.
static void * allocate(size_t size)
Allocate memory of the given size. Uses malloc if no allocationCallback was specified.
static void initialize(MLAllocationCallback allocationCallback, MLDeallocationCallback deallocationCallback)
Initializes the memory allocator.
static void deallocate(void *data)
Deallocate memory. Uses free if no deallocationCallback was specified.
void *(* MLAllocationCallback)(size_t size)
The callback function type for allocating memory of a certain size.
void(* MLDeallocationCallback)(void *data)
The callback function type for deallocating memory.