diff options
| author | David Decotigny | 2020-01-15 08:31:03 +0100 |
|---|---|---|
| committer | Michael Brown | 2020-07-21 15:50:24 +0200 |
| commit | 45a0ca6de221f8886a9bfb02f0d34af4fc2f1c5d (patch) | |
| tree | 98364ef00c58029c76d0d58d94dcc17f4a2e34ad /src/arch | |
| parent | [libgcc] Change __divmoddi4 from int64 [unknown] to int64_t (diff) | |
| download | ipxe-45a0ca6de221f8886a9bfb02f0d34af4fc2f1c5d.tar.gz ipxe-45a0ca6de221f8886a9bfb02f0d34af4fc2f1c5d.tar.xz ipxe-45a0ca6de221f8886a9bfb02f0d34af4fc2f1c5d.zip | |
[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>
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/x86/interface/pcbios/memtop_umalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/interface/pcbios/memtop_umalloc.c b/src/arch/x86/interface/pcbios/memtop_umalloc.c index f1ab73e29..d7b82189a 100644 --- a/src/arch/x86/interface/pcbios/memtop_umalloc.c +++ b/src/arch/x86/interface/pcbios/memtop_umalloc.c @@ -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; } |
