summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/interface/pcbios/memtop_umalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/interface/pcbios/memtop_umalloc.c')
-rw-r--r--src/arch/x86/interface/pcbios/memtop_umalloc.c2
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;
}