mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-04 20:40:57 +02:00
36853: replace pushheap/popheap by NEWHEAPS/OLDHEAPS in doshfunc() to optimize memory management
Includes re-indentation that was not done in the posted patch.
This commit is contained in:
parent
bab1fc5043
commit
827d360776
2 changed files with 214 additions and 209 deletions
|
@ -1,3 +1,8 @@
|
|||
2015-10-14 Barton E. Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 36853: Src/exec.c: replace pushheap/popheap by NEWHEAPS/OLDHEAPS
|
||||
in doshfunc() to optimize memory management
|
||||
|
||||
2015-10-14 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* 36856: Doc/Zsh/contrib.yo, Functions/Chpwd/cdr: add -p and -P
|
||||
|
|
|
@ -5067,11 +5067,11 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
|
|||
#ifdef MAX_FUNCTION_DEPTH
|
||||
static int funcdepth;
|
||||
#endif
|
||||
Heap funcheap;
|
||||
|
||||
queue_signals(); /* Lots of memory and global state changes coming */
|
||||
|
||||
pushheap();
|
||||
|
||||
NEWHEAPS(funcheap) {
|
||||
oargv0 = NULL;
|
||||
obreaks = breaks;
|
||||
ocontflag = contflag;
|
||||
|
@ -5290,7 +5290,7 @@ doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)
|
|||
numpipestats = oldnumpipestats;
|
||||
memcpy(pipestats, oldpipestats, sizeof(int)*numpipestats);
|
||||
}
|
||||
popheap();
|
||||
} OLDHEAPS;
|
||||
|
||||
unqueue_signals();
|
||||
|
||||
|
|
Loading…
Reference in a new issue