diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index aa706cf98359a48f5288f8f14029527fc03600b5..82c1a43b13d670cea3897e01c6c35fc860d282b2 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -108,7 +108,7 @@ private:
 
     /* A cache from path names to values. */
 #if HAVE_BOEHMGC
-    typedef std::map<Path, Value, std::less<Path>, gc_allocator<std::pair<const Path, Value> > > FileEvalCache;
+    typedef std::map<Path, Value, std::less<Path>, traceable_allocator<std::pair<const Path, Value> > > FileEvalCache;
 #else
     typedef std::map<Path, Value> FileEvalCache;
 #endif