summaryrefslogtreecommitdiff
path: root/rts/Schedule.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/Schedule.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/Schedule.c')
-rw-r--r--rts/Schedule.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index 447b70ef52..f25b37288d 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1169,6 +1169,12 @@ scheduleHandleHeapOverflow( Capability *cap, StgTSO *t )
}
}
+ if (getNewNursery(cap)) {
+ debugTrace(DEBUG_sched, "thread %ld got a new nursery", t->id);
+ pushOnRunQueue(cap,t);
+ return rtsFalse;
+ }
+
if (cap->r.rHpLim == NULL || cap->context_switch) {
// Sometimes we miss a context switch, e.g. when calling
// primitives in a tight loop, MAYBE_GC() doesn't check the