{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Class AllocatorManager | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class AllocatorManager

    Manages custom memory allocators.

    Inheritance
    object
    AllocatorManager
    Namespace: Unity.Collections
    Assembly: solution.dll
    Syntax
    public static class AllocatorManager

    Fields

    Name Description
    FirstUserIndex

    Index in the global function table of the first user-defined allocator.

    Invalid

    Corresponds to Allocator.Invalid.

    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.

    kErrorBufferOverflow

    Memory allocation Buffer Overflow status

    kErrorNone

    Memory allocation Success status

    Methods

    Name Description
    Allocate(AllocatorHandle, int, int, int)

    Allocates memory from an allocator.

    Allocate<T>(AllocatorHandle, int)

    Allocates enough memory for an unmanaged value of a given type.

    Allocate<T>(ref T, int, int, int)

    Allocates memory directly from an allocator.

    ConvertToAllocatorHandle(Allocator)

    Convert an Allocator to an AllocatorHandle, keeping the Version.

    Free(AllocatorHandle, void*)

    Frees an allocation.

    Free(AllocatorHandle, void*, int, int, int)

    Frees an allocation.

    Free<T>(AllocatorHandle, T*, int)

    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.

    UnmanagedUnregister<T>(ref T)

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)