diff options
Diffstat (limited to 'rts/sm/Storage.c')
-rw-r--r-- | rts/sm/Storage.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c index 379d9da769..afb171b568 100644 --- a/rts/sm/Storage.c +++ b/rts/sm/Storage.c @@ -684,7 +684,10 @@ StgPtr allocate (Capability *cap, W_ n) TICK_ALLOC_HEAP_NOCTR(WDS(n)); CCS_ALLOC(cap->r.rCCCS,n); - + if (cap->r.rCurrentTSO != NULL) { + cap->r.rCurrentTSO->alloc_limit -= n*sizeof(W_); + } + if (n >= LARGE_OBJECT_THRESHOLD/sizeof(W_)) { // The largest number of words such that // the computation of req_blocks will not overflow. @@ -829,6 +832,9 @@ allocatePinned (Capability *cap, W_ n) TICK_ALLOC_HEAP_NOCTR(WDS(n)); CCS_ALLOC(cap->r.rCCCS,n); + if (cap->r.rCurrentTSO != NULL) { + cap->r.rCurrentTSO->alloc_limit -= n*sizeof(W_); + } bd = cap->pinned_object_block; |