1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

* Keep more statistics about stack space usage.

* Reduce stack space usage.
This commit is contained in:
Eelco Dolstra 2010-04-09 12:00:49 +00:00
parent b7b3dd55f9
commit f3dc7ab877
2 changed files with 78 additions and 43 deletions

View file

@ -144,10 +144,6 @@ public:
private:
SrcToStore srcToStore;
unsigned long nrValues;
unsigned long nrEnvs;
unsigned long nrEvaluated;
bool allowUnsafeEquality;
ATermMap parseTrees;
@ -155,6 +151,7 @@ private:
public:
EvalState();
~EvalState();
/* Evaluate an expression read from the given file to normal
form. */
@ -242,6 +239,17 @@ public:
/* Print statistics. */
void printStats();
private:
unsigned long nrValues;
unsigned long nrEnvs;
unsigned long nrEvaluated;
unsigned int recursionDepth;
unsigned int maxRecursionDepth;
char * deepestStack; /* for measuring stack usage */
friend class RecursionCounter;
};