UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
RecastAlloc.h File Reference
#include "CoreMinimal.h"

Go to the source code of this file.

Classes

class  rcIntArray
 A simple dynamic array of integers. More...
 
class  rcScopedDelete< T >
 
class  rcScopedStructArrayDelete< T >
 

Typedefs

typedef void *() rcAllocFunc(int size, rcAllocHint hint)
 A memory allocation function.
 
typedef void() rcFreeFunc(void *ptr)
 

Enumerations

enum  rcAllocHint { RC_ALLOC_PERM , RC_ALLOC_TEMP }
 

Functions

NAVMESH_API void rcAllocSetCustom (rcAllocFunc *allocFunc, rcFreeFunc *freeFunc)
 
voidrcAlloc (int size, rcAllocHint hint)
 
void rcFree (void *ptr)
 
void rcMemCpy (void *dst, void *src, int size)
 

Typedef Documentation

◆ rcAllocFunc

typedef void *() rcAllocFunc(int size, rcAllocHint hint)

A memory allocation function.

See also
rcAllocSetCustom

◆ rcFreeFunc

typedef void() rcFreeFunc(void *ptr)

A memory deallocation function.

Parameters
[in]ptrA pointer to a memory block previously allocated using rcAllocFunc.
See also
rcAllocSetCustom

Enumeration Type Documentation

◆ rcAllocHint

Provides hint values to the memory allocator on how long the memory is expected to be used.

Enumerator
RC_ALLOC_PERM 

Memory will persist after a function call.

RC_ALLOC_TEMP 

Memory used temporarily within a function.

Function Documentation

◆ rcAlloc()

void * rcAlloc ( int  size,
rcAllocHint  hint 
)

Allocates a memory block.

Parameters
[in]sizeThe size, in bytes of memory, to allocate.
[in]hintA hint to the allocator on how long the memory is expected to be in use.
Returns
A pointer to the beginning of the allocated memory block, or null if the allocation failed.
See also
rcFree
rcAllocSetCustom

◆ rcAllocSetCustom()

NAVMESH_API void rcAllocSetCustom ( rcAllocFunc allocFunc,
rcFreeFunc freeFunc 
)

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

Parameters
[in]allocFuncThe memory allocation function to be used by rcAlloc
[in]freeFuncThe memory de-allocation function to be used by rcFree
See also
rcAlloc, rcFree

◆ rcFree()

void rcFree ( void ptr)

Deallocates a memory block.

Parameters
[in]ptrA pointer to a memory block previously allocated using rcAlloc.
See also
rcAlloc
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

◆ rcMemCpy()

void rcMemCpy ( void dst,
void src,
int  size 
)