public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/27928] New: mallinfo doc contains incorrect information about arenas
@ 2021-05-28 13:17 crusaderky at gmail dot com
  2021-06-02  6:25 ` [Bug malloc/27928] " alucca388 at gmail dot com
  2021-06-02  7:54 ` crusaderky at gmail dot com
  0 siblings, 2 replies; 3+ messages in thread
From: crusaderky at gmail dot com @ 2021-05-28 13:17 UTC (permalink / raw)
  To: glibc-bugs

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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug malloc/27928] mallinfo doc contains incorrect information about arenas
  2021-05-28 13:17 [Bug malloc/27928] New: mallinfo doc contains incorrect information about arenas crusaderky at gmail dot com
@ 2021-06-02  6:25 ` alucca388 at gmail dot com
  2021-06-02  7:54 ` crusaderky at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: alucca388 at gmail dot com @ 2021-06-02  6:25 UTC (permalink / raw)
  To: glibc-bugs

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

Anna Lucca <alucca388 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alucca388 at gmail dot com

--- Comment #1 from Anna Lucca <alucca388 at gmail dot com> ---
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.
I don't see anything wrong here https://impostor-game.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bug malloc/27928] mallinfo doc contains incorrect information about arenas
  2021-05-28 13:17 [Bug malloc/27928] New: mallinfo doc contains incorrect information about arenas crusaderky at gmail dot com
  2021-06-02  6:25 ` [Bug malloc/27928] " alucca388 at gmail dot com
@ 2021-06-02  7:54 ` crusaderky at gmail dot com
  1 sibling, 0 replies; 3+ messages in thread
From: crusaderky at gmail dot com @ 2021-06-02  7:54 UTC (permalink / raw)
  To: glibc-bugs

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

--- Comment #2 from crusaderky at gmail dot com ---
The function shows the sum of all arenas - arena 0 + arena 1 + arena 2 + ...
The documentation says it only shows the "main" arena, or arena 0, which is the
first one. This is not correct.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-02  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 13:17 [Bug malloc/27928] New: mallinfo doc contains incorrect information about arenas crusaderky at gmail dot com
2021-06-02  6:25 ` [Bug malloc/27928] " alucca388 at gmail dot com
2021-06-02  7:54 ` crusaderky at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).