Interface AllocatorManager.IAllocator
An allocator function pointer.
Namespace: Unity.Collections
Assembly: Unity.Collections.dll
Syntax
public interface AllocatorManager.IAllocator
Properties
Function
The allocator function. It can allocate, deallocate, or reallocate.
Declaration
AllocatorManager.TryFunction Function { get; }
Property Value
Type | Description |
---|---|
AllocatorManager.TryFunction |
Handle
This allocator.
Declaration
AllocatorManager.AllocatorHandle Handle { get; set; }
Property Value
Type | Description |
---|---|
AllocatorManager.AllocatorHandle | This allocator. |
IsCustomAllocator
Check whether an allocator is a custom allocator
Declaration
bool IsCustomAllocator { get; }
Property Value
Type | Description |
---|---|
bool |
ToAllocator
Cast the Allocator index into Allocator
Declaration
Allocator ToAllocator { get; }
Property Value
Type | Description |
---|---|
Allocator |
Methods
Try(ref Block)
Invoke the allocator function.
Declaration
int Try(ref AllocatorManager.Block block)
Parameters
Type | Name | Description |
---|---|---|
AllocatorManager.Block | block | The block to allocate, deallocate, or reallocate. See Try(ref Block) |
Returns
Type | Description |
---|---|
int | 0 if successful. Otherwise, returns the error code from the allocator function. |