Fixed the memory access violation in AllocationManager
This commit is contained in:
@@ -171,7 +171,7 @@ public static unsafe class AllocationManager
|
|||||||
private static volatile bool s_initialized;
|
private static volatile bool s_initialized;
|
||||||
|
|
||||||
private static nuint s_threadLocalStackSize;
|
private static nuint s_threadLocalStackSize;
|
||||||
private static readonly SpinLock s_stackLocker = new SpinLock(false);
|
private static SpinLock s_stackLocker = new SpinLock(false);
|
||||||
private static VirtualStack** s_ppStack;
|
private static VirtualStack** s_ppStack;
|
||||||
private static int s_ppStackCount;
|
private static int s_ppStackCount;
|
||||||
private static int s_ppStackCapacity;
|
private static int s_ppStackCapacity;
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ public class TestAllocationManager
|
|||||||
|
|
||||||
Assert.IsFalse(ptr1.IsCreated);
|
Assert.IsFalse(ptr1.IsCreated);
|
||||||
Assert.IsFalse(ptr2.IsCreated);
|
Assert.IsFalse(ptr2.IsCreated);
|
||||||
|
|
||||||
|
AllocationManager.ResetTempAllocator();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
|
|||||||
Reference in New Issue
Block a user