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/expand.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/expand.c') diff --git a/src/expand.c b/src/expand.c index 98ad718..e3e5d8f 100644 --- a/src/expand.c +++ b/src/expand.c @@ -546,10 +546,8 @@ expbackq(union node *cmd, int flag) struct stackmark smark; INTOFF; - setstackmark(&smark); - dest = expdest; - startloc = dest - (char *)stackblock(); - grabstackstr(dest); + startloc = expdest - (char *)stackblock(); + pushstackmark(&smark, startloc); evalbackcmd(cmd, (struct backcmd *) &in); popstackmark(&smark); -- cgit 1.4.1 018/day12.c?follow=1'>log tree commit diff homepage
path: root/2018/day12.c (unfollow)
Commit message (Expand)Author
2023-12-11Solve day 3 part 2June McEnroe