docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct Scratchpad

    A scratch pad that contains multiple scratch pad allocators. User can can get a scratch pad allocator from the pad corresponding to its thread index. It automatically invalidates all allocations made from it, when "rewound" by the user.

    Namespace: Unity.Entities
    Assembly: Unity.Entities.dll
    Syntax
    [BurstCompile]
    public struct Scratchpad

    Constructors

    Name Description
    Scratchpad(int, int, bool, int)

    Create a Scratchpad.

    Methods

    Name Description
    Dispose()

    Dispose the Scratchpad. This must be called to unregister and free the ScratchpadAllocators this Scratchpad contains.

    GetScratchpadAllocator()

    Retrieve the ScratchpadAllocator from the Scratchpad with index corresponding to the running thread index.

    GetScratchpadAllocator(int)

    Retrieve the ScratchpadAllocator from the Scratchpad with index corresponding to the running thread index.

    Initialize(int, int, bool, int)

    Initialize a Scratchpad.

    Rewind()

    Rewind the Scratchpad; rewinds all ScratchpadAllocator invalidate all allocations made from it, and potentially also free memory blocks it has allocated from the system.

    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)