Remove unused methods and project file

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.
This commit is contained in:
2025-04-03 22:55:48 +09:00
parent 791be1bed2
commit 9eea53d8f1
5 changed files with 94 additions and 39 deletions

View File

@@ -2,7 +2,8 @@
using Misaki.HighPerformance.Unsafe.Services;
AllocationManager.Initialize(100);
var unfreeArray = new UnsafeArray<int>(10, Allocator.Persistent);
//unfreeArray.Dispose();
var unfreeArray = new UnsafeArray<int>(10, Allocator.Persistent);
var unfreeList = new UnsafeList<int>(10, Allocator.Persistent);
//unfreeArray.Dispose();
AllocationManager.Dispose();