Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckForFreeAddressSpace()

static unsafe void System.Runtime.MemoryFailPoint.CheckForFreeAddressSpace ( ulong size,
bool shouldThrow )
inlinestaticprivate

Definition at line 170 of file MemoryFailPoint.cs.

171 {
172 ulong num2 = (ulong)(LastKnownFreeAddressSpace = (long)MemFreeAfterAddress(null, size));
173 LastTimeCheckingAddressSpace = Environment.TickCount;
174 if (num2 < size && shouldThrow)
175 {
176 throw new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_VAFrag);
177 }
178 }
static unsafe ulong MemFreeAfterAddress(void *address, ulong size)

References System.SR.InsufficientMemory_MemFailPoint_VAFrag, System.Runtime.MemoryFailPoint.LastKnownFreeAddressSpace, System.Runtime.MemoryFailPoint.LastTimeCheckingAddressSpace, System.Runtime.MemoryFailPoint.MemFreeAfterAddress(), and System.Environment.TickCount.

Referenced by System.Runtime.MemoryFailPoint.MemoryFailPoint().