Struct ScratchpadAllocator
A fast allocator which allocates memory from its scratchpad.
Implements
Namespace: Unity.Entities
Assembly: solution.dll
Syntax
[BurstCompile]
[GenerateTestsForBurstCompatibility]
public struct ScratchpadAllocator : AllocatorManager.IAllocator
  Properties
| Name | Description | 
|---|---|
| Function | All allocators must implement this property, in order to be installed in the custom allocator table.  | 
      
| Handle | Retrieve the AllocatorHandle associated with this allocator. The handle is used as an index into a global table, for times when a reference to the allocator object isn't available.  | 
      
| IsAutoDispose | Check whether this allocator will automatically dispose allocations.  | 
      
| IsCustomAllocator | Check whether this allocator is a custom allocator.  | 
      
| ToAllocator | Retrieve the Allocator associated with this allocator handle.  | 
      
Methods
| Name | Description | 
|---|---|
| AllocateNativeArray<T>(int) | Allocate a NativeArray of type T from memory that's guaranteed to remain valid until Rewind() is called on the Scratchpad.  | 
      
| AllocateNativeList<T>(int) | Allocate a NativeList of type T from memory that's guaranteed to remain valid until Rewind() is called on the Scratchpad.  | 
      
| Dispose() | Dispose the allocator.  | 
      
| GetAvailableBytes() | Get remaining bytes that are available to allocate.  | 
      
| Initialize(int) | Initializes the allocator. Must be called before first use.  | 
      
| Rewind() | Rewind the allocator; invalidate all allocations made from it.  | 
      
| Try(ref Block) | Try to allocate, free, or reallocate a block of memory.  |