From 770631cc79a655bc5e21184ca15bdb6192e905de Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Thu, 20 Feb 2020 02:45:58 -0500 Subject: stage1: free more heap after analysis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - immediately free dangling IrInstGenConst after analysis - fixup mem::List params `&Allocator` → `*Allocator` --- src/mem_profile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mem_profile.cpp') diff --git a/src/mem_profile.cpp b/src/mem_profile.cpp index ef47c3f426..13ba57f913 100644 --- a/src/mem_profile.cpp +++ b/src/mem_profile.cpp @@ -92,7 +92,7 @@ void Profile::print_report(FILE *file) { auto entry = it.next(); if (!entry) break; - list.append(heap::bootstrap_allocator, &entry->value); + list.append(&heap::bootstrap_allocator, &entry->value); } qsort(list.items, list.length, sizeof(const Entry *), entry_compare); @@ -143,7 +143,7 @@ void Profile::print_report(FILE *file) { fprintf(file, "\n Total calls alloc: %zu, dealloc: %zu, remain: %zu\n", total_calls_alloc, total_calls_dealloc, (total_calls_alloc - total_calls_dealloc)); - list.deinit(heap::bootstrap_allocator); + list.deinit(&heap::bootstrap_allocator); } uint32_t Profile::usage_hash(UsageKey key) { -- cgit v1.2.3