summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPranay Sashank <pranaysashank@gmail.com>2019-09-06 16:41:53 +0530
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-09-12 04:52:33 -0400
commit98b0d6eeff5711e0872abd2ef2d1ee0269b662cf (patch)
treeccc0050dbec7547349a2b282915af68e028a6a25
parent3a7d3923aa9be94b9c01c2d2d4408587eb4a8400 (diff)
downloadhaskell-98b0d6eeff5711e0872abd2ef2d1ee0269b662cf.tar.gz
Print the correct system memory in use with +RTS -s (#17158)
Use `stats.max_mem_in_use_bytes` to print the memory usage instead of `stats.max_live_bytes` which prints maximum residency. Fixes (#17158).
-rw-r--r--rts/Stats.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/Stats.c b/rts/Stats.c
index 461eb7604c..264e1c7877 100644
--- a/rts/Stats.c
+++ b/rts/Stats.c
@@ -685,9 +685,9 @@ static void report_summary(const RTSSummaryStats* sum)
showStgWord64(stats.max_slop_bytes, temp, true/*commas*/);
statsPrintf("%16s bytes maximum slop\n", temp);
- statsPrintf("%16" FMT_Word64 " MB total memory in use (%"
+ statsPrintf("%16" FMT_Word64 " MiB total memory in use (%"
FMT_Word64 " MB lost due to fragmentation)\n\n",
- stats.max_live_bytes / (1024 * 1024),
+ stats.max_mem_in_use_bytes / (1024 * 1024),
sum->fragmentation_bytes / (1024 * 1024));
/* Print garbage collections in each gen */