1 #ifndef _MALLOC_H 2 #define _MALLOC_H 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 #define __NEED_size_t 9 10 #include <bits/alltypes.h> 11 12 void *malloc (size_t); 13 void *calloc (size_t, size_t); 14 void *realloc (void *, size_t); 15 void free (void *); 16 void *valloc (size_t); 17 void *memalign(size_t, size_t); 18 19 size_t malloc_usable_size(void *); 20 21 #define __MALLINFO_BODY \ 22 size_t arena; \ 23 size_t ordblks; \ 24 size_t smblks; \ 25 size_t hblks; \ 26 size_t hblkhd; \ 27 size_t usmblks; \ 28 size_t fsmblks; \ 29 size_t uordblks; \ 30 size_t fordblks; \ 31 size_t keepcost; 32 33 struct mallinfo { __MALLINFO_BODY }; 34 35 struct mallinfo mallinfo(void); 36 37 struct mallinfo2 { __MALLINFO_BODY }; 38 39 struct mallinfo2 mallinfo2(void); 40 41 #ifdef __cplusplus 42 } 43 #endif 44 45 #endif 46