Recast Navigation  1.0.35
RecastAlloc.cpp File Reference
#include <stdlib.h>
#include <string.h>
#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 rcAllocFuncsRecastAllocFunc = rcAllocDefault
 
static rcFreeFuncsRecastFreeFunc = rcFreeDefault
 

Function Documentation

void* rcAlloc ( size_t  size,
rcAllocHint  hint 
)

Allocates a memory block.

See also
rcAllocSetCustom
static void* rcAllocDefault ( size_t  size,
rcAllocHint   
)
static
void rcAllocSetCustom ( rcAllocFunc allocFunc,
rcFreeFunc freeFunc 
)

Sets the base custom allocation functions to be used by Recast.

See also
rcAlloc, rcFree
void rcFree ( void *  ptr)

Deallocates a memory block.

Warning
This function leaves the value of ptr unchanged. So it still points to the same (now invalid) location, and not to null.
See also
rcAllocSetCustom
static void rcFreeDefault ( void *  ptr)
static

Variable Documentation

rcAllocFunc* sRecastAllocFunc = rcAllocDefault
static
rcFreeFunc* sRecastFreeFunc = rcFreeDefault
static