Clarify ASSERT() conditions for Reallocate Pool functions.

Fix bug in Reallocate Pool functions in PEI Memory Allocation Lib.  The wrong memory type was being allocated.  This syncs the PEI Memory Allocation Lib with the fix that was previously made to the UEFI Memory Allocation Lib.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8269 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
mdkinney 2009-05-08 22:09:40 +00:00
parent 0dcec41170
commit 6babbe1f8c
2 changed files with 17 additions and 17 deletions

View File

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

View File

@ -661,8 +661,8 @@ AllocateReservedCopyPool (
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),
then ASSERT().
@param PoolType The type of pool to allocate.
@param OldSize The size, in bytes, of OldBuffer.
@ -701,8 +701,8 @@ InternalReallocatePool (
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),
then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@ -733,8 +733,8 @@ ReallocatePool (
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),
then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.
@ -765,8 +765,8 @@ ReallocateRuntimePool (
If NewSize is 0, then a valid buffer of 0 size is returned. If there is not
enough memory remaining to satisfy the request, then NULL is returned.
If NewSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If OldSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT().
If the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1),
then ASSERT().
@param OldSize The size, in bytes, of OldBuffer.
@param NewSize The size, in bytes, of the buffer to reallocate.