2 #ifdef JEMALLOC_H_TYPES
4 typedef struct ctl_node_s ctl_node_t;
5 typedef struct ctl_named_node_s ctl_named_node_t;
6 typedef struct ctl_indexed_node_s ctl_indexed_node_t;
7 typedef struct ctl_arena_stats_s ctl_arena_stats_t;
8 typedef struct ctl_stats_s ctl_stats_t;
12 #ifdef JEMALLOC_H_STRUCTS
18 struct ctl_named_node_s {
19 struct ctl_node_s node;
23 const ctl_node_t *children;
24 int (*ctl)(tsd_t *,
const size_t *,
size_t,
void *,
28 struct ctl_indexed_node_s {
29 struct ctl_node_s node;
30 const ctl_named_node_t *(*index)(tsdn_t *,
const size_t *,
size_t,
34 struct ctl_arena_stats_s {
48 size_t allocated_small;
53 malloc_bin_stats_t bstats[JM_NBINS];
54 malloc_large_stats_t *lstats;
55 malloc_huge_stats_t *hstats;
71 #ifdef JEMALLOC_H_EXTERNS
73 int ctl_byname(tsd_t *tsd,
const char *
name,
void *oldp,
size_t *oldlenp,
74 void *newp,
size_t newlen);
78 int ctl_bymib(tsd_t *tsd,
const size_t *mib,
size_t miblen,
void *oldp,
79 size_t *oldlenp,
void *newp,
size_t newlen);
85 #define xmallctl(name, oldp, oldlenp, newp, newlen) do { \
86 if (je_mallctl(name, oldp, oldlenp, newp, newlen) \
89 "<jemalloc>: Failure in xmallctl(\"%s\", ...)\n", \
95 #define xmallctlnametomib(name, mibp, miblenp) do { \
96 if (je_mallctlnametomib(name, mibp, miblenp) != 0) { \
97 malloc_printf("<jemalloc>: Failure in " \
98 "xmallctlnametomib(\"%s\", ...)\n", name); \
103 #define xmallctlbymib(mib, miblen, oldp, oldlenp, newp, newlen) do { \
104 if (je_mallctlbymib(mib, miblen, oldp, oldlenp, newp, \
107 "<jemalloc>: Failure in xmallctlbymib()\n"); \
114 #ifdef JEMALLOC_H_INLINES
#define ctl_postfork_parent
#define ctl_postfork_child
static unsigned int nthreads