Minor refactoring and note in source code
This commit is contained in:
parent
2249bed677
commit
67a8e2452f
1 changed files with 3 additions and 3 deletions
|
@ -71,12 +71,12 @@ namespace SC_AM_Internal {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stats::print_status() const {
|
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";
|
std::clog << "List of unfreed memory:\n";
|
||||||
auto *node = malloced_list;
|
auto *node = malloced_list;
|
||||||
[[maybe_unused]]
|
|
||||||
decltype(node) parent_node;
|
|
||||||
while (node->next != nullptr) {
|
while (node->next != nullptr) {
|
||||||
parent_node = node;
|
|
||||||
node = node->next;
|
node = node->next;
|
||||||
|
|
||||||
std::clog << " " << node->data->address << ": size " << node->data->size << '\n';
|
std::clog << " " << node->data->address << ": size " << node->data->size << '\n';
|
||||||
|
|
Loading…
Reference in a new issue