From bd3392466b151767ad449f82007091d693e685ae Mon Sep 17 00:00:00 2001 From: daanx Date: Sun, 5 Jan 2025 11:39:42 -0800 Subject: [PATCH] remove mi_debug_show_arenas parameter --- include/mimalloc.h | 2 +- src/arena.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/include/mimalloc.h b/include/mimalloc.h index 281f5ead..10695def 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -276,7 +276,7 @@ mi_decl_export int mi_reserve_huge_os_pages_at(size_t pages, int numa_node, size mi_decl_export int mi_reserve_os_memory(size_t size, bool commit, bool allow_large) mi_attr_noexcept; mi_decl_export bool mi_manage_os_memory(void* start, size_t size, bool is_committed, bool is_pinned /* cannot decommit/reset? */, bool is_zero, int numa_node) mi_attr_noexcept; -mi_decl_export void mi_debug_show_arenas(bool show_pages, bool narrow) mi_attr_noexcept; +mi_decl_export void mi_debug_show_arenas(void) mi_attr_noexcept; // Experimental: heaps associated with specific memory arena's typedef void* mi_arena_id_t; diff --git a/src/arena.c b/src/arena.c index 55b6fb9b..f7e7b44a 100644 --- a/src/arena.c +++ b/src/arena.c @@ -1438,7 +1438,7 @@ static size_t mi_debug_show_bitmap_binned(const char* header1, const char* heade return mi_debug_show_chunks(header1, header2, header3, slice_count, mi_bitmap_chunk_count(bitmap), &bitmap->chunks[0], chunk_bins, invert, arena, narrow); } -void mi_debug_show_arenas(bool show_pages, bool narrow) mi_attr_noexcept { +static void mi_debug_show_arenas_ex(bool show_pages, bool narrow) mi_attr_noexcept { mi_subproc_t* subproc = _mi_subproc(); size_t max_arenas = mi_arenas_get_count(subproc); //size_t free_total = 0; @@ -1473,6 +1473,10 @@ void mi_debug_show_arenas(bool show_pages, bool narrow) mi_attr_noexcept { if (show_pages) _mi_output_message("total pages in arenas: %zu\n", page_total); } +void mi_debug_show_arenas(void) mi_attr_noexcept { + mi_debug_show_arenas_ex(true /* show pages */, false /* narrow? */); +} + /* ----------------------------------------------------------- Reserve a huge page arena.