![]() |
|
Interfaces for writing custom memory managers. More...
Modules | |
Memory Manager API | |
Functions for defining custom memory managers. | |
Memory Manager Utils | |
Set and unset memory managers, set and get manager payloads, function setters. | |
Native Memory Interface | |
Native alloc, native free, get device id, etc. | |
Interfaces for writing custom memory managers.
Create and set a custom memory manager by first defining the relevant closures for each required function, for example:
Create an af_memory_manager and attach relevant closures:
Set the memory manager to be active, which shuts down the existing memory manager:
Unset to re-create and reset an instance of the default memory manager: