From 67a8e2452f3a506265b782e9b7fceb2d9ab1d102 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 4 Jun 2024 12:17:43 +0900 Subject: [PATCH] Minor refactoring and note in source code --- src/another_memcheck.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/another_memcheck.cc b/src/another_memcheck.cc index 653b3dc..1ddcffd 100644 --- a/src/another_memcheck.cc +++ b/src/another_memcheck.cc @@ -71,12 +71,12 @@ namespace SC_AM_Internal { } void Stats::print_status() const { + // This function intentionally does not free its list of malloced memory as + // it is expected for the OS to reclaim memory from stopped processes and + // this function only runs at the end of program execution. std::clog << "List of unfreed memory:\n"; auto *node = malloced_list; - [[maybe_unused]] - decltype(node) parent_node; while (node->next != nullptr) { - parent_node = node; node = node->next; std::clog << " " << node->data->address << ": size " << node->data->size << '\n';