diff options
Diffstat (limited to 'libc/include/malloc.h')
-rw-r--r-- | libc/include/malloc.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/libc/include/malloc.h b/libc/include/malloc.h index e6ea276..cb1dd3b 100644 --- a/libc/include/malloc.h +++ b/libc/include/malloc.h @@ -24,6 +24,7 @@ */ #include <sys/cdefs.h> #include <stddef.h> +#include <stdio.h> __BEGIN_DECLS @@ -53,6 +54,27 @@ struct mallinfo { extern struct mallinfo mallinfo(void); +/* + * XML structure for malloc_info(3) is in the following format: + * + * <malloc version="jemalloc-1"> + * <heap nr="INT"> + * <allocated-large>INT</allocated-large> + * <allocated-huge>INT</allocated-huge> + * <allocated-bins>INT</allocated-bins> + * <bins-total>INT</bins-total> + * <bin nr="INT"> + * <allocated>INT</allocated> + * <nmalloc>INT</nmalloc> + * <ndalloc>INT</ndalloc> + * </bin> + * <!-- more bins --> + * </heap> + * <!-- more heaps --> + * </malloc> + */ +extern int malloc_info(int, FILE *); + __END_DECLS #endif /* LIBC_INCLUDE_MALLOC_H_ */ |