summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-09-21 13:20:37 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-09-21 13:46:47 +0100
commitc19f2e320a575a66d31c83d846ce3cc954c4ab3b (patch)
treed7747d62658d1ab52fe2a2310fe3a3f66cc11ac8 /rts
parent016fd74d6517512b62b36ff12cdccf2e723a0fb3 (diff)
downloadhaskell-c19f2e320a575a66d31c83d846ce3cc954c4ab3b.tar.gz
Include pinned memory in the stats for allocated memory
This broke with the changes to the pinned object handling in 67f4ab7e6b7705a9d617c6109a8c5434ede13cae.
Diffstat (limited to 'rts')
-rw-r--r--rts/sm/GC.c2
-rw-r--r--rts/sm/Storage.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 03c306857e..8b92ca82cb 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -290,7 +290,7 @@ GarbageCollect (nat collect_gen,
// gather blocks allocated using allocatePinned() from each capability
// and put them on the g0->large_object list.
- collect_pinned_object_blocks();
+ allocated += collect_pinned_object_blocks();
// Initialise all the generations/steps that we're collecting.
for (g = 0; g <= N; g++) {
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index dd2ee31088..e5258c2517 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -764,6 +764,7 @@ allocatePinned (Capability *cap, W_ n)
// g0->large_objects.
if (bd != NULL) {
dbl_link_onto(bd, &cap->pinned_object_blocks);
+ cap->total_allocated += bd->free - bd->start;
}
// We need to find another block. We could just allocate one,