Commit 98b0d6ee authored by Pranay Sashank's avatar Pranay Sashank Committed by Marge Bot

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).
parent 3a7d3923
Pipeline #10087 passed with stages
in 392 minutes and 52 seconds
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment