feat(buffer)!: refactor allocators to use MemoryPool<T>

Refactor memory allocation system to use generic MemoryPool<TAllocator, TOpts> for arena, stack, and free list allocators, replacing custom allocator structs. Introduce MemoryBlock as a safer, more robust replacement for UnTypedArray. Improve thread safety, safety checks, and documentation. Reorder and clarify Allocator enum. Add comprehensive unit tests for all allocators and pointer assertion utilities. Update project to enable safety checks in Debug builds. Remove obsolete interfaces and ensure consistent deallocation with MemoryUtility.Free.

BREAKING CHANGE: Custom allocator structs are removed and replaced with MemoryPool-based abstraction. UnTypedArray is replaced by MemoryBlock. Allocator enum order and semantics are changed. Public API changes may require code updates.
This commit is contained in:
2026-04-04 19:24:02 +09:00
parent 208e1aa975
commit 28e921c48d
18 changed files with 1284 additions and 505 deletions

View File

@@ -22,6 +22,13 @@ jobs:
- name: Restore dependencies
run: dotnet restore
- name: Run tests
# Run all test projects in the repository. If any test fails, this step will exit non-zero
# and subsequent packaging/publish steps will not run.
run: |
echo "Running all tests..."
dotnet test --configuration Release --no-restore
- name: Check, Build, and Pack Projects
env:
NUGET_API_KEY: ${{ secrets.NUGET_TOKEN }}
@@ -93,4 +100,4 @@ jobs:
--source "https://git.personalnas.com/api/packages/Misaki/nuget/index.json" \
--api-key "$NUGET_API_KEY" \
--skip-duplicate
done
done