mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[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>
This commit is contained in:
committed by
Michael Brown
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 */
|
||||
if ( ptr == bottom ) {
|
||||
/* Update block */
|
||||
if ( new_size > ( heap_size - extmem.size ) ) {
|
||||
if ( new_size > ( heap_size + extmem.size ) ) {
|
||||
DBG ( "EXTMEM out of space\n" );
|
||||
return UNULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user