diff options
author | Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com> | 2023-03-08 20:47:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 20:47:52 +0100 |
commit | 39700c5cbeeb8005bfbe052ea79ababe46d7f072 (patch) | |
tree | beaa1f8b1f746ec0e9766617f0f9ff5be2631810 /src/libexpr/eval.cc | |
parent | e8415dc439704ee71b0a03b60bc5110bd3426314 (diff) |
Revert "Disable GC during coroutine execution + test"
Diffstat (limited to 'src/libexpr/eval.cc')
-rw-r--r-- | src/libexpr/eval.cc | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/libexpr/eval.cc b/src/libexpr/eval.cc index 3e8857fc8..2721b6733 100644 --- a/src/libexpr/eval.cc +++ b/src/libexpr/eval.cc @@ -325,22 +325,6 @@ static Symbol getName(const AttrName & name, EvalState & state, Env & env) } } -#if HAVE_BOEHMGC -/* Disable GC while this object lives. Used by CoroutineContext. - * - * Boehm keeps a count of GC_disable() and GC_enable() calls, - * and only enables GC when the count matches. - */ -class BoehmDisableGC { -public: - BoehmDisableGC() { - GC_disable(); - }; - ~BoehmDisableGC() { - GC_enable(); - }; -}; -#endif static bool gcInitialised = false; @@ -365,15 +349,6 @@ void initGC() StackAllocator::defaultAllocator = &boehmGCStackAllocator; - -#if NIX_BOEHM_PATCH_VERSION != 1 - printTalkative("Unpatched BoehmGC, disabling GC inside coroutines"); - /* Used to disable GC when entering coroutines on macOS */ - create_coro_gc_hook = []() -> std::shared_ptr<void> { - return std::make_shared<BoehmDisableGC>(); - }; -#endif - /* Set the initial heap size to something fairly big (25% of physical RAM, up to a maximum of 384 MiB) so that in most cases we don't need to garbage collect at all. (Collection has a |