From 0afa77330331048fc37a6a6d92c8ca74671573ec Mon Sep 17 00:00:00 2001 From: Bart Oldeman Date: Tue, 27 Apr 2004 00:40:43 +0000 Subject: [PATCH] From Lucho: HMAFree == 0xfff0 - bytesToAllocate is valid and may happen if the buffers occupy exactly all HMA space up to and including the last byte at ffff:ffff. Failing caused all buffers to go low ... git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@903 6ac86273-5f31-0410-b378-82cca8765d1b --- kernel/inithma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/inithma.c b/kernel/inithma.c index 4c16f27..34b3993 100644 --- a/kernel/inithma.c +++ b/kernel/inithma.c @@ -282,7 +282,7 @@ VOID FAR * HMAalloc(COUNT bytesToAllocate) if (!DosLoadedInHMA) return NULL; - if (HMAFree >= 0xfff0 - bytesToAllocate) + if (HMAFree > 0xfff0 - bytesToAllocate) return NULL; HMAptr = MK_FP(0xffff, HMAFree);