|
|
NVIDIA DriveOS Linux SDK API Reference
|
7.2.5.0 Early Access Release
|
Go to the documentation of this file.
29 #ifndef DW_CORE_DYNAMIC_MEMORY_H_
30 #define DW_CORE_DYNAMIC_MEMORY_H_
43 #define DWALLOC_PRAGMA_COVERITY(s) _Pragma(s)
45 #define DWALLOC_PRAGMA_COVERITY(s)
56 #define DWALLOC_API_PUBLIC \
57 DWALLOC_PRAGMA_COVERITY("coverity compliance deviate autosar_cpp14_a1_1_1 'RFD Accepted: TID-3086'") \
58 __attribute__ ((visibility("default")))
60 #define DWALLOC_API_PUBLIC
79 typedef void* (*dwDynamicMemoryMallocCallback)(
size_t sizeInByte,
void* userData);
108 void*
const userData);
152 void**
const userData);
280 #endif // DW_CORE_DYNAMIC_MEMORY_H_
dwDynamicMemoryError
Error to be reported through error callback.
DWALLOC_API_PUBLIC void dwDynamicMemory_free(void *const ptr)
Release memory chunk previously allocated with dwDynamicMemory_malloc().
DWALLOC_API_PUBLIC bool dwDynamicMemory_getRuntimeMode(dwRuntimeMode *const mode)
Return currently selected runtime mode.
void(* dwDynamicMemoryFreeCallback)(void *addr, void *userData)
@ DW_DYNAMIC_MEMORY_SUCCESS
no error
void *(* dwDynamicMemoryMallocCallback)(size_t sizeInByte, void *userData)
dwRuntimeMode
Context runtime mode.
@ DW_MODE_CLEANUP
Heap memory allocations and deallocations are allowed.
DWALLOC_API_PUBLIC void dwDynamicMemory_getCallbacks(dwDynamicMemoryMallocCallback *const mallocCallback, dwDynamicMemoryFreeCallback *const freeCallback, void **const userData)
Get callbacks and user-defined general pointer previously passed in dwDynamicMemory_initialize.
@ DW_MODE_INIT
Heap memory allocations and deallocations are allowed. Default.
DWALLOC_API_PUBLIC bool dwDynamicMemory_setRuntimeMode(dwRuntimeMode const newMode)
Switch runtime mode for all Driveworks SDK.
void(* dwDynamicMemoryErrorCallback)(dwDynamicMemoryError error, size_t lastRequestedSizeInByte, void *userData)
@ DW_DYNAMIC_MEMORY_FREE_NOT_ALLOWED
Memory release is currently not allowed, because in runtime mode.
@ DW_DYNAMIC_MEMORY_BAD_ALLOC
Memory allocation failed, probably not enough memory.
DWALLOC_API_PUBLIC void * dwDynamicMemory_malloc(size_t const size)
Allocate chunk of memory using allocator passed through dwDynamicMemory_initialize().
@ DW_DYNAMIC_MEMORY_ALLOC_NOT_ALLOWED
Allocation is currently not allowed, because in runtime mode.
DWALLOC_API_PUBLIC void dwDynamicMemory_setErrorCallback(dwDynamicMemoryErrorCallback errorCallback, void *const userData)
Set error callback to be executed on an allocation/free during runtime mode.
DWALLOC_API_PUBLIC void dwDynamicMemory_release(void)
Release dwDynamicMemory.
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
DWALLOC_API_PUBLIC void dwDynamicMemory_initialize(dwDynamicMemoryMallocCallback mallocCallback, dwDynamicMemoryFreeCallback freeCallback, void *const userData)
Initialize dwDynamicMemory with user-defined callback for user space memory allocations.
#define DWALLOC_API_PUBLIC
@ DW_MODE_RUNTIME
Heap memory allocations trigger an error callback.