1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-07 06:43:00 +03:00

Remove mi_arena nested function.

This commit is contained in:
Ondřej Bílka
2014-05-30 13:24:56 +02:00
parent 20c138997a
commit 987c02692a
2 changed files with 130 additions and 130 deletions

View File

@@ -1,3 +1,7 @@
2014-05-30 Ondřej Bílka <neleai@seznam.cz>
* malloc/malloc.c (malloc_info): Inline mi_arena.
2014-05-29 Richard Henderson <rth@twiddle.net> 2014-05-29 Richard Henderson <rth@twiddle.net>
* sysdeps/unix/sysv/linux/aarch64/sysdep.h (INTERNAL_VSYSCALL_NCS): * sysdeps/unix/sysv/linux/aarch64/sysdep.h (INTERNAL_VSYSCALL_NCS):

View File

@@ -5004,8 +5004,16 @@ malloc_info (int options, FILE *fp)
size_t total_aspace = 0; size_t total_aspace = 0;
size_t total_aspace_mprotect = 0; size_t total_aspace_mprotect = 0;
void
mi_arena (mstate ar_ptr)
if (__malloc_initialized < 0)
ptmalloc_init ();
fputs ("<malloc version=\"1\">\n", fp);
/* Iterate over all arenas currently in use. */
mstate ar_ptr = &main_arena;
do
{ {
fprintf (fp, "<heap nr=\"%d\">\n<sizes>\n", n++); fprintf (fp, "<heap nr=\"%d\">\n<sizes>\n", n++);
@@ -5092,12 +5100,12 @@ malloc_info (int options, FILE *fp)
for (size_t i = 0; i < nsizes; ++i) for (size_t i = 0; i < nsizes; ++i)
if (sizes[i].count != 0 && i != NFASTBINS) if (sizes[i].count != 0 && i != NFASTBINS)
fprintf (fp, " \ fprintf (fp, " \
<size from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n", <size from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n",
sizes[i].from, sizes[i].to, sizes[i].total, sizes[i].count); sizes[i].from, sizes[i].to, sizes[i].total, sizes[i].count);
if (sizes[NFASTBINS].count != 0) if (sizes[NFASTBINS].count != 0)
fprintf (fp, "\ fprintf (fp, "\
<unsorted from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n", <unsorted from=\"%zu\" to=\"%zu\" total=\"%zu\" count=\"%zu\"/>\n",
sizes[NFASTBINS].from, sizes[NFASTBINS].to, sizes[NFASTBINS].from, sizes[NFASTBINS].to,
sizes[NFASTBINS].total, sizes[NFASTBINS].count); sizes[NFASTBINS].total, sizes[NFASTBINS].count);
@@ -5133,18 +5141,6 @@ malloc_info (int options, FILE *fp)
} }
fputs ("</heap>\n", fp); fputs ("</heap>\n", fp);
}
if (__malloc_initialized < 0)
ptmalloc_init ();
fputs ("<malloc version=\"1\">\n", fp);
/* Iterate over all arenas currently in use. */
mstate ar_ptr = &main_arena;
do
{
mi_arena (ar_ptr);
ar_ptr = ar_ptr->next; ar_ptr = ar_ptr->next;
} }
while (ar_ptr != &main_arena); while (ar_ptr != &main_arena);