Use AllocatePage for FvImage.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4385 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2007-12-11 05:14:16 +00:00
parent bc4b81899a
commit b2c5e194a8
1 changed files with 2 additions and 3 deletions

View File

@ -894,8 +894,7 @@ Returns:
if (FvAlignment < 8) {
FvAlignment = 8;
}
AlignedBuffer = AllocateAlignedPool ((UINTN) BufferSize, (UINTN) FvAlignment);
AlignedBuffer = AllocateAlignedPages (EFI_SIZE_TO_PAGES (BufferSize), (UINTN) FvAlignment);
if (AlignedBuffer == NULL) {
Status = EFI_OUT_OF_RESOURCES;
} else {
@ -926,7 +925,7 @@ Returns:
}
if (AlignedBuffer != NULL) {
FreeAlignedPool (AlignedBuffer);
FreeAlignedPages (AlignedBuffer, EFI_SIZE_TO_PAGES (BufferSize));
}
}