feat(lowlevel): add VirtualStack, update allocators, docs

Introduce VirtualStack allocator, refactor memory management to use virtual memory stacks, and update documentation.

Added VirtualStack as a new stack allocator using virtual memory, replaced Stack with VirtualStack in allocation manager and related APIs, and updated TempJobAllocator to use VirtualArena. Introduced AllocationManagerInitOpts for allocator configuration. Replaced ENABLE_COLLECTION_CHECKS with ENABLE_SAFETY_CHECKS for safety checks. Removed Result.cs and updated project files and examples. Added comprehensive README files for all major packages and improved root documentation.

BREAKING CHANGE: Stack allocator replaced by VirtualStack; TempJobAllocator and AllocationManager initialization signatures changed; Result types removed.
This commit is contained in:
2026-03-19 15:38:23 +09:00
parent faf87953a3
commit 69b054e81d
24 changed files with 798 additions and 542 deletions

View File

@@ -38,8 +38,7 @@ public unsafe struct MemoryPool<T, TOpts> : IDisposable
return Allocate(pAllocator, newSize, alignment, allocationOption, pHandle);
}
MemoryHandle newHandle;
var newPtr = Allocate(pAllocator, newSize, alignment, allocationOption, &newHandle);
var newPtr = Allocate(pAllocator, newSize, alignment, allocationOption, pHandle);
if (newPtr == null)
{
return null;
@@ -48,7 +47,6 @@ public unsafe struct MemoryPool<T, TOpts> : IDisposable
MemCpy(newPtr, ptr, Math.Min(oldSize, newSize));
Free(pAllocator, ptr, *pHandle);
*pHandle = newHandle;
return newPtr;
}