edk2/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/PeiMemoryAllocationLib/MemoryAllocationLib.c:

Merge from edk2\MdePkg\Library\PeiMemoryAllocationLib\MemoryAllocationLib.c
  to achieve better support for additional compilers.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5280 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten 2008-05-22 23:46:47 +00:00
parent bd2d157b9d
commit bfe03264cb
1 changed files with 2 additions and 7 deletions

View File

@ -43,14 +43,12 @@ InternalAllocatePages (
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_PHYSICAL_ADDRESS Memory; EFI_PHYSICAL_ADDRESS Memory;
EFI_PEI_SERVICES **PeiServices;
if (Pages == 0) { if (Pages == 0) {
return NULL; return NULL;
} }
PeiServices = GetPeiServicesTablePointer (); Status = PeiServicesAllocatePages (MemoryType, Pages, &Memory);
Status = ((*PeiServices)->AllocatePages) (PeiServices, MemoryType, Pages, &Memory);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
Memory = 0; Memory = 0;
} }
@ -352,12 +350,9 @@ GlueAllocatePool (
) )
{ {
EFI_STATUS Status; EFI_STATUS Status;
EFI_PEI_SERVICES **PeiServices;
VOID *Buffer; VOID *Buffer;
PeiServices = GetPeiServicesTablePointer (); Status = PeiServicesAllocatePool (AllocationSize, &Buffer);
Status = ((*PeiServices)->AllocatePool) (PeiServices, AllocationSize, &Buffer);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
Buffer = NULL; Buffer = NULL;
} }