return Count;\r
}\r
\r
-/**\r
- Adjusts the size of a previously allocated buffer.\r
-\r
-\r
- @param OldPool - A pointer to the buffer whose size is being adjusted.\r
- @param OldSize - The size of the current buffer.\r
- @param NewSize - The size of the new buffer.\r
-\r
- @return The newly allocated buffer.\r
- @retval NULL Allocation failed.\r
-\r
-**/\r
-VOID *\r
-EfiReallocatePool (\r
- IN VOID *OldPool,\r
- IN UINTN OldSize,\r
- IN UINTN NewSize\r
- )\r
-{\r
- VOID *NewPool;\r
-\r
- NewPool = NULL;\r
- if (NewSize != 0) {\r
- NewPool = AllocateZeroPool (NewSize);\r
- }\r
-\r
- if (OldPool != NULL) {\r
- if (NewPool != NULL) {\r
- CopyMem (NewPool, OldPool, OldSize < NewSize ? OldSize : NewSize);\r
- }\r
-\r
- FreePool (OldPool);\r
- }\r
-\r
- return NewPool;\r
-}\r
\r
/**\r
Get a string from the Data Hub record based on\r