Recast Navigation
Navigation-mesh Toolset for Games
|
#include "RecastAlloc.h"
Functions | |
static void * | rcAllocDefault (size_t size, rcAllocHint) |
static void | rcFreeDefault (void *ptr) |
void | rcAllocSetCustom (rcAllocFunc *allocFunc, rcFreeFunc *freeFunc) |
Sets the base custom allocation functions to be used by Recast. More... | |
void * | rcAlloc (size_t size, rcAllocHint hint) |
Allocates a memory block. More... | |
void | rcFree (void *ptr) |
Deallocates a memory block. More... | |
Variables | |
static rcAllocFunc * | sRecastAllocFunc = rcAllocDefault |
static rcFreeFunc * | sRecastFreeFunc = rcFreeDefault |
void* rcAlloc | ( | size_t | size, |
rcAllocHint | hint | ||
) |
Allocates a memory block.
[in] | size | The size, in bytes of memory, to allocate. |
[in] | hint | A hint to the allocator on how long the memory is expected to be in use. |
|
static |
void rcAllocSetCustom | ( | rcAllocFunc * | allocFunc, |
rcFreeFunc * | freeFunc | ||
) |
void rcFree | ( | void * | ptr | ) |
Deallocates a memory block.
If ptr
is NULL, this does nothing.
ptr
unchanged. So it still points to the same (now invalid) location, and not to null.[in] | ptr | A pointer to a memory block previously allocated using rcAlloc. |
|
static |
|
static |
|
static |