// Don't overwrite Guard pages, which should be the first and/or last page,\r
// if any.\r
//\r
- if (IsHeapGuardEnabled ()) {\r
+ if (IsHeapGuardEnabled (GUARD_HEAP_TYPE_PAGE|GUARD_HEAP_TYPE_POOL)) {\r
if (IsGuardPage (Memory)) {\r
Memory += EFI_PAGE_SIZE;\r
Length -= EFI_PAGE_SIZE;\r