forgot to charge for the extra size in the abstraction

This commit is contained in:
tg 2008-11-12 05:46:45 +00:00
parent b08956d6a7
commit c113091e2d

View File

@ -1,6 +1,6 @@
#include "sh.h" #include "sh.h"
__RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.10 2008/11/12 05:46:14 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/aalloc.c,v 1.11 2008/11/12 05:46:45 tg Exp $");
/* mksh integration of aalloc */ /* mksh integration of aalloc */
@ -116,6 +116,7 @@ static size_t pagesz;
if (size >= SIZE_MAX - extra) \ if (size >= SIZE_MAX - extra) \
AALLOC_ABORT("unable to allocate %zu bytes: %s", \ AALLOC_ABORT("unable to allocate %zu bytes: %s", \
size, "value plus extra too big"); \ size, "value plus extra too big"); \
size += extra; \
} while (/* CONSTCOND */ 0) } while (/* CONSTCOND */ 0)
static void adelete_leak(PArea, PBlock); static void adelete_leak(PArea, PBlock);