PathEngine home previous: Dynamic Linking on GCC Based Platformsnext: Linking with PathEngine Statically
Contents, Programmers Guide, Linking with the SDK, Memory Allocation Hooks

Memory Allocation Hooks

Internal allocations within PathEngine are all made through an allocation mechanism that allows allocations to be redirected to a custom allocator provided by the calling application.

Custom allocators can be set passing an allocator pointer in to DLLExport_Init, in the case of DLL linkage, or by calling PathEngine_SetDefaultAllocator, in the case of linkage with PathEngine as a static library.

This can be used for:

The 'MemoryBenchmark' example project shows a working example of this mechanism, with a custom allocator used in this case to record statistics about the amount of memory allocated.

Some example code for implementing PathEngine custom memory allocators can be found on the iAllocator API reference page.


Documentation for PathEngine release 6.04 - Copyright © 2002-2024 PathEnginenext: Linking with PathEngine Statically