From ea3d689673608a1d4bc8baebc553a78caf4d728c Mon Sep 17 00:00:00 2001 From: DDCloud Date: Tue, 1 Nov 2016 17:48:23 -0700 Subject: [PATCH] Disabling checks in MemoryFailPoint for Xplat till primitives like VirtualQuery are implmemented properly Commit migrated from https://github.com/dotnet/coreclr/commit/953361eb2d4092feaf509dfc5b23edcc0146efda --- src/coreclr/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/coreclr/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs b/src/coreclr/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs index 4ae6047..1f0ea8c 100644 --- a/src/coreclr/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs +++ b/src/coreclr/src/mscorlib/src/System/Runtime/MemoryFailPoint.cs @@ -160,6 +160,7 @@ namespace System.Runtime 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; @@ -302,6 +303,7 @@ namespace System.Runtime SharedStatics.AddMemoryFailPointReservation((long) size); _mustSubtractReservation = true; } +#endif } [System.Security.SecurityCritical] // auto-generated @@ -324,9 +326,6 @@ namespace System.Runtime [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 -- 2.7.4