summaryrefslogtreecommitdiff
path: root/EdkModulePkg
diff options
context:
space:
mode:
authorajfish <ajfish@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-24 01:20:09 +0000
committerajfish <ajfish@6f19259b-4bc3-4df7-8a09-765794883524>2006-10-24 01:20:09 +0000
commite47b06c3397ccc13bf6fa5a471ed20f1ccc758a9 (patch)
tree682b300adeade5e1cb73d4ed38b28c2dd17892ac /EdkModulePkg
parentc4c03671b95372bef4c191dfaf0962701e9ba9cf (diff)
downloadedk2-platforms-e47b06c3397ccc13bf6fa5a471ed20f1ccc758a9.tar.xz
MAX_POOL_SIZE was hardcoded to 0xFFFFFF00. MAX_POOL_SIZE was replaced with MAX_ADDRESS and POOL_OVERHEAD. MAX_POOL_SIZE is used to prevent a large allocation from passing since adding the POOL_OVERHAD to the allocation (done internally) could cause the size to wrap around and be small. This would cause a return value of success that was an error.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1833 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg')
-rw-r--r--EdkModulePkg/Core/Dxe/Mem/pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/EdkModulePkg/Core/Dxe/Mem/pool.c b/EdkModulePkg/Core/Dxe/Mem/pool.c
index 2f4669e6c1..3201a97864 100644
--- a/EdkModulePkg/Core/Dxe/Mem/pool.c
+++ b/EdkModulePkg/Core/Dxe/Mem/pool.c
@@ -62,7 +62,7 @@ typedef struct {
#define MAX_POOL_LIST SIZE_TO_LIST(DEFAULT_PAGE_ALLOCATION)
-#define MAX_POOL_SIZE 0xffffff00
+#define MAX_POOL_SIZE (MAX_ADDRESS - POOL_OVERHEAD)
//
// Globals