diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-06 18:03:01 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-12-09 07:50:59 +0100 |
commit | b6af57f98021bc3b1b8183cfb501a5c45293cdd7 (patch) | |
tree | 5ff406adfeb401d6a40b535bd12297c888273806 /libc | |
parent | 75cb2a2b2501e022b94d16d3db2b0e9da1979388 (diff) |
Make malloc_stats() GNU libc compatible
This fix commit 76dfc7ce8c "Some requested additional malloc entry points"
from 2004's
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/stdlib/malloc-standard/mallinfo.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/libc/stdlib/malloc-standard/mallinfo.c b/libc/stdlib/malloc-standard/mallinfo.c index 3064e53b0..dbe4d49b8 100644 --- a/libc/stdlib/malloc-standard/mallinfo.c +++ b/libc/stdlib/malloc-standard/mallinfo.c @@ -81,16 +81,12 @@ struct mallinfo mallinfo(void) } libc_hidden_def(mallinfo) -void malloc_stats(FILE *file) +void malloc_stats(void) { struct mallinfo mi; - if (file==NULL) { - file = stderr; - } - mi = mallinfo(); - fprintf(file, + fprintf(stderr, "total bytes allocated = %10u\n" "total bytes in use bytes = %10u\n" "total non-mmapped bytes allocated = %10d\n" |