Removed the `CeilPow2` method and its associated using directive from `MathUtilities.cs`. Removed the entire content of the `Misaki.HighPerformance.Mathematics.csproj` file. Added new classes and structures Added a new `MemoryLeakException` class to handle memory leak reporting in `MemoryLeakException.cs`. Added a new `AllocationInfo` struct to store allocation details in `AllocationManager.cs`. Changed memory management logic Changed memory allocation handling in `Program.cs` by introducing `unfreeArray` and `unfreeList`. Changed the `_allocated` dictionary in `AllocationManager.cs` from `UnsafeHashMap` to `Dictionary` and updated allocation logic to store `AllocationInfo`. Modified allocation and reallocation logic in `AllocationManager` to include stack trace information in debug mode. Updated disposal logic in `AllocationManager` to throw a `MemoryLeakException` for unfreed allocations.
10 lines
319 B
C#
10 lines
319 B
C#
using Misaki.HighPerformance.Unsafe.Collections;
|
|
using Misaki.HighPerformance.Unsafe.Services;
|
|
|
|
AllocationManager.Initialize(100);
|
|
|
|
var unfreeArray = new UnsafeArray<int>(10, Allocator.Persistent);
|
|
var unfreeList = new UnsafeList<int>(10, Allocator.Persistent);
|
|
//unfreeArray.Dispose();
|
|
AllocationManager.Dispose();
|