From: Alan Cox Date: Fri, 21 Nov 2014 15:06:36 +0000 (+0000) Subject: pagemap_realloc: This is the amount of memory neede relative to BASE not LOAD X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=4c359e2210a4dd37febc5643a62a86cd4c79610f;p=FUZIX.git pagemap_realloc: This is the amount of memory neede relative to BASE not LOAD Now we have a clear divide fix up the broken assumption --- diff --git a/Kernel/simple.c b/Kernel/simple.c index 459e05a3..81a7a662 100644 --- a/Kernel/simple.c +++ b/Kernel/simple.c @@ -22,7 +22,7 @@ int pagemap_alloc(ptptr p) int pagemap_realloc(uint16_t size) { - if (size + 0x100 >= (uint16_t) ramtop) + if (size >= (uint16_t) ramtop) return ENOMEM; return 0; } diff --git a/Kernel/single.c b/Kernel/single.c index ea471844..a8bf9fb6 100644 --- a/Kernel/single.c +++ b/Kernel/single.c @@ -41,7 +41,7 @@ int pagemap_alloc(ptptr p) int pagemap_realloc(uint16_t size) { - if (size + 0x100 >= (uint16_t) ramtop) + if (size >= (uint16_t) ramtop) return ENOMEM; udata.u_ptab->p_page = 1; udata.u_page = 1;