/* if Count is < 2 then perform no action. if Size is < 1 then perform no action. */
VOID EFIAPI PerformQuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN SORT_COMPARE CompareFunction)
/* if Count is < 2 then perform no action. if Size is < 1 then perform no action. */
VOID EFIAPI PerformQuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN SORT_COMPARE CompareFunction)
{
  VOID  *Buffer;
  ASSERT (BufferToSort     != NULL);
  ASSERT (CompareFunction  != NULL);
  Buffer = AllocateZeroPool (ElementSize);
  ASSERT (Buffer != NULL);
  QuickSort (
    BufferToSort,
    Count,
    ElementSize,
    CompareFunction,
    Buffer
    );
  FreePool (Buffer);
  return;
}