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

Go to the source code of this file.

Classes

class  dtScopedDelete< T >
 
class  dtIntArray
 A simple dynamic array of integers. More...
 
class  dtChunkArray< T, TAllocHint >
 A simple dynamic array of integers. More...
 

Typedefs

typedef void *() dtAllocFunc(int size, dtAllocHint hint)
 A memory allocation function.
 
typedef void() dtFreeFunc(void *ptr, dtAllocHint hint)
 

Enumerations

enum  dtAllocHint {
  DT_ALLOC_TEMP , DT_ALLOC_PERM_AVOIDANCE , DT_ALLOC_PERM_CROWD , DT_ALLOC_PERM_LOOKUP ,
  DT_ALLOC_PERM_NAVMESH , DT_ALLOC_PERM_NAVQUERY , DT_ALLOC_PERM_NODE_POOL , DT_ALLOC_PERM_PATH_CORRIDOR ,
  DT_ALLOC_PERM_PATH_QUEUE , DT_ALLOC_PERM_PROXIMITY_GRID , DT_ALLOC_PERM_TILE_CACHE_LAYER , DT_ALLOC_PERM_TILE_DATA ,
  DT_ALLOC_PERM_TILE_DYNLINK_OFFMESH , DT_ALLOC_PERM_TILE_DYNLINK_CLUSTER , DT_ALLOC_PERM_TILES , DT_ALLOC_PERM_TILE_LINK_BUILDER
}
 Provides hint values on how the memory is expected to be used. Typically used by external memory allocation and tracking systems. More...
 

Functions

NAVMESH_API void dtAllocSetCustom (dtAllocFunc *allocFunc, dtFreeFunc *freeFunc)
 
NAVMESH_API voiddtAlloc (int size, dtAllocHint hint)
 
NAVMESH_API void dtFree (void *ptr, dtAllocHint hint)
 
NAVMESH_API void dtMemCpy (void *dst, void *src, int size)
 

Typedef Documentation

◆ dtAllocFunc

typedef void *() dtAllocFunc(int size, dtAllocHint hint)

A memory allocation function.

See also
dtAllocSetCustom

◆ dtFreeFunc

typedef void() dtFreeFunc(void *ptr, dtAllocHint hint)

A memory deallocation function.

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

Enumeration Type Documentation

◆ dtAllocHint

Provides hint values on how the memory is expected to be used. Typically used by external memory allocation and tracking systems.

Enumerator
DT_ALLOC_TEMP 

Memory used temporarily within a function.

DT_ALLOC_PERM_AVOIDANCE 
DT_ALLOC_PERM_CROWD 
DT_ALLOC_PERM_LOOKUP 
DT_ALLOC_PERM_NAVMESH 
DT_ALLOC_PERM_NAVQUERY 
DT_ALLOC_PERM_NODE_POOL 
DT_ALLOC_PERM_PATH_CORRIDOR 
DT_ALLOC_PERM_PATH_QUEUE 
DT_ALLOC_PERM_PROXIMITY_GRID 
DT_ALLOC_PERM_TILE_CACHE_LAYER 
DT_ALLOC_PERM_TILE_DATA 
DT_ALLOC_PERM_TILE_DYNLINK_OFFMESH 
DT_ALLOC_PERM_TILE_DYNLINK_CLUSTER 
DT_ALLOC_PERM_TILES 
DT_ALLOC_PERM_TILE_LINK_BUILDER 

Function Documentation

◆ dtAlloc()

NAVMESH_API void * dtAlloc ( int  size,
dtAllocHint  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
dtFree

◆ dtAllocSetCustom()

NAVMESH_API void dtAllocSetCustom ( dtAllocFunc allocFunc,
dtFreeFunc freeFunc 
)

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

Parameters
[in]allocFuncThe memory allocation function to be used by dtAlloc
[in]freeFuncThe memory de-allocation function to be used by dtFree

◆ dtFree()

NAVMESH_API void dtFree ( void ptr,
dtAllocHint  hint 
)

Deallocates a memory block.

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

◆ dtMemCpy()

NAVMESH_API void dtMemCpy ( void dst,
void src,
int  size 
)