This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug malloc/22439] New: malloc_info should compute summary statistics for all sub-heaps in an arena


https://sourceware.org/bugzilla/show_bug.cgi?id=22439

            Bug ID: 22439
           Summary: malloc_info should compute summary statistics for all
                    sub-heaps in an arena
           Product: glibc
           Version: 2.26
            Status: NEW
          Severity: normal
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: fweimer at redhat dot com
  Target Milestone: ---
             Flags: security-

The current code only looks at the top-most heap:

      if (ar_ptr != &main_arena)
        {
          heap_info *heap = heap_for_ptr (top (ar_ptr));
          fprintf (fp,
                   "<aspace type=\"total\" size=\"%zu\"/>\n"
                   "<aspace type=\"mprotect\" size=\"%zu\"/>\n",
                   heap->size, heap->mprotect_size);
          total_aspace += heap->size;
          total_aspace_mprotect += heap->mprotect_size;
        }

Instead it should compute the some of heap->size and heap->mprotect_size, each
over all the heaps.  It may also make sense to add another item with the number
of sub-heaps.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]