Fix malloc_stats_print(..., "a") output.
Fix the logic in stats_print() such that if the "a" flag is passed in without the "m" flag, merged statistics will be printed even if only one arena is initialized.
This commit is contained in:
parent
12a4887826
commit
334cc02142
@ -748,7 +748,7 @@ stats_print(void (*write_cb)(void *, const char *), void *cbopaque,
|
|||||||
ninitialized++;
|
ninitialized++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ninitialized > 1) {
|
if (ninitialized > 1 || unmerged == false) {
|
||||||
/* Print merged arena stats. */
|
/* Print merged arena stats. */
|
||||||
malloc_cprintf(write_cb, cbopaque,
|
malloc_cprintf(write_cb, cbopaque,
|
||||||
"\nMerged arenas stats:\n");
|
"\nMerged arenas stats:\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user