Commit d58e1edb authored by Ben Gamari's avatar Ben Gamari 🐢

rts: Add --copying-gc flag to reverse effect of --nonmoving-gc

Fixes #18281.
parent 120aedbd
Pipeline #20287 failed with stages
in 639 minutes and 12 seconds
......@@ -373,10 +373,19 @@ collection. Hopefully, you won't need any of these in normal operation,
but there are several things that can be tweaked for maximum
.. rts-flag:: --copying-gc
:default: on
:since: 8.10.2
:reverse: --nonmoving-gc
Uses the generational copying garbage collector for all generations.
This is the default.
.. rts-flag:: --nonmoving-gc
:default: off
:since: 8.10.1
:reverse: --copying-gc
.. index::
single: concurrent mark and sweep
......@@ -292,6 +292,12 @@ usage_text[] = {
" -? Prints this message and exits; the program is not executed",
" --info Print information about the RTS used by this program",
" --nonmoving-gc",
" Selects the non-moving mark-and-sweep garbage collector to",
" manage the oldest generation.",
" --copying-gc",
" Selects the copying garbage collector to manage all generations.",
" -K<size> Sets the maximum stack size (default: 80% of the heap)",
" Egs: -K32k -K512k -K8M",
" -ki<size> Sets the initial thread stack size (default 1k) Egs: -ki4k -ki2m",
......@@ -939,6 +945,11 @@ error = true;
else if (strequal("copying-gc",
&rts_argv[arg][2])) {
RtsFlags.GcFlags.useNonmoving = false;
else if (strequal("nonmoving-gc",
&rts_argv[arg][2])) {
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment