summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/sm/GC.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index dd4f026977..d63ca271f9 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -375,7 +375,8 @@ GarbageCollect (uint32_t collect_gen,
static_flag == STATIC_FLAG_A ? STATIC_FLAG_B : STATIC_FLAG_A;
}
- if (major_gc) {
+ /* N.B. We currently don't unload code with the non-moving collector. */
+ if (major_gc && !RtsFlags.GcFlags.useNonmoving) {
unload_mark_needed = prepareUnloadCheck();
} else {
unload_mark_needed = false;