From 4bb6c06cac026c15d72fda6b73a8a82bedef26fc Mon Sep 17 00:00:00 2001 From: FeralChild64 Date: Fri, 27 Dec 2019 18:09:16 +0100 Subject: [PATCH] build tool statistics fix --- src/build_segment.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/build_segment.cc b/src/build_segment.cc index 877d2591..d1dc4e59 100644 --- a/src/build_segment.cc +++ b/src/build_segment.cc @@ -420,7 +420,7 @@ void prepareBinningProblem() logOutput << "\n" << "free space (after floating routines are placed): " << - std::to_string(CMD_hiAddress - CMD_loAddress - GLOBAL_totalRoutinesSize) << "\n" << + std::to_string(CMD_hiAddress - CMD_loAddress + 1 - GLOBAL_totalRoutinesSize) << "\n" << "number of floating routines: " << std::to_string(GLOBAL_binningProblem.floatingRoutines.size()) << "\n" << "number of gaps for the floating routines: " << @@ -730,7 +730,6 @@ void BinningProblem::fillGap(DualStream &logOutput, int gapAddress, const std::l else if (!isSolved()) { logOutput << "filled in - dropped bytes: " << gaps[gapAddress] - offset << "\n"; - statFree -= gaps[gapAddress] - offset; statWasted += gaps[gapAddress] - offset; } else @@ -878,7 +877,7 @@ void Solver::run() logOutput << "segment statistics:" << "\n"; // logOutput << " - total size: " << problem.statSize << "\n"; - for BASIC contains filling gap too logOutput << " - wasted bytes: " << problem.statWasted << "\n"; - logOutput << " - still free: " << problem.statFree << "\n\n"; + logOutput << " - still free: " << problem.statFree - problem.statWasted << "\n\n"; } // Close the log file