[Bug malloc/27928] New: mallinfo doc contains incorrect information about arenas

crusaderky at gmail dot com sourceware-bugzilla@sourceware.org
Fri May 28 13:17:55 GMT 2021


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

            Bug ID: 27928
           Summary: mallinfo doc contains incorrect information about
                    arenas
           Product: glibc
           Version: 2.33
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: crusaderky at gmail dot com
  Target Milestone: ---

The mallinfo/mallinfo2 man and info pages state:

       Information is returned for only the main memory allocation area.   Al‐
       locations  in  other arenas are excluded.  See malloc_stats(3) and mal‐
       loc_info(3) for alternatives that include information about other  are‐
       nas.


This to me seems to be incorrect; by reading the source code I understand that
mallinfo/mallinfo2 return the sum of all arenas ("Total" section in
malloc_stats) and not just that of the main arena ("Arena 0" in malloc_stats).

On a related note, it would help to have the printf in malloc_stats tweaked to
clarify that "Arena 0" is a synonym for the main arena.

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


More information about the Glibc-bugs mailing list