Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


AllocatorManager.Block

Represents an individual allocation within an allocator.
Read time 1 minuteLast updated 13 days ago

Definition

public struct AllocatorManager.Block : IDisposable

Remarks

A block consists of a AllocatorManager.Block.Range plus metadata about the type of elements for which the block was allocated.

Fields

Value

Description

AllocatedItemsNumber of items allocated for.
BytesPerItemNumber of bytes per item.
Log2AlignmentLog2 of the byte alignment.
Padding0This field only exists to pad the
Block
struct. Ignore it.
Padding1This field only exists to pad the
Block
struct. Ignore it.
Padding2This field only exists to pad the
Block
struct. Ignore it.
RangeThe range of memory encompassed by this block.

Properties

Property

Description

AlignmentThe alignment.
AllocatedBytesNumber of bytes allocated for this block.
BytesNumber of bytes requested for this block.

Methods

Method

Description

AllocateAllocates this block.
DisposeDeallocates this block.
FreeFrees the block.
TryAllocateAttempts to allocate this block.
TryFreeAttempts to free this block.