• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 struct mallinfo {
22   int arena;
23   int ordblks;
24   int smblks;
25   int hblks;
26   int hblkhd;
27   int usmblks;
28   int fsmblks;
29   int uordblks;
30   int fordblks;
31   int keepcost;
32 };
33 
34 struct mallinfo mallinfo(void);
35 
36 struct mallinfo2 {
37   size_t arena;
38   size_t ordblks;
39   size_t smblks;
40   size_t hblks;
41   size_t hblkhd;
42   size_t usmblks;
43   size_t fsmblks;
44   size_t uordblks;
45   size_t fordblks;
46   size_t keepcost;
47 };
48 
49 struct mallinfo2 mallinfo2(void);
50 
51 #ifdef __cplusplus
52 }
53 #endif
54 
55 #endif
56