From 192cccc68f4794b3d78e9f2bf44bf23ee91e0319 Mon Sep 17 00:00:00 2001 From: "E. C. Masloch" Date: Tue, 18 Feb 2025 21:19:10 +0100 Subject: [PATCH] in 2F.4A02 advance firstAvailableBuf past the alignment as well (neater) --- kernel/inthndlr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/inthndlr.c b/kernel/inthndlr.c index 05e4a60..40cb386 100644 --- a/kernel/inthndlr.c +++ b/kernel/inthndlr.c @@ -1953,12 +1953,13 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs FAR *pr) size = 0; offs = 0xffff; /* requested more than we have */ } else { + UWORD alignment = offs - realoffs; size = (UWORD)requestedsize; /* return rounded size */ AllocateHMASpace(realoffs, offs + size - 1); /* ! realoffs */ if ( ((UDWORD)offs + (UDWORD)size) == 0x10000UL ) { firstAvailableBuf = MK_FP(0xFFFF, 0xFFFF); /* exhausted */ } else { - firstAvailableBuf += size; /* advance free pointer */ + firstAvailableBuf += size + alignment; /* advance free pointer */ } } }