docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct AllocatorManager.Range

    A range of allocated memory.

    Namespace: Unity.Collections
    Assembly: Unity.Collections.dll
    Syntax
    public struct AllocatorManager.Range
    Remarks

    The name is perhaps misleading: only in combination with a AllocatorManager.Block does a Range have sufficient information to represent the number of bytes in an allocation. The reason Range is its own type that's separate from Block stems from some efficiency concerns in the implementation details. In most cases, a Range is only used in conjunction with an associated Block.

    Fields

    Allocator

    The allocator function used for this range.

    Declaration
    public AllocatorManager.AllocatorHandle Allocator
    Field Value
    Type Description
    AllocatorManager.AllocatorHandle

    The allocator function used for this range.

    Items

    Number of items allocated in this range.

    Declaration
    public int Items
    Field Value
    Type Description
    int

    Number of items allocated in this range.

    Remarks

    The actual allocation may be larger. See AllocatedItems.

    Pointer

    Pointer to the start of this range.

    Declaration
    public IntPtr Pointer
    Field Value
    Type Description
    IntPtr

    Pointer to the start of this range.

    Methods

    Dispose()

    Deallocates the memory represented by this range.

    Declaration
    public void Dispose()
    Remarks

    Same as disposing the AllocatorManager.Block which contains this range.

    Cannot be used with allocators which need the allocation size to deallocate.

    In This Article
    Back to top
    Copyright © 2024 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)