diff --git a/Misaki.HighPerformance.LowLevel/Buffer/Stack.cs b/Misaki.HighPerformance.LowLevel/Buffer/Stack.cs index 5d28ea3..1a4d701 100644 --- a/Misaki.HighPerformance.LowLevel/Buffer/Stack.cs +++ b/Misaki.HighPerformance.LowLevel/Buffer/Stack.cs @@ -142,16 +142,8 @@ public unsafe partial struct Stack : IMemoryAllocator } [MethodImpl(MethodImplOptions.AggressiveInlining)] - public void Free(void* ptr) + public readonly void Free(void* ptr) { - if (ptr < _buffer && ptr >= _buffer + _size) - { - Debug.Fail("Attempting to free a pointer that is out of bounds of the current stack allocation."); - return; // Pointer is out of bounds, ignore - } - - var offset = (nuint)((byte*)ptr - _buffer); - _offset = offset < _offset ? offset : _offset; } /// diff --git a/Misaki.HighPerformance.LowLevel/Buffer/VirtualStack.cs b/Misaki.HighPerformance.LowLevel/Buffer/VirtualStack.cs index f06e4e7..3a93852 100644 --- a/Misaki.HighPerformance.LowLevel/Buffer/VirtualStack.cs +++ b/Misaki.HighPerformance.LowLevel/Buffer/VirtualStack.cs @@ -162,16 +162,8 @@ public unsafe struct VirtualStack : IMemoryAllocator= _baseAddress + _committedSize) - { - Debug.Fail("Attempting to free a pointer that is out of bounds of the current stack allocation."); - return; // Pointer is out of bounds, ignore - } - - var offset = (nuint)((byte*)ptr - _baseAddress); - _allocatedOffset = offset < _allocatedOffset ? offset : _allocatedOffset; } public void Dispose() diff --git a/Misaki.HighPerformance.LowLevel/Misaki.HighPerformance.LowLevel.csproj b/Misaki.HighPerformance.LowLevel/Misaki.HighPerformance.LowLevel.csproj index 6233797..620e7c4 100644 --- a/Misaki.HighPerformance.LowLevel/Misaki.HighPerformance.LowLevel.csproj +++ b/Misaki.HighPerformance.LowLevel/Misaki.HighPerformance.LowLevel.csproj @@ -7,7 +7,7 @@ true true Misaki - 1.6.8 + 1.6.9 $(AssemblyVersion) https://git.personalnas.com/Misaki/Misaki.HighPerformance.git https://git.personalnas.com/Misaki/Misaki.HighPerformance.git