AllocatorManager
Manages custom memory allocators.
Read time 1 minuteLast updated 7 days ago
Definition
- Type: Class
- Namespace: Unity.Collections
- Assembly: UnityEngine.ManagedKernelModule
public static class AllocatorManager
Static Fields
Value | Description |
|---|---|
| AudioKernel | Corresponds to Allocator.AudioKernel. |
| FirstUserIndex | Index in the global function table of the first user-defined allocator. |
| Invalid | Corresponds to Allocator.Invalid. |
| kErrorBufferOverflow | Memory allocation Buffer Overflow status |
| kErrorNone | Memory allocation Success status |
| MaxNumCustomAllocators | Maximum number of user-defined allocators. |
| None | Corresponds to Allocator.None. |
| Persistent | Corresponds to Allocator.Persistent. |
| Temp | Corresponds to Allocator.Temp. |
| TempJob | Corresponds to Allocator.TempJob. |
Static Methods
Method | Description |
|---|---|
| Allocate | Allocates memory from an allocator. |
| ConvertToAllocatorHandle | Convert an Allocator to an AllocatorHandle, keeping the Version. |
| Free | Frees an allocation. |
| Initialize | For internal use only. |
| Register | Saves an allocator's function pointers in a free slot of the global function table. Thread safe. |
| Shutdown | For internal use only. |
| Try | Invokes the allocator function of a block. |
| UnmanagedUnregister | Removes an allocator's function pointers from the global function table, without managed code |
| Unregister | Removes an allocator's function pointers from the global function table. |
Structs
Struct | Description |
|---|---|
| AllocatorManager.AllocatorHandle | Represents the allocator function used within an allocator. |
| AllocatorManager.Block | Represents an individual allocation within an allocator. |
| AllocatorManager.BlockHandle | For internal use only. |
| AllocatorManager.Range | A range of allocated memory. |
Interfaces
Interface | Description |
|---|---|
| AllocatorManager.IAllocator | An allocator function pointer. |
Delegates
Delegate | Description |
|---|---|
| AllocatorManager.TryFunction | Used for calling an allocator function. |