aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcmd/command.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index fd3edfc46..429cd32cc 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -73,8 +73,13 @@ ref<Store> EvalCommand::getEvalStore()
ref<EvalState> EvalCommand::getEvalState()
{
- if (!evalState)
- evalState = std::make_shared<EvalState>(searchPath, getEvalStore(), getStore());
+ if (!evalState) evalState =
+#if HAVE_BOEHMGC
+ std::allocate_shared<EvalState>(traceable_allocator<EvalState>(),
+#else
+ std::make_shared<EvalState>(
+#endif
+ searchPath, getEvalStore(), getStore());
return ref<EvalState>(evalState);
}