The BUGS section already explains why you need to be cautious about using mallinfo, but given the number of bug reports we see on Android, it seems not many people are reading that far. Call it out up front. --- man3/mallinfo.3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man3/mallinfo.3 b/man3/mallinfo.3 index 0cf773882..677a9a1cf 100644 --- a/man3/mallinfo.3 +++ b/man3/mallinfo.3 @@ -37,7 +37,14 @@ function returns a copy of a structure containing information about memory allocations performed by .BR malloc (3) and related functions. -This structure is defined as follows: +.PP +Note that not all allocations are visible to +.BR mallinfo (); +see BUGS and consider using +.BR malloc_info (3) +instead. +.PP +The returned structure is defined as follows: .PP .in +4n .EX -- 2.21.0.1020.gf2820cf01a-goog
From d3d6c39837796826ea9138aba6484d639b18a8e7 Mon Sep 17 00:00:00 2001 From: Elliott Hughes <enh@xxxxxxxxxx> Date: Tue, 30 Apr 2019 12:28:23 -0700 Subject: [PATCH] mallinfo.3: discourage use. The BUGS section already explains why you need to be cautious about using mallinfo, but given the number of bug reports we see on Android, it seems not many people are reading that far. Call it out up front. --- man3/mallinfo.3 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/man3/mallinfo.3 b/man3/mallinfo.3 index 0cf773882..677a9a1cf 100644 --- a/man3/mallinfo.3 +++ b/man3/mallinfo.3 @@ -37,7 +37,14 @@ function returns a copy of a structure containing information about memory allocations performed by .BR malloc (3) and related functions. -This structure is defined as follows: +.PP +Note that not all allocations are visible to +.BR mallinfo (); +see BUGS and consider using +.BR malloc_info (3) +instead. +.PP +The returned structure is defined as follows: .PP .in +4n .EX -- 2.21.0.1020.gf2820cf01a-goog