]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/MemoryAllocationLib.h
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Include / Library / MemoryAllocationLib.h
index 0df59e60a38608c4b27fde71a60a24b5cd81d5dd..d24d1d663ea8400170bbc360b9855c033556b37b 100644 (file)
@@ -1,12 +1,12 @@
 /** @file\r
   Provides services to allocate and free memory buffers of various memory types and alignments.\r
-  \r
-  The Memory Allocation Library abstracts various common memory allocation operations. This library \r
-  allows code to be written in a phase-independent manner because the allocation of memory in PEI, DXE, \r
-  and SMM (for example) is done via a different mechanism. Using a common library interface makes it \r
-  much easier to port algorithms from phase to phase. \r
-  \r
-Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+\r
+  The Memory Allocation Library abstracts various common memory allocation operations. This library\r
+  allows code to be written in a phase-independent manner because the allocation of memory in PEI, DXE,\r
+  and SMM (for example) is done via a different mechanism. Using a common library interface makes it\r
+  much easier to port algorithms from phase to phase.\r
+\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -85,11 +85,11 @@ AllocateReservedPages (
   must have been allocated on a previous call to the page allocation services of the Memory\r
   Allocation Library.  If it is not possible to free allocated pages, then this function will\r
   perform no actions.\r
-  \r
+\r
   If Buffer was not allocated with a page allocation function in the Memory Allocation Library,\r
   then ASSERT().\r
   If Pages is zero, then ASSERT().\r
\r
+\r
   @param  Buffer                Pointer to the buffer of pages to free.\r
   @param  Pages                 The number of 4 KB pages to free.\r
 \r
@@ -108,7 +108,7 @@ FreePages (
   alignment specified by Alignment.  The allocated buffer is returned.  If Pages is 0, then NULL is\r
   returned.  If there is not enough memory at the specified alignment remaining to satisfy the\r
   request, then NULL is returned.\r
-  \r
+\r
   If Alignment is not a power of two and Alignment is not zero, then ASSERT().\r
   If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().\r
 \r
@@ -133,7 +133,7 @@ AllocateAlignedPages (
   alignment specified by Alignment.  The allocated buffer is returned.  If Pages is 0, then NULL is\r
   returned.  If there is not enough memory at the specified alignment remaining to satisfy the\r
   request, then NULL is returned.\r
-  \r
+\r
   If Alignment is not a power of two and Alignment is not zero, then ASSERT().\r
   If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().\r
 \r
@@ -158,7 +158,7 @@ AllocateAlignedRuntimePages (
   alignment specified by Alignment.  The allocated buffer is returned.  If Pages is 0, then NULL is\r
   returned.  If there is not enough memory at the specified alignment remaining to satisfy the\r
   request, then NULL is returned.\r
-  \r
+\r
   If Alignment is not a power of two and Alignment is not zero, then ASSERT().\r
   If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT().\r
 \r
@@ -182,13 +182,13 @@ AllocateAlignedReservedPages (
 \r
   Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer.  Buffer\r
   must have been allocated on a previous call to the aligned page allocation services of the Memory\r
-  Allocation Library.  If it is not possible to free allocated pages, then this function will \r
+  Allocation Library.  If it is not possible to free allocated pages, then this function will\r
   perform no actions.\r
-  \r
+\r
   If Buffer was not allocated with an aligned page allocation function in the Memory Allocation\r
   Library, then ASSERT().\r
   If Pages is zero, then ASSERT().\r
-  \r
+\r
   @param  Buffer                Pointer to the buffer of pages to free.\r
   @param  Pages                 The number of 4 KB pages to free.\r
 \r
@@ -318,9 +318,9 @@ AllocateReservedZeroPool (
   AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the\r
   allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there\r
   is not enough memory remaining to satisfy the request, then NULL is returned.\r
-  \r
+\r
   If Buffer is NULL, then ASSERT().\r
-  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   @param  AllocationSize        The number of bytes to allocate and zero.\r
   @param  Buffer                The buffer to copy to the allocated buffer.\r
@@ -342,9 +342,9 @@ AllocateCopyPool (
   AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the\r
   allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there\r
   is not enough memory remaining to satisfy the request, then NULL is returned.\r
-  \r
+\r
   If Buffer is NULL, then ASSERT().\r
-  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   @param  AllocationSize        The number of bytes to allocate and zero.\r
   @param  Buffer                The buffer to copy to the allocated buffer.\r
@@ -366,9 +366,9 @@ AllocateRuntimeCopyPool (
   AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the\r
   allocated buffer.  If AllocationSize is 0, then a valid buffer of 0 size is returned.  If there\r
   is not enough memory remaining to satisfy the request, then NULL is returned.\r
-  \r
+\r
   If Buffer is NULL, then ASSERT().\r
-  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+  If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().\r
 \r
   @param  AllocationSize        The number of bytes to allocate and zero.\r
   @param  Buffer                The buffer to copy to the allocated buffer.\r
@@ -387,18 +387,18 @@ AllocateReservedCopyPool (
   Reallocates a buffer of type EfiBootServicesData.\r
 \r
   Allocates and zeros the number bytes specified by NewSize from memory of type\r
-  EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and \r
-  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and \r
-  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.  \r
-  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not \r
+  EfiBootServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and\r
+  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and\r
+  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.\r
+  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not\r
   enough memory remaining to satisfy the request, then NULL is returned.\r
-  \r
+\r
   If the allocation of the new buffer is successful and the smaller of NewSize and OldSize\r
   is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT().\r
 \r
   @param  OldSize        The size, in bytes, of OldBuffer.\r
   @param  NewSize        The size, in bytes, of the buffer to reallocate.\r
-  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional \r
+  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional\r
                          parameter that may be NULL.\r
 \r
   @return A pointer to the allocated buffer or NULL if allocation fails.\r
@@ -416,10 +416,10 @@ ReallocatePool (
   Reallocates a buffer of type EfiRuntimeServicesData.\r
 \r
   Allocates and zeros the number bytes specified by NewSize from memory of type\r
-  EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and \r
-  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and \r
-  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.  \r
-  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not \r
+  EfiRuntimeServicesData.  If OldBuffer is not NULL, then the smaller of OldSize and\r
+  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and\r
+  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.\r
+  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not\r
   enough memory remaining to satisfy the request, then NULL is returned.\r
 \r
   If the allocation of the new buffer is successful and the smaller of NewSize and OldSize\r
@@ -427,7 +427,7 @@ ReallocatePool (
 \r
   @param  OldSize        The size, in bytes, of OldBuffer.\r
   @param  NewSize        The size, in bytes, of the buffer to reallocate.\r
-  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional \r
+  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional\r
                          parameter that may be NULL.\r
 \r
   @return A pointer to the allocated buffer or NULL if allocation fails.\r
@@ -445,10 +445,10 @@ ReallocateRuntimePool (
   Reallocates a buffer of type EfiReservedMemoryType.\r
 \r
   Allocates and zeros the number bytes specified by NewSize from memory of type\r
-  EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and \r
-  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and \r
-  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.  \r
-  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not \r
+  EfiReservedMemoryType.  If OldBuffer is not NULL, then the smaller of OldSize and\r
+  NewSize bytes are copied from OldBuffer to the newly allocated buffer, and\r
+  OldBuffer is freed.  A pointer to the newly allocated buffer is returned.\r
+  If NewSize is 0, then a valid buffer of 0 size is  returned.  If there is not\r
   enough memory remaining to satisfy the request, then NULL is returned.\r
 \r
   If the allocation of the new buffer is successful and the smaller of NewSize and OldSize\r
@@ -456,7 +456,7 @@ ReallocateRuntimePool (
 \r
   @param  OldSize        The size, in bytes, of OldBuffer.\r
   @param  NewSize        The size, in bytes, of the buffer to reallocate.\r
-  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional \r
+  @param  OldBuffer      The buffer to copy to the allocated buffer.  This is an optional\r
                          parameter that may be NULL.\r
 \r
   @return A pointer to the allocated buffer or NULL if allocation fails.\r
@@ -477,7 +477,7 @@ ReallocateReservedPool (
   Frees the buffer specified by Buffer.  Buffer must have been allocated on a previous call to the\r
   pool allocation services of the Memory Allocation Library.  If it is not possible to free pool\r
   resources, then this function will perform no actions.\r
-  \r
+\r
   If Buffer was not allocated with a pool allocation function in the Memory Allocation Library,\r
   then ASSERT().\r
 \r