summaryrefslogtreecommitdiff
path: root/MdePkg/Library/UefiMemoryAllocationLib
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-09 01:13:40 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-09 01:13:40 +0000
commit6e10b70a62dee17d7913b20f5323c1e75bd13417 (patch)
tree420bb8a87db254d6165b8d503a0685f33da2fc18 /MdePkg/Library/UefiMemoryAllocationLib
parent6cb6f078ae95b64715609b87c1e28538395bd821 (diff)
downloadedk2-platforms-6e10b70a62dee17d7913b20f5323c1e75bd13417.tar.xz
Clarify that FreePages(), FreeAlignedPages(), and FreePool() may perform n actions if those operations are not possible. For example, the PEI Phase does not provide any services to free allocated pages or allocated pool memory.
Update comments in PeiMemoryAllocationLib and UefiMemoryAllocationLib to match updates to MemoryAllocationLib.h. Add ASSERT() statements in PeiMemoryAllocationLib for the FreePages() and FreeAlignedPages() if Pages is 0. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8275 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/UefiMemoryAllocationLib')
-rw-r--r--MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
index 2a9f128424..08bb2921ab 100644
--- a/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
+++ b/MdePkg/Library/UefiMemoryAllocationLib/MemoryAllocationLib.c
@@ -127,7 +127,8 @@ AllocateReservedPages (
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
must have been allocated on a previous call to the page allocation services of the Memory
- Allocation Library.
+ Allocation Library. If it is not possible to free allocated pages, then this function will
+ peform no actions.
If Buffer was not allocated with a page allocation function in the Memory Allocation Library,
then ASSERT().
@@ -323,7 +324,8 @@ AllocateAlignedReservedPages (
Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer
must have been allocated on a previous call to the aligned page allocation services of the Memory
- Allocation Library.
+ Allocation Library. If it is not possible to free allocated pages, then this function will
+ peform no actions.
If Buffer was not allocated with an aligned page allocation function in the Memory Allocation
Library, then ASSERT().
@@ -792,7 +794,8 @@ ReallocateReservedPool (
Memory Allocation Library.
Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the
- pool allocation services of the Memory Allocation Library.
+ pool allocation services of the Memory Allocation Library. If it is not possible to free pool
+ resources, then this function will peform no actions.
If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,
then ASSERT().