/* 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(). */
VOID* EFIAPI AllocateAlignedRuntimePages(IN UINTN Pages, IN UINTN Alignment)
/* 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(). */
VOID* EFIAPI AllocateAlignedRuntimePages(IN UINTN Pages, IN UINTN Alignment)
{
  VOID  *Buffer;
  Buffer = InternalAllocateAlignedPages (EfiRuntimeServicesData, Pages, Alignment);
  if (Buffer != NULL) {
    MemoryProfileLibRecord (
      (PHYSICAL_ADDRESS)(UINTN)RETURN_ADDRESS (0),
      MEMORY_PROFILE_ACTION_LIB_ALLOCATE_ALIGNED_RUNTIME_PAGES,
      EfiRuntimeServicesData,
      Buffer,
      EFI_PAGES_TO_SIZE (Pages),
      NULL
      );
  }
  return Buffer;
}