Install low level system memory allocation functions.
- Parameters
-
| dMemAllocCallback | alloc: is a function pointer callback to allocate a memory chunk. |
| dMemFreeCallback | free: is a function pointer callback to free a memory chunk. |
All memory allocated by alloc, does not need to be aligned, therefore an application can write them using standard malloc and free. By default the memory allocation is set to call the standard library functions malloc and free, however if an application wants to keep track of how memory is used, it must install the memory callbacks by calling this function before any class of the Newton Engine or tool was created or instantiated. The engine does not do any global allocation using global operators new and delete, therefore it is ok to install the memory allocator on the main of the application or just before start using the engine.