docs.unity.cn
    Show / Hide Table of Contents

    Interface AllocatorManager.IAllocator

    An allocator function pointer.

    Namespace: Unity.Collections
    Syntax
    public interface IAllocator : IDisposable

    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
    Boolean

    ToAllocator

    Cast the Allocator index into Allocator

    Declaration
    Allocator ToAllocator { get; }
    Property Value
    Type Description
    Allocator

    Methods

    Try(ref AllocatorManager.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 AllocatorManager.Block)

    Returns
    Type Description
    Int32

    0 if successful. Otherwise, returns the error code from the allocator function.

    Back to top Copyright © 2022 Unity Technologies
    Generated by DocFX
    on Tuesday, June 14, 2022
    Terms of use