diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 04:28:30 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-26 04:28:30 +0000 |
commit | 2e76dc7e79e1c2bc74cb1567352ad882e2d8d0c7 (patch) | |
tree | 6e2889945373127ed5bd74517eb260a8fd1e334a /MdeModulePkg | |
parent | d27bd9e95b313435fb243dbebc5dd10da4798c13 (diff) | |
download | edk2-platforms-2e76dc7e79e1c2bc74cb1567352ad882e2d8d0c7.tar.xz |
Remove ASSERT() to make AllocatePool() service match PI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9815 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c index 6314f75999..e5dac2c581 100644 --- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c +++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c @@ -1,7 +1,7 @@ /** @file
EFI PEI Core memory services
-Copyright (c) 2006, Intel Corporation
+Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. 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
@@ -240,7 +240,10 @@ PeiAllocatePool ( // Generally, the size of heap in temporary memory does not exceed to 64K,
// so the maxmium size of pool is 0x10000 - sizeof (EFI_HOB_MEMORY_POOL)
//
- ASSERT (Size < 0x10000 - sizeof (EFI_HOB_MEMORY_POOL));
+ if (Size >= (0x10000 - sizeof (EFI_HOB_MEMORY_POOL))) {
+ return EFI_OUT_OF_RESOURCES;
+ }
+
Status = PeiServicesCreateHob (
EFI_HOB_TYPE_MEMORY_POOL,
(UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size),
|