summaryrefslogtreecommitdiff
path: root/rts/sm/GC.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2014-11-21 17:05:58 +0000
committerSimon Marlow <marlowsd@gmail.com>2014-11-25 14:37:26 +0000
commit452eb80f15fce8665df52bc9facebfafb5b6267b (patch)
treea34e76ab765b6d1db49b1c05372f8924e52cacf9 /rts/sm/GC.c
parente22bc0dedb9e9da0176ad7ce4a74acbefedc7207 (diff)
downloadhaskell-452eb80f15fce8665df52bc9facebfafb5b6267b.tar.gz
Add +RTS -n<size>: divide the nursery into chunks
See the documentation for details.
Diffstat (limited to 'rts/sm/GC.c')
-rw-r--r--rts/sm/GC.c29
1 files changed, 3 insertions, 26 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 748dc0d6de..9777f32a3b 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -408,10 +408,6 @@ GarbageCollect (nat collect_gen,
break;
}
- if (!DEBUG_IS_ON && n_gc_threads != 1) {
- clearNursery(cap);
- }
-
shutdown_gc_threads(gct->thread_index);
// Now see which stable names are still alive.
@@ -646,21 +642,6 @@ GarbageCollect (nat collect_gen,
}
}
- // Reset the nursery: make the blocks empty
- if (DEBUG_IS_ON || n_gc_threads == 1) {
- for (n = 0; n < n_capabilities; n++) {
- clearNursery(capabilities[n]);
- }
- } else {
- // When doing parallel GC, clearNursery() is called by the
- // worker threads
- for (n = 0; n < n_capabilities; n++) {
- if (gc_threads[n]->idle) {
- clearNursery(capabilities[n]);
- }
- }
- }
-
resize_nursery();
resetNurseries();
@@ -1072,10 +1053,6 @@ gcWorkerThread (Capability *cap)
scavenge_until_all_done();
- if (!DEBUG_IS_ON) {
- clearNursery(cap);
- }
-
#ifdef THREADED_RTS
// Now that the whole heap is marked, we discard any sparks that
// were found to be unreachable. The main GC thread is currently
@@ -1716,9 +1693,9 @@ resize_nursery (void)
}
else
{
- // we might have added extra large blocks to the nursery, so
- // resize back to minAllocAreaSize again.
- resizeNurseriesFixed(RtsFlags.GcFlags.minAllocAreaSize);
+ // we might have added extra blocks to the nursery, so
+ // resize back to the original size again.
+ resizeNurseriesFixed();
}
}
}