/* Adjust the base and number of pages to really allocate according to Guard. */
VOID AdjustMemoryA(IN OUT EFI_PHYSICAL_ADDRESS *Memory, IN OUT UINTN *NumberOfPages)
/* Adjust the base and number of pages to really allocate according to Guard. */
VOID AdjustMemoryA(IN OUT EFI_PHYSICAL_ADDRESS *Memory, IN OUT UINTN *NumberOfPages)
{
  if (!IsGuardPage (*Memory + EFI_PAGES_TO_SIZE (*NumberOfPages))) {
    *NumberOfPages += 1;
  }
  if (!IsGuardPage (*Memory - EFI_PAGE_SIZE)) {
    *Memory        -= EFI_PAGE_SIZE;
    *NumberOfPages += 1;
  }
}