Class NormalAllocator<T>
An absolutely normal allocator that uses the runtime allocator with no caveats.
public class NormalAllocator<T> : IAllocator<T>, IAllocator, IDisposable where T : struct
Type Parameters
T
The value type.
- Inheritance
-
NormalAllocator<T>
- Implements
-
IAllocator<T>
- Inherited Members
Properties
AllocatedBytes
Amount of memory allocated in bytes.
public long AllocatedBytes { get; }
Property Value
CapacityBytes
Maximum number of bytes available for this arena.
public long CapacityBytes { get; }
Property Value
ComittedBytes
Amount of heap memory comitted for this arena.
public long ComittedBytes { get; }
Property Value
Methods
Allocate(int)
public NormalAllocation<T> Allocate(int size)
Parameters
size
int
Returns
Clear(bool)
Clear all allocations in this arena.
public void Clear(bool uncommit = false)
Parameters
uncommit
boolTrue to uncommit the allocated memory pool
Remarks
Invalidates all allocations.
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()