Class AllocatorManager
Manages custom memory allocators.
Namespace: Unity.Collections
Assembly: solution.dll
Syntax
public static class AllocatorManager
Fields
Name | Description |
---|---|
First |
Index in the global function table of the first user-defined allocator. |
Invalid | Corresponds to Allocator.Invalid. |
Max |
Maximum number of user-defined allocators. |
None | Corresponds to Allocator.None. |
Persistent | Corresponds to Allocator.Persistent. |
Temp | Corresponds to Allocator.Temp. |
Temp |
Corresponds to Allocator.TempJob. |
k |
Memory allocation Buffer Overflow status |
k |
Memory allocation Success status |
Methods
Name | Description |
---|---|
Allocate(Allocator |
Allocates memory from an allocator. |
Allocate<T>(Allocator |
Allocates enough memory for an unmanaged value of a given type. |
Allocate<T>(ref T, int, int, int) | Allocates memory directly from an allocator. |
Convert |
Convert an Allocator to an AllocatorHandle, keeping the Version. |
Free(Allocator |
Frees an allocation. |
Free(Allocator |
Frees an allocation. |
Free<T>(Allocator |
Frees an allocation. |
Register<T>(ref T, bool, bool, int) | Saves an allocator's function pointers in a free slot of the global function table. Thread safe. |
Try(ref Block) | Invokes the allocator function of a block. |
Unmanaged |
Removes an allocator's function pointers from the global function table, without managed code |
Unregister<T>(ref T) | Removes an allocator's function pointers from the global function table. |