summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Core/Dxe/Mem/HeapGuard.c9
-rw-r--r--MdeModulePkg/Core/PiSmmCore/HeapGuard.c9
2 files changed, 2 insertions, 16 deletions
diff --git a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
index d7906e0..1924504 100644
--- a/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
+++ b/MdeModulePkg/Core/Dxe/Mem/HeapGuard.c
@@ -1,7 +1,7 @@
/** @file
UEFI Heap Guard functions.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017-2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -905,13 +905,6 @@ AdjustMemoryS (
Target = Start + Size - SizeRequested;
- //
- // At least one more page needed for Guard page.
- //
- if (Size < (SizeRequested + EFI_PAGES_TO_SIZE (1))) {
- return 0;
- }
-
if (!IsGuardPage (Start + Size)) {
// No Guard at tail to share. One more page is needed.
Target -= EFI_PAGES_TO_SIZE (1);
diff --git a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
index c5ffb26..aa9c25d 100644
--- a/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
+++ b/MdeModulePkg/Core/PiSmmCore/HeapGuard.c
@@ -1,7 +1,7 @@
/** @file
UEFI Heap Guard functions.
-Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2017-2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -888,13 +888,6 @@ AdjustMemoryS (
Target = Start + Size - SizeRequested;
- //
- // At least one more page needed for Guard page.
- //
- if (Size < (SizeRequested + EFI_PAGES_TO_SIZE (1))) {
- return 0;
- }
-
if (!IsGuardPage (Start + Size)) {
// No Guard at tail to share. One more page is needed.
Target -= EFI_PAGES_TO_SIZE (1);