 |
Newton Dynamics
4.00
|
|
22 #ifndef __ND_MEMORY_H__
23 #define __ND_MEMORY_H__
25 #include "ndCoreStdafx.h"
28 typedef void* (*ndMemAllocCallback) (
size_t size);
29 typedef void (*ndMemFreeCallback) (
void*
const ptr);
37 D_CORE_API
static void*
Malloc(
size_t size);
40 D_CORE_API
static void Free(
void*
const ptr);
43 D_CORE_API
static ndInt32
GetSize(
void*
const ptr);
64 D_CORE_API
static void SetMemoryAllocators(ndMemAllocCallback alloc, ndMemFreeCallback free);
65 D_CORE_API
static void GetMemoryAllocators(ndMemAllocCallback& alloc, ndMemFreeCallback& free);
static D_CORE_API void * Malloc(size_t size)
General Memory allocation function.
Definition: ndMemory.cpp:46
static D_CORE_API ndInt32 GetSize(void *const ptr)
Get memory buffer size previously allocated by Malloc.
Definition: ndMemory.cpp:71
Definition: ndMemory.h:32
static D_CORE_API void SetMemoryAllocators(ndMemAllocCallback alloc, ndMemFreeCallback free)
Install low level system memory allocation functions.
Definition: ndMemory.cpp:82
static D_CORE_API ndUnsigned64 GetMemoryUsed()
Return the total memory allocated by the newton engine and tools.
Definition: ndMemory.cpp:77
static D_CORE_API ndInt32 CalculateBufferSize(size_t size)
Calculate buffer size.
Definition: ndMemory.cpp:41
static D_CORE_API void Free(void *const ptr)
Destroy a memory buffer previously allocated by Malloc.
Definition: ndMemory.cpp:61