Improve spin-wait, SPMCQueue, and add UnsafeString/Text

- JobScheduler: dynamic spin-wait thresholds for lower latency; removed SLEEP_THRESHOLD constant.
- SPMCQueue: switched to explicit struct layout, removed manual padding, fixed power-of-two capacity bug.
- WorkerThread: enhanced work-stealing with additional cascade loop.
- AllocationHandle: added IsValid property.
- VirtualMemoryBlock: fixed Dispose to pass correct size to Munmap.
- Added UnsafeString and UnsafeText for zero-allocation string/text handling.
- Updated project metadata, versions, and repository URLs.
- Minor inlining/optimization tweaks in GGXMipGenerationBenchmark.
This commit is contained in:
2026-05-29 00:48:36 +09:00
parent fef20f05b7
commit 7c9612ceb0
9 changed files with 146 additions and 23 deletions

View File

@@ -143,6 +143,8 @@ public readonly unsafe struct AllocationHandle
private readonly ReallocFunc _realloc;
private readonly FreeFunc _free;
public bool IsValid => _alloc != null && _realloc != null && _free != null;
public AllocationHandle(void* state, AllocFunc alloc, ReallocFunc realloc, FreeFunc free)
{
_state = state;