DriveWorks SDK Reference
3.0.4260 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.

Macros

#define DWALLOC_API_PUBLIC
 

Typedefs

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)
 

Enumerations

enum  dwDynamicMemoryError {
  DW_DYNAMIC_MEMORY_SUCCESS = 0,
  DW_DYNAMIC_MEMORY_BAD_ALLOC,
  DW_DYNAMIC_MEMORY_ALLOC_NOT_ALLOWED,
  DW_DYNAMIC_MEMORY_FREE_NOT_ALLOWED
}
 Error to be reported through error callback. More...
 
enum  dwRuntimeMode {
  DW_MODE_INIT = 0x0000,
  DW_MODE_RUNTIME = 0x0001,
  DW_MODE_CLEANUP = 0x0002,
  DW_MODE_COUNT = 3
}
 Context runtime mode. More...
 

Functions

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...