give hints to anew() according to aalloc stats output for testsuite and a

little interactive use, to reduce the number realloc(3) must be called
This commit is contained in:
tg
2008-11-15 09:00:19 +00:00
parent 6be05862db
commit 546d5d0def
3 changed files with 9 additions and 9 deletions

4
var.c
View File

@@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.61 2008/11/15 07:35:25 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.62 2008/11/15 09:00:19 tg Exp $");
/*
* Variables
@@ -39,7 +39,7 @@ newblock(void)
l = alloc(1, sizeof (struct block), ATEMP);
l->flags = 0;
l->areap = anew(0); /* TODO: could use e->area */
l->areap = anew(Flag(FTALKING) ? 1024 : 64);
if (!e->loc) {
l->argc = 0;
l->argv = empty;