UmbraAllocator struct

User provided memory management interface.

UmbraAllocator contains a pair of pointers to functions which Umbra uses to allocate and deallocate memory.

Public variables

void* userData
An arbitrary pointer that Umbra passes to allocate and deallocate.
UmbraAllocateFunc allocate
A user provided function to allocate memory.
UmbraDeallocateFunc deallocate
A user provided function to deallocate memory.

Variable details

UmbraAllocateFunc UmbraAllocator::allocate

A user provided function to allocate memory.

Umbra calls this function to allocate memory. It may return NULL, but Umbra doesn't try to recover from allocation failures.

See UmbraAllocateFunc for a complete description of the function arguments.

UmbraDeallocateFunc UmbraAllocator::deallocate

A user provided function to deallocate memory.

Umbra calls this function to deallocate memory. It should do nothing if ptr is NULL.

See UmbraDeallocateFunc for a complete description of the function arguments.