about summary refs log tree commit diff
path: root/src/libexpr/eval.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-17T13·19+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-17T13·19+0200
commit6e5b02bee4c117863f11e4697da9e4f55b81e52d (patch)
tree098e21f7dc48ff3da8d2ce2b918a8df6fd0a9b73 /src/libexpr/eval.hh
parentd37d0127742a7574d4f48860de2e82fb523e508a (diff)
Add some instrumentation for debugging GC leaks
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r--src/libexpr/eval.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index 82c1a43b13d6..af9452c7539f 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -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
 };