diff options
-rw-r--r-- | include/malloc.h | 5 | ||||
-rw-r--r-- | libc/stdlib/malloc-standard/mallinfo.c | 8 |
2 files changed, 4 insertions, 9 deletions
diff --git a/include/malloc.h b/include/malloc.h index a289c9317..b16a1105a 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -159,9 +159,8 @@ extern int malloc_trim(size_t pad); # endif /* __USE_GNU */ #include <stdio.h> -/* Prints brief summary statistics to the specified file. - * Writes to stderr if file is NULL. */ -extern void malloc_stats(FILE *file); +/* Prints brief summary statistics on the stderr. */ +extern void malloc_stats(void); /* SVID2/XPG mallopt options */ #ifndef M_MXFAST 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" |