allocate an array of T sized memory chunks
allocate an array of T sized memory chunks
Invoked when a specific T[] is discarded
Invoked when a specific T[] is discarded
Invoked when clear/reset is called on the host. This is a shortcut to clear everything allocated.
set the chunk size and prepopulate with nodes
Malloc allocation manager.
Note that, due to GC behaviour, you should not configure a custom allocator for containers holding anything managed by the GC. For example, you cannot use a MallocAllocator to manage a container of classes or strings where those were allocated by the GC. Once something is owned by a GC then it's lifetime must be managed by GC-managed entities (otherwise the GC may think there are no live references and prematurely collect container contents).
You can explicity manage the collection of keys and values yourself by providing a reaper delegate. For example, if you use a MallocAllocator to manage key/value pairs which are themselves allocated via malloc, then you should also provide a reaper delegate to collect those as required.