]> sourceware.org Git - newlib-cygwin.git/blob - winsup/cygwin/dlmalloc.h
* environ.cc (environ_init): Avoid a compiler warning.
[newlib-cygwin.git] / winsup / cygwin / dlmalloc.h
1
2 /*
3 * Header file for BBCized version of Doug Lea's malloc.c, automatically
4 * generated by
5 * /source/prod/libbbc/compat/dlmalloc/cvt
6 * from
7 * /source/prod/libbbc/compat/dlmalloc/malloc.c
8 *
9 * bbclabel: autogenerated
10 */
11
12 void malloc_outofmem(void (*)(void));
13
14
15 struct mallinfo {
16 int arena; /* total space allocated from system */
17 int ordblks; /* number of non-inuse chunks */
18 int smblks; /* unused -- always zero */
19 int hblks; /* number of mmapped regions */
20 int hblkhd; /* total space in mmapped regions */
21 int usmblks; /* unused -- always zero */
22 int fsmblks; /* unused -- always zero */
23 int uordblks; /* total allocated space */
24 int fordblks; /* total non-inuse space */
25 int keepcost; /* top-most, releasable (via malloc_trim) space */
26 };
27
28
29 #define M_MXFAST 1 /* UNUSED in this malloc */
30 #define M_NLBLKS 2 /* UNUSED in this malloc */
31 #define M_GRAIN 3 /* UNUSED in this malloc */
32 #define M_KEEP 4 /* UNUSED in this malloc */
33
34
35 #define M_TRIM_THRESHOLD -1
36 #define M_TOP_PAD -2
37 #define M_MMAP_THRESHOLD -3
38 #define M_MMAP_MAX -4
39 #define M_SCANHEAP -5
40 #define M_FILL
41
42 #ifdef MALLOC_DEBUG
43
44 #define malloc(size) malloc_dbg(size, __FILE__, __LINE__)
45 #define free(p) free_dbg(p, __FILE__, __LINE__)
46 #define realloc(p, size) realloc_dbg(p, size, __FILE__, __LINE__)
47 #define calloc(n, size) calloc_dbg(n, size, __FILE__, __LINE__)
48 #define memalign(align, size) memalign_dbg(align, size, __FILE__, __LINE__)
49 #define valloc(size) valloc_dbg(size, __FILE__, __LINE__)
50 #define pvalloc(size) pvalloc_dbg(size, __FILE__, __LINE__)
51 #define cfree(p) cfree_dbg(p, __FILE__, __LINE__)
52 #define malloc_trim(pad) malloc_trim_dbg(pad, __FILE__, __LINE__)
53 #define malloc_usable_size(p) malloc_usable_size_dbg(p, __FILE__, __LINE__)
54 #define malloc_stats() malloc_stats_dbg(__FILE__, __LINE__)
55 #define mallopt(flag, val) mallopt_dbg(flag, val, __FILE__, __LINE__)
56 #define mallinfo() mallinfo_dbg(__FILE__, __LINE__)
57
58
59 #ifdef __cplusplus
60 extern "C" {
61 #endif
62 void* malloc_dbg(size_t, const char *, int);
63 void free_dbg(void*, const char *, int);
64 void* realloc_dbg(void*, size_t, const char *, int);
65 void* calloc_dbg(size_t, size_t, const char *, int);
66 void* memalign_dbg(size_t, size_t, const char *, int);
67 void* valloc_dbg(size_t, const char *, int);
68 void* pvalloc_dbg(size_t, const char *, int);
69 void cfree_dbg(void*, const char *, int);
70 int malloc_trim_dbg(size_t, const char *, int);
71 size_t malloc_usable_size_dbg(void*, const char *, int);
72 void malloc_stats_dbg(const char *, int);
73 int mallopt_dbg(int, int, const char *, int);
74 struct mallinfo mallinfo_dbg(const char *, int);
75 #ifdef __cplusplus
76 }
77 #endif
78
79 #endif /* MALLOC_DEBUG */
80
81 #ifndef MALLOC_DEBUG
82
83 void* malloc(size_t);
84 void free(void*);
85 void* realloc(void*, size_t);
86 void* calloc(size_t, size_t);
87 void* memalign(size_t, size_t);
88 void* valloc(size_t);
89 void* pvalloc(size_t);
90 void cfree(void*);
91 int malloc_trim(size_t);
92 size_t malloc_usable_size(void*);
93 void malloc_stats(void);
94 int mallopt(int, int);
95 struct mallinfo mallinfo(void);
96 #endif /* !MALLOC_DEBUG */
This page took 0.097077 seconds and 5 git commands to generate.