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

Add some instrumentation for debugging GC leaks

This commit is contained in:
Eelco Dolstra 2014-09-17 15:19:07 +02:00
parent d37d012774
commit 6e5b02bee4
4 changed files with 59 additions and 0 deletions

View file

@ -255,6 +255,8 @@ public:
/* Print statistics. */
void printStats();
void printCanaries();
private:
unsigned long nrEnvs;
@ -285,6 +287,12 @@ private:
friend struct ExprOpConcatLists;
friend struct ExprSelect;
friend void prim_getAttr(EvalState & state, const Pos & pos, Value * * args, Value & v);
#if HAVE_BOEHMGC
std::set<Value *> gcCanaries;
friend void canaryFinalizer(GC_PTR obj, GC_PTR client_data);
friend void prim_gcCanary(EvalState & state, const Pos & pos, Value * * args, Value & v);
#endif
};