summaryrefslogtreecommitdiff
path: root/rts/sm/GC.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2008-09-09 13:52:51 +0000
committerSimon Marlow <marlowsd@gmail.com>2008-09-09 13:52:51 +0000
commitccb958030d8e3afcef8ef905372f9586e5ada2a3 (patch)
tree72286a8fb2a31cb15e7d46ec2f51cd607890ba87 /rts/sm/GC.c
parent53e85ba144b56a4380e1dba2ef272da61650bcfa (diff)
downloadhaskell-ccb958030d8e3afcef8ef905372f9586e5ada2a3.tar.gz
Separate pruning from marking of spark pools
Fixes crash when using compacting GC in parallel programs
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r--rts/sm/GC.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index ef0c79a6ea..84a15fbaf7 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -724,6 +724,11 @@ GarbageCollect ( rtsBool force_major_gc )
// Update the stable pointer hash table.
updateStablePtrTable(major_gc);
+ // Remove useless sparks from the spark pools
+#ifdef THREADED_RTS
+ pruneSparkQueues();
+#endif
+
// check sanity after GC
IF_DEBUG(sanity, checkSanity());