add ranges for purging

This commit is contained in:
daanx 2024-12-17 11:44:14 -08:00
commit 68a90ceb9a
3 changed files with 54 additions and 45 deletions

View file

@ -305,6 +305,7 @@ int main(int argc, char** argv) {
#endif
#if !defined(NDEBUG) && !defined(USE_STD_MALLOC)
// mi_option_set(mi_option_arena_reserve, 32 * 1024 /* in kib = 32MiB */);
mi_option_set(mi_option_purge_delay,10);
#endif
#if defined(NDEBUG) && !defined(USE_STD_MALLOC)
// mi_option_set(mi_option_purge_delay,-1);
@ -356,8 +357,8 @@ int main(int argc, char** argv) {
mi_debug_show_arenas(true,false,false);
#else
// mi_collect(false);
// mi_debug_show_arenas(true,false,false);
// mi_stats_print(NULL);
mi_debug_show_arenas(true,false,false);
mi_stats_print(NULL);
#endif
#else
mi_stats_print(NULL); // so we see rss/commit/elapsed