mirror of https://github.com/ipxe/ipxe.git
[pcbios] Fix "out of memory" detection when expanding bottom area
This caused iPXE to reject images even when enough memory was available. Signed-off-by: David Decotigny <ddecotig@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/124/head
parent
cede0c5ba1
commit
45a0ca6de2
|
@ -190,7 +190,7 @@ static userptr_t memtop_urealloc ( userptr_t ptr, size_t new_size ) {
|
||||||
/* Expand/shrink block if possible */
|
/* Expand/shrink block if possible */
|
||||||
if ( ptr == bottom ) {
|
if ( ptr == bottom ) {
|
||||||
/* Update block */
|
/* Update block */
|
||||||
if ( new_size > ( heap_size - extmem.size ) ) {
|
if ( new_size > ( heap_size + extmem.size ) ) {
|
||||||
DBG ( "EXTMEM out of space\n" );
|
DBG ( "EXTMEM out of space\n" );
|
||||||
return UNULL;
|
return UNULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue