Refactor thread cache management in allocators

Refactored thread-local stack allocator in AllocationManager to use ThreadLocalStackPool, removing global stack pointer arrays and locks. In FreeList, replaced fixed-size cache array and maxConcurrencyLevel with a dynamic linked-list system using SharedState and CacheReclaimer for thread cache lifecycle management. Block headers now store cache pointers instead of indices. Updated allocation/free logic and tests accordingly. Bumped assembly version to 3.1.3.
This commit is contained in:
2026-05-02 16:47:50 +09:00
parent d6b4074281
commit 0265a386ba
8 changed files with 170 additions and 237 deletions

View File

@@ -24,6 +24,7 @@ public unsafe struct VirtualStack : IMemoryAllocator<VirtualStack, VirtualStack.
private readonly nuint _originalOffset;
public readonly AllocationHandle AllocationHandle => _handle;
public readonly nuint OriginalOffset => _originalOffset;
internal Scope(VirtualStack* allocator, AllocationHandle handle)
{