X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FMemoryAllocationLib.h;h=0df59e60a38608c4b27fde71a60a24b5cd81d5dd;hb=f1e2b7283ea6fa12691edee22aca403c3b3af24c;hp=74f7673cd7b02490e4e135e84b2a5976ad4e2e55;hpb=2297186d22231ffcf35cc5a03bdd60e8ac97558e;p=mirror_edk2.git diff --git a/MdePkg/Include/Library/MemoryAllocationLib.h b/MdePkg/Include/Library/MemoryAllocationLib.h index 74f7673cd7..0df59e60a3 100644 --- a/MdePkg/Include/Library/MemoryAllocationLib.h +++ b/MdePkg/Include/Library/MemoryAllocationLib.h @@ -6,8 +6,8 @@ and SMM (for example) is done via a different mechanism. Using a common library interface makes it much easier to port algorithms from phase to phase. -Copyright (c) 2006 - 2008, Intel Corporation -All rights reserved. This program and the accompanying materials +Copyright (c) 2006 - 2013, 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 http://opensource.org/licenses/bsd-license.php @@ -83,7 +83,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 + perform no actions. If Buffer was not allocated with a page allocation function in the Memory Allocation Library, then ASSERT(). @@ -109,6 +110,7 @@ FreePages ( request, then NULL is returned. If Alignment is not a power of two and Alignment is not zero, then ASSERT(). + If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. @param Alignment The requested alignment of the allocation. Must be a power of two. @@ -133,6 +135,7 @@ AllocateAlignedPages ( request, then NULL is returned. If Alignment is not a power of two and Alignment is not zero, then ASSERT(). + If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. @param Alignment The requested alignment of the allocation. Must be a power of two. @@ -157,6 +160,7 @@ AllocateAlignedRuntimePages ( request, then NULL is returned. If Alignment is not a power of two and Alignment is not zero, then ASSERT(). + If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. @param Alignment The requested alignment of the allocation. Must be a power of two. @@ -178,7 +182,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 + perform no actions. If Buffer was not allocated with an aligned page allocation function in the Memory Allocation Library, then ASSERT(). @@ -388,8 +393,8 @@ AllocateReservedCopyPool ( If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize + is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. @@ -417,8 +422,8 @@ ReallocatePool ( If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize + is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. @@ -446,8 +451,8 @@ ReallocateRuntimePool ( If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). - If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize + is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. @@ -470,7 +475,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 perform no actions. If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT().