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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user