Class Arena¶
Namespace: Apogee.Core.Memory
Assembly: Apogee.Core.dll
A fixed-size bump allocator over unmanaged memory. Allocations are zeroed and live until
public sealed class Arena : IDisposable
Inheritance¶
Implements¶
Inherited Members¶
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Constructors¶
Arena(nuint)¶
public Arena(nuint capacity)
Parameters¶
capacity nuint
Properties¶
Capacity¶
public nuint Capacity { get; }
Property Value¶
Mark¶
A position to
public nuint Mark { get; }
Property Value¶
Used¶
public nuint Used { get; }
Property Value¶
Methods¶
Allocate<T>(int)¶
public Span<T> Allocate<T>(int count) where T : unmanaged
Parameters¶
count int
Returns¶
Span<T>
Type Parameters¶
T
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
\~Arena()¶
protected ~Arena()
Reset(nuint)¶
public void Reset(nuint mark = 0)
Parameters¶
mark nuint