From 33e96820d52dcfea387214f84ff2271959b3467b Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Sat, 11 Dec 2021 16:02:08 +0100 Subject: [PATCH] EvalCommand::getEvalState: use gc tracable allocator for EvalState --- src/libcmd/command.cc | 9 +++++++-- 1 file 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 EvalCommand::getEvalStore() ref EvalCommand::getEvalState() { - if (!evalState) - evalState = std::make_shared(searchPath, getEvalStore(), getStore()); + if (!evalState) evalState = +#if HAVE_BOEHMGC + std::allocate_shared(traceable_allocator(), +#else + std::make_shared( +#endif + searchPath, getEvalStore(), getStore()); return ref(evalState); }