Struct AllocatorManager.AllocatorHandle | Collections | 0.7.1-preview.3
docs.unity3d.com
    Show / Hide Table of Contents

    Struct AllocatorManager.AllocatorHandle

    Which allocator a Block's Range allocates from.

    Namespace: Unity.Collections
    Syntax
    public struct AllocatorHandle

    Fields

    Value

    Index into a function table of allocation functions.

    Declaration
    public ushort Value
    Field Value
    Type Description
    UInt16

    Methods

    Allocate<T>(Int32)

    Allocates a Block of memory from this allocator with requested number of items of a given type.

    Declaration
    public AllocatorManager.Block Allocate<T>(int Items)
        where T : struct
    Parameters
    Type Name Description
    Int32 Items

    Number of items to allocate.

    Returns
    Type Description
    AllocatorManager.Block

    A Block of memory.

    Type Parameters
    Name Description
    T

    Type of item to allocate.

    TryAllocate<T>(out AllocatorManager.Block, Int32)

    Allocates a Block of memory from this allocator with requested number of items of a given type.

    Declaration
    public int TryAllocate<T>(out AllocatorManager.Block block, int Items)
        where T : struct
    Parameters
    Type Name Description
    AllocatorManager.Block block

    Block of memory to allocate within.

    Int32 Items

    Number of items to allocate.

    Returns
    Type Description
    Int32

    Error code from the given Block's allocate function.

    Type Parameters
    Name Description
    T

    Type of item to allocate.

    Extension Methods

    JobNativeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobNativeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, NativeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    JobUnsafeMultiHashMapVisitKeyMutableValue.Schedule<TJob, TKey, TValue>(TJob, UnsafeMultiHashMap<TKey, TValue>, Int32, JobHandle)
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023