throw new ArgumentOutOfRangeException("sizeInMegabytes", Environment.GetResourceString("ArgumentOutOfRange_NeedNonNegNum"));
Contract.EndContractBlock();
+#if !FEATURE_PAL // Remove this when CheckForAvailableMemory is able to provide legitimate estimates
ulong size = ((ulong)sizeInMegabytes) << 20;
_reservedMemory = size;
SharedStatics.AddMemoryFailPointReservation((long) size);
_mustSubtractReservation = true;
}
+#endif
}
[System.Security.SecurityCritical] // auto-generated
[System.Security.SecurityCritical] // auto-generated
private static unsafe bool CheckForFreeAddressSpace(ulong size, bool shouldThrow)
{
-#if FEATURE_PAL // Remove this when GlobalMemoryStatusEx is able to provide legitimate estimates
- return true;
-#endif
// Start walking the address space at 0. VirtualAlloc may wrap
// around the address space. We don't need to find the exact
// pages that VirtualAlloc would return - we just need to