- @param AllocationSize The number of bytes to allocate.\r
- @param Buffer The buffer to copy to the allocated buffer.\r
- @param Alignment The requested alignment of the allocation. Must be a power of two.\r
- If Alignment is zero, then byte alignment is used.\r
-\r
- @return A pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned.\r
- If there is not enough memory remaining to satisfy the request, then NULL is returned.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-AllocateAlignedCopyPool (\r
- IN UINTN AllocationSize,\r
- IN CONST VOID *Buffer,\r
- IN UINTN Alignment\r
- )\r
-{\r
- VOID *Memory;\r
- \r
- Memory = AllocateAlignedPool (AllocationSize, Alignment);\r
- if (Memory != NULL) {\r
- Memory = CopyMem (Memory, Buffer, AllocationSize);\r
- }\r
- return Memory;\r
-}\r
-\r
-/**\r
- Copies a buffer to an allocated buffer of type EfiRuntimeServicesData at a specified alignment.\r
-\r
- @param AllocationSize The number of bytes to allocate.\r
- @param Buffer The buffer to copy to the allocated buffer.\r
- @param Alignment The requested alignment of the allocation. Must be a power of two.\r
- If Alignment is zero, then byte alignment is used.\r
-\r
- @return A pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned.\r
- If there is not enough memory remaining to satisfy the request, then NULL is returned.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-AllocateAlignedRuntimeCopyPool (\r
- IN UINTN AllocationSize,\r
- IN CONST VOID *Buffer,\r
- IN UINTN Alignment\r
- )\r
-{\r
- return InternalAllocateAlignedCopyPool (EfiRuntimeServicesData, AllocationSize, Buffer, Alignment);\r
-}\r
-\r
-/**\r
- Copies a buffer to an allocated buffer of type EfiReservedMemoryType at a specified alignment.\r
-\r
- @param AllocationSize The number of bytes to allocate.\r
- @param Buffer The buffer to copy to the allocated buffer.\r
- @param Alignment The requested alignment of the allocation. Must be a power of two.\r
- If Alignment is zero, then byte alignment is used.\r
-\r
- @return A pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned.\r
- If there is not enough memory remaining to satisfy the request, then NULL is returned.\r
-\r
-**/\r
-VOID *\r
-EFIAPI\r
-AllocateAlignedReservedCopyPool (\r
- IN UINTN AllocationSize,\r
- IN CONST VOID *Buffer,\r
- IN UINTN Alignment\r
- )\r
-{\r
- return InternalAllocateAlignedCopyPool (EfiReservedMemoryType, AllocationSize, Buffer, Alignment);\r
-}\r
-\r
-/**\r
- Frees a buffer that was previously allocated with one of the aligned pool allocation functions \r
- in the Memory Allocation Library.\r
-\r
- @param Buffer Pointer to the buffer to free.\r