feat(memory): improve oversized alloc handling & cleanup
Enhanced FreeList to handle oversized allocations by bypassing chunk management and allocating directly from the OS, with proper header assignment and immediate release on free. Updated IUnsafeCollection<T> documentation, removed unnecessary array clearing in Clear() methods, refined UnsafeSlotMap initialization logic, and removed redundant default element addition. Bumped assembly version to 1.5.1.
This commit is contained in:
@@ -132,8 +132,8 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
if (!allocationOption.HasFlag(AllocationOption.Clear))
|
||||
{
|
||||
_generations.AsSpan().Clear();
|
||||
_validBits.ClearAll();
|
||||
}
|
||||
_validBits.ClearAll();
|
||||
|
||||
_count = 0;
|
||||
_capacity = capacity;
|
||||
@@ -324,8 +324,6 @@ public unsafe struct UnsafeSlotMap<T> : IUnsafeCollection<T>
|
||||
_validBits.ClearAll();
|
||||
|
||||
_count = 0;
|
||||
|
||||
Add(default, out _);
|
||||
}
|
||||
|
||||
public readonly void* GetUnsafePtr()
|
||||
|
||||
Reference in New Issue
Block a user