Allocator1D

Description

sealed class Tinman.Engine.Rendering.Util.Allocator1D

Derived from

AllocatorBase<int32, int32, RangeI> abstract

Helper class for allocating slot ranges in a one-dimensional linear domain:

+---+---+---+---+---+---+---+---+
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | slots
+---+---+---+---+---+---+---+---+
\_______________________________/
 capacity (here 8)

Public / Constructors

Allocator1​D


public constructor Allocator1D → (2)

capacity opt : int32 = Maths.MaxInt

[>0]
The capacity, in logical allocation slots.

chunk opt : int32 = -1

Specifies the logarithm of base two of the allocator chunk size. Allocations will always be fully contained by a single chunk. If negative, there will be a single chunk.

Creates a new instance of Allocator1D.

The allocator capacity is a logical limit for the total number of slots that can be allocated. For each block that is allocated with IAllocator.Allocate, 4 bytes of memory are used for internal management.