From 8e633ab936625fa1e897c5c062f70705996e7b85 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sat, 6 Oct 2007 00:45:52 +0800 Subject: [MEMALLOC] Add pushstackmark This patch gets rid of the stack mark tracking hack by allocating a little bit of stack memory if we're at risk of planting a stack mark which may be grown later. To do this a new function pushstackmark is added which lets the user pick a bigger amount to allocate since some users do that anyway after setting a stack mark. --- src/parser.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/parser.c') diff --git a/src/parser.c b/src/parser.c index f49ee7d..d0e0553 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1487,8 +1487,7 @@ setprompt(int which) show = !el; #endif if (show) { - setstackmark(&smark); - stalloc(stackblocksize()); + pushstackmark(&smark, stackblocksize()); out2str(getprompt(NULL)); popstackmark(&smark); } -- cgit 1.4.1