summaryrefslogtreecommitdiff
path: root/rts/Stats.c
diff options
context:
space:
mode:
authorSimon Marlow <simonmarhaskell@gmail.com>2008-04-16 22:45:41 +0000
committerSimon Marlow <simonmarhaskell@gmail.com>2008-04-16 22:45:41 +0000
commitae267d04df855051b99218e3712b3f56b8016d56 (patch)
treea2ec5173e84e46e515d3bf68e4f370df0ed7467b /rts/Stats.c
parentf4068203328cd00a1935e4f4a8e3cab400db01ea (diff)
downloadhaskell-ae267d04df855051b99218e3712b3f56b8016d56.tar.gz
faster block allocator, by dividing the free list into buckets
Diffstat (limited to 'rts/Stats.c')
-rw-r--r--rts/Stats.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index e331462c50..a00b6392b0 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -552,6 +552,7 @@ StgInt TOTAL_CALLS=1;
statsPrintf(" (SLOW_CALLS_" #arity ") %% of (TOTAL_CALLS) : %.1f%%\n", \
SLOW_CALLS_##arity * 100.0/TOTAL_CALLS)
+extern lnat hw_alloc_blocks;
void
stat_exit(int alloc)
@@ -600,8 +601,9 @@ stat_exit(int alloc)
ullong_format_string(MaxSlop*sizeof(W_), temp, rtsTrue/*commas*/);
statsPrintf("%16s bytes maximum slop\n", temp);
- statsPrintf("%16ld MB total memory in use\n\n",
- mblocks_allocated * MBLOCK_SIZE / (1024 * 1024));
+ statsPrintf("%16ld MB total memory in use (%ld MB lost due to fragmentation)\n\n",
+ mblocks_allocated * MBLOCK_SIZE_W / (1024 * 1024 / sizeof(W_)),
+ (mblocks_allocated * MBLOCK_SIZE_W - hw_alloc_blocks * BLOCK_SIZE_W) / (1024 * 1024 / sizeof(W_)));
/* Print garbage collections in each gen */
for (g = 0; g < RtsFlags.GcFlags.generations; g++) {