public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug manual/32181] New: malloc_info should be documented
@ 2024-09-16 21:53 naesten at gmail dot com
0 siblings, 0 replies; only message in thread
From: naesten at gmail dot com @ 2024-09-16 21:53 UTC (permalink / raw)
To: glibc-bugs
https://sourceware.org/bugzilla/show_bug.cgi?id=32181
Bug ID: 32181
Summary: malloc_info should be documented
Product: glibc
Version: 2.41
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: manual
Assignee: unassigned at sourceware dot org
Reporter: naesten at gmail dot com
CC: mtk.manpages at gmail dot com
Target Milestone: ---
It would be good if malloc_info was mentioned in the manual, because:
1. I have wasted entirely too much time wondering if it was deliberately
omitted or simply forgotten. (My conclusion: if you wanted people to avoid
using it, you would just say so explicitly rather than removing it.)
2. It would be nice to see some official guidance on format stability, when
to use/avoid it, etc.
3. Bionic says:
```c
#ifndef STRUCT_MALLINFO_DECLARED
#define STRUCT_MALLINFO_DECLARED 1
struct mallinfo { __MALLINFO_BODY };
#endif
/**
* [mallinfo(3)](http://man7.org/linux/man-pages/man3/mallinfo.3.html) returns
* information about the current state of the heap. Note that mallinfo() is
* inherently unreliable and consider using malloc_info() instead.
*/
struct mallinfo mallinfo(void);
/**
* On Android the struct mallinfo and struct mallinfo2 are the same.
*/
struct mallinfo2 { __MALLINFO_BODY };
/**
* [mallinfo2(3)](http://man7.org/linux/man-pages/man3/mallinfo2.3.html)
returns
* information about the current state of the heap. Note that mallinfo2() is
* inherently unreliable and consider using malloc_info() instead.
*/
struct mallinfo2 mallinfo2(void) __RENAME(mallinfo);
```
and I was hoping the glibc manual would offer another perspective ("inherently
unreliable" seems ... a tad strong).
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-09-16 21:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-09-16 21:53 [Bug manual/32181] New: malloc_info should be documented naesten 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).