Table of Contents

Class NormalAllocator<T>

Namespace
ReFuel.Memory
Assembly
ReFuel.dll

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
Inherited Members

Properties

AllocatedBytes

Amount of memory allocated in bytes.

public long AllocatedBytes { get; }

Property Value

long

CapacityBytes

Maximum number of bytes available for this arena.

public long CapacityBytes { get; }

Property Value

long

ComittedBytes

Amount of heap memory comitted for this arena.

public long ComittedBytes { get; }

Property Value

long

Methods

Allocate(int)

public NormalAllocation<T> Allocate(int size)

Parameters

size int

Returns

NormalAllocation<T>

Clear(bool)

Clear all allocations in this arena.

public void Clear(bool uncommit = false)

Parameters

uncommit bool

True 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()