If NewSize is 0, then a valid buffer of 0 size is returned. If there is not \r
enough memory remaining to satisfy the request, then NULL is returned.\r
\r
- If OldBuffer is NULL, then ASSERT().\r
- If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
- If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+ If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),\r
+ then ASSERT(). \r
\r
@param PoolType The type of pool to allocate.\r
@param OldSize The size, in bytes, of OldBuffer.\r
{\r
VOID *NewBuffer;\r
\r
- NewBuffer = AllocateZeroPool (NewSize);\r
+ NewBuffer = InternalAllocateZeroPool (PoolType, NewSize);\r
if (NewBuffer != NULL && OldBuffer != NULL) {\r
CopyMem (NewBuffer, OldBuffer, MIN (OldSize, NewSize));\r
FreePool (OldBuffer);\r
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not \r
enough memory remaining to satisfy the request, then NULL is returned.\r
\r
- If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
- If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+ If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),\r
+ then ASSERT(). \r
\r
@param OldSize The size, in bytes, of OldBuffer.\r
@param NewSize The size, in bytes, of the buffer to reallocate.\r
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not \r
enough memory remaining to satisfy the request, then NULL is returned.\r
\r
- If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
- If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+ If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),\r
+ then ASSERT(). \r
\r
@param OldSize The size, in bytes, of OldBuffer.\r
@param NewSize The size, in bytes, of the buffer to reallocate.\r
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not \r
enough memory remaining to satisfy the request, then NULL is returned.\r
\r
- If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
- If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). \r
+ If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),\r
+ then ASSERT(). \r
\r
@param OldSize The size, in bytes, of OldBuffer.\r
@param NewSize The size, in bytes, of the buffer to reallocate.\r