Skip to content

Commit 192cccc

Browse files
ecm-pushbxPerditionC
authored andcommitted
in 2F.4A02 advance firstAvailableBuf past the alignment as well (neater)
1 parent 85be764 commit 192cccc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/inthndlr.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1953,12 +1953,13 @@ VOID ASMCFUNC int2F_12_handler(struct int2f12regs FAR *pr)
19531953
size = 0;
19541954
offs = 0xffff; /* requested more than we have */
19551955
} else {
1956+
UWORD alignment = offs - realoffs;
19561957
size = (UWORD)requestedsize; /* return rounded size */
19571958
AllocateHMASpace(realoffs, offs + size - 1); /* ! realoffs */
19581959
if ( ((UDWORD)offs + (UDWORD)size) == 0x10000UL ) {
19591960
firstAvailableBuf = MK_FP(0xFFFF, 0xFFFF); /* exhausted */
19601961
} else {
1961-
firstAvailableBuf += size; /* advance free pointer */
1962+
firstAvailableBuf += size + alignment; /* advance free pointer */
19621963
}
19631964
}
19641965
}

0 commit comments

Comments
 (0)