diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2020-02-20 02:45:58 -0500 |
|---|---|---|
| committer | Michael Dusan <michael.dusan@gmail.com> | 2020-02-20 21:05:37 -0500 |
| commit | 770631cc79a655bc5e21184ca15bdb6192e905de (patch) | |
| tree | 9d9952d5e25df9891217a99f2d0f9aff2ef14caf /src/mem_profile.cpp | |
| parent | e381a42de9c0f0c5439a926b0ac99026a0373f49 (diff) | |
| download | zig-770631cc79a655bc5e21184ca15bdb6192e905de.tar.gz zig-770631cc79a655bc5e21184ca15bdb6192e905de.zip | |
stage1: free more heap after analysis
- immediately free dangling IrInstGenConst after analysis
- fixup mem::List params `&Allocator` → `*Allocator`
Diffstat (limited to 'src/mem_profile.cpp')
| -rw-r--r-- | src/mem_profile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |
