mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Always disable GC in a coroutine unless the patch is applied
This commit is contained in:
parent
00bc34430b
commit
58d24a4cb6
4 changed files with 28 additions and 11 deletions
|
@ -385,10 +385,12 @@ void initGC()
|
|||
StackAllocator::defaultAllocator = &boehmGCStackAllocator;
|
||||
|
||||
|
||||
#if NIX_BOEHM_PATCH_VERSION != 1
|
||||
/* Used to disable GC when entering coroutines on macOS */
|
||||
create_disable_gc = []() -> std::shared_ptr<void> {
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue