diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-27T19·10+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2007-02-27T19·10+0000 |
commit | 044b6482c185ba8966d9d893b033d97d66b5f225 (patch) | |
tree | 34e9cf280317c4c44ea7300f2d05c6330279dc61 /src/libexpr/nix.sdf | |
parent | adce01a8d05ee21890a5be699a26f1835594cb5d (diff) |
* Greatly reduced the amount of stack space used by the Nix expression
evaluator. This was important because the NixOS expressions started to hit 2 MB default stack size on Linux. GCC is really dumb about stack space: it just adds up all the local variables and temporaries of every scope into one huge stack frame. This is really bad for deeply recursive functions. For instance, every `throw Error(format("error message"))' causes a format object of a few hundred bytes to be allocated on the stack. As a result, every recursive call to evalExpr2() consumed 4680 bytes. By splitting evalExpr2() and by moving the exception-throwing code out of the main functions, evalExpr2() now only consumes 40 bytes. Similar for evalExpr().
Diffstat (limited to 'src/libexpr/nix.sdf')
0 files changed, 0 insertions, 0 deletions