int errno = 0;\r
\r
FILE *stderr = NULL;\r
-FILE *stdin = NULL;\r
+FILE *stdin = NULL;\r
FILE *stdout = NULL;\r
\r
typedef\r
ASSERT (base != NULL);\r
ASSERT (compare != NULL);\r
\r
- Buffer = AllocatePool (width);\r
+ //\r
+ // Use CRT-style malloc to cover BS and RT memory allocation.\r
+ //\r
+ Buffer = malloc (width);\r
ASSERT (Buffer != NULL);\r
\r
//\r
//\r
QuickSortWorker (base, (UINTN)num, (UINTN)width, (SORT_COMPARE)compare, Buffer);\r
\r
- FreePool (Buffer);\r
+ free (Buffer);\r
return;\r
}\r
\r