summary refs log tree commit diff
path: root/src/memalloc.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-10-06 00:45:52 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-10-06 00:45:52 +0800
commit8e633ab936625fa1e897c5c062f70705996e7b85 (patch)
tree3e2bcf12e7584983749e6616123f8e36096b8e86 /src/memalloc.h
parent[MEMALLOC] Made grabstackblock an inline wrapper for stalloc (diff)
downloaddash-8e633ab936625fa1e897c5c062f70705996e7b85.tar.gz
dash-8e633ab936625fa1e897c5c062f70705996e7b85.zip
[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.
Diffstat (limited to 'src/memalloc.h')
-rw-r--r--src/memalloc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/memalloc.h b/src/memalloc.h
index 282dbb0..ad6015d 100644
--- a/src/memalloc.h
+++ b/src/memalloc.h
@@ -40,7 +40,6 @@ struct stackmark {
 	struct stack_block *stackp;
 	char *stacknxt;
 	size_t stacknleft;
-	struct stackmark *marknext;
 };
 
 
@@ -54,6 +53,7 @@ pointer ckrealloc(pointer, size_t);
 char *savestr(const char *);
 pointer stalloc(size_t);
 void stunalloc(pointer);
+void pushstackmark(struct stackmark *mark, size_t len);
 void setstackmark(struct stackmark *);
 void popstackmark(struct stackmark *);
 void growstackblock(void);