DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

DynamicMemory.h File Reference

Detailed Description

NVIDIA DriveWorks API: Core Dynamic Memory

Description: Processes wide dynamic memory API.

Definition in file DynamicMemory.h.

Go to the source code of this file.




typedef void(* dwDynamicMemoryErrorCallback) (dwDynamicMemoryError error, size_t lastRequestedSizeInByte, void *userData)
typedef void(* dwDynamicMemoryFreeCallback) (void *addr, void *userData)
typedef void *(* dwDynamicMemoryMallocCallback) (size_t sizeInByte, void *userData)


enum  dwDynamicMemoryError {
 Error to be reported through error callback. More...
enum  dwRuntimeMode {
  DW_MODE_INIT = 0x0000,
  DW_MODE_RUNTIME = 0x0001,
  DW_MODE_CLEANUP = 0x0002,
 Context runtime mode. More...


DWALLOC_API_PUBLIC void dwDynamicMemory_free (void *ptr)
 Release memory chunk previously allocated with dwDynamicMemory_malloc(). More...
DWALLOC_API_PUBLIC void dwDynamicMemory_getCallbacks (dwDynamicMemoryMallocCallback *mallocCallback, dwDynamicMemoryFreeCallback *freeCallback, void **userData)
 Get callbacks and user-defined general pointer previously passed in dwDynamicMemory_initialize. More...
DWALLOC_API_PUBLIC bool dwDynamicMemory_getRuntimeMode (dwRuntimeMode *mode)
 Return currently selected runtime mode. More...
DWALLOC_API_PUBLIC void dwDynamicMemory_initialize (dwDynamicMemoryMallocCallback mallocCallback, dwDynamicMemoryFreeCallback freeCallback, void *userData)
 Initialize dwDynamicMemory with user-defined callback for user space memory allocations. More...
DWALLOC_API_PUBLIC void * dwDynamicMemory_malloc (size_t size)
 Allocate chunk of memory using allocator passed through dwDynamicMemory_initialize(). More...
DWALLOC_API_PUBLIC void dwDynamicMemory_release ()
 Release dwDynamicMemory. More...
DWALLOC_API_PUBLIC void dwDynamicMemory_setErrorCallback (dwDynamicMemoryErrorCallback errorCallback, void *userData)
 Set error callback to be executed on an allocation error. More...
DWALLOC_API_PUBLIC bool dwDynamicMemory_setRuntimeMode (dwRuntimeMode newMode)
 Switch runtime mode for all Driveworks SDK. More...