Added `AllocationHandler` struct for memory allocation management. Added `UnsafeArrayPool` class for pooling `UnsafeArray<T>` instances. Added new `External` option to `Allocator` enum. Added default constructors for `UnsafeList`, `UnsafeQueue`, and `UnsafeStack` using `Persistent` allocator. Changed namespace in `AllocationManager` to `Misaki.HighPerformance.Unsafe.Buffer`. Changed `MemoryLeakException` to use `MemoryLeakExceptionInfo` for better debugging. Changed constructor behavior in `UnsafeArray` to clarify memory management responsibilities. Changed `MemoryUtilities` to include null checks in `Free` and `AlignedFree` methods. Removed unused using directive in `CollectionBenchmark.cs`. Removed initialization of `AllocationManager` in `Program.cs`.
19 lines
478 B
C#
19 lines
478 B
C#
using Misaki.HighPerformance.Unsafe.Collections;
|
|
|
|
namespace Misaki.HighPerformance.Unsafe.Buffer;
|
|
|
|
// TODO: Implement a pool for UnsafeArray<T>.
|
|
public unsafe static class UnsafeArrayPool
|
|
{
|
|
public static UnsafeArray<T> Rent<T>(int minimalSize)
|
|
where T : unmanaged
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
|
|
public static void Return<T>(UnsafeArray<T> array)
|
|
where T : unmanaged
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
} |