]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/PiSmmCore/HeapGuard.c
MdeModulePkg/Core: fix too many available pages between BS_Data
[mirror_edk2.git] / MdeModulePkg / Core / PiSmmCore / HeapGuard.c
index c5ffb263420e0a3d37e1de9d9825c96ce87f1a17..aa9c25d1021d144d5ae3299c5a1aed44911e4f38 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Heap Guard functions.\r
 \r
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2017-2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -888,13 +888,6 @@ AdjustMemoryS (
 \r
   Target = Start + Size - SizeRequested;\r
 \r
-  //\r
-  // At least one more page needed for Guard page.\r
-  //\r
-  if (Size < (SizeRequested + EFI_PAGES_TO_SIZE (1))) {\r
-    return 0;\r
-  }\r
-\r
   if (!IsGuardPage (Start + Size)) {\r
     // No Guard at tail to share. One more page is needed.\r
     Target -= EFI_PAGES_TO_SIZE (1);\r