Added SegmentedPool

This commit is contained in:
Jim
2025-11-04 01:00:03 +00:00
committed by 0xJ1M
parent e5d4a47962
commit 0ba3a9fef5
10 changed files with 1753 additions and 17 deletions

View File

@@ -0,0 +1,16 @@
using System.Runtime.InteropServices;
namespace UnmanagedMMU.Allocators
{
/// <summary>
/// Wrapper class around <see cref="NativeMemory.Alloc(nuint)"/> and <see cref="NativeMemory.Free(void*)"/>.
/// </summary>
internal sealed unsafe class DefaultUnmanagedAllocator : IUnmanagedAllocator
{
/// <inheritdoc/>
public void* Alloc(nuint size) => NativeMemory.Alloc(size);
/// <inheritdoc/>
public void Free(void* ptr) => NativeMemory.Free(ptr);
}
}