Class SlabMemoryPool<T>
- Namespace
- MarymoorStudios.Core
- Assembly
- MarymoorStudios.Core.dll
public sealed class SlabMemoryPool<T> : MemoryPool<T>, IDisposable where T : unmanaged
Type Parameters
T
- Inheritance
-
MemoryPool<T>SlabMemoryPool<T>
- Implements
- Inherited Members
Constructors
SlabMemoryPool(int, int)
public SlabMemoryPool(int maxSize, int chunksPerSlab)
Parameters
Properties
MaxSize
Returns the maximum buffer size supported by this pool.
public override int MaxSize { get; }
Property Value
Remarks
The buffer size is the maximum number of T
elements that a memory can contain.
Methods
Dispose(bool)
Implements standard Dispose-pattern.
protected override void Dispose(bool disposing)
Parameters
disposing
boolTrue if disposing, false if finalizing.
Remarks
When disposing
is true then managed resources should be released. When
disposing
is false then the object has already gone through garbage collection and only
native resources should be touched.
GetMemory()
public override OwnedMem<T> GetMemory()
Returns
- OwnedMem<T>