diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2021-12-11 16:02:08 +0100 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2021-12-11 16:02:08 +0100 |
commit | 33e96820d52dcfea387214f84ff2271959b3467b (patch) | |
tree | ecfddc713ef103b14f4cbbfa238d013a4afa7ebb /src/libcmd/command.cc | |
parent | 20b1290103f23e40614518291b8d4847e37fea05 (diff) |
EvalCommand::getEvalState: use gc tracable allocator for EvalState
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r-- | src/libcmd/command.cc | 9 |
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); } |