]>
git.saurik.com Git - redis.git/blob - deps/jemalloc/include/jemalloc/jemalloc.h.in
580a5ec5d5fa97f76d799f7743376c2965ba4759
10 #define JEMALLOC_VERSION "@jemalloc_version@"
11 #define JEMALLOC_VERSION_MAJOR @jemalloc_version_major@
12 #define JEMALLOC_VERSION_MINOR @jemalloc_version_minor@
13 #define JEMALLOC_VERSION_BUGFIX @jemalloc_version_bugfix@
14 #define JEMALLOC_VERSION_NREV @jemalloc_version_nrev@
15 #define JEMALLOC_VERSION_GID "@jemalloc_version_gid@"
17 #include "jemalloc_defs@install_suffix@.h"
19 # define JEMALLOC_P(s) s
22 #define ALLOCM_LG_ALIGN(la) (la)
23 #if LG_SIZEOF_PTR == 2
24 #define ALLOCM_ALIGN(a) (ffs(a)-1)
26 #define ALLOCM_ALIGN(a) ((a < (size_t)INT_MAX) ? ffs(a)-1 : ffs(a>>32)+31)
28 #define ALLOCM_ZERO ((int)0x40)
29 #define ALLOCM_NO_MOVE ((int)0x80)
31 #define ALLOCM_SUCCESS 0
32 #define ALLOCM_ERR_OOM 1
33 #define ALLOCM_ERR_NOT_MOVED 2
35 extern const char *JEMALLOC_P(malloc_conf
);
36 extern void (*JEMALLOC_P(malloc_message
))(void *, const char *);
38 void *JEMALLOC_P(malloc
)(size_t size
) JEMALLOC_ATTR(malloc
);
39 void *JEMALLOC_P(calloc
)(size_t num
, size_t size
) JEMALLOC_ATTR(malloc
);
40 int JEMALLOC_P(posix_memalign
)(void **memptr
, size_t alignment
, size_t size
)
41 JEMALLOC_ATTR(nonnull(1));
42 void *JEMALLOC_P(realloc
)(void *ptr
, size_t size
);
43 void JEMALLOC_P(free
)(void *ptr
);
45 size_t JEMALLOC_P(malloc_usable_size
)(const void *ptr
);
46 void JEMALLOC_P(malloc_stats_print
)(void (*write_cb
)(void *, const char *),
47 void *cbopaque
, const char *opts
);
48 int JEMALLOC_P(mallctl
)(const char *name
, void *oldp
, size_t *oldlenp
,
49 void *newp
, size_t newlen
);
50 int JEMALLOC_P(mallctlnametomib
)(const char *name
, size_t *mibp
,
52 int JEMALLOC_P(mallctlbymib
)(const size_t *mib
, size_t miblen
, void *oldp
,
53 size_t *oldlenp
, void *newp
, size_t newlen
);
55 int JEMALLOC_P(allocm
)(void **ptr
, size_t *rsize
, size_t size
, int flags
)
56 JEMALLOC_ATTR(nonnull(1));
57 int JEMALLOC_P(rallocm
)(void **ptr
, size_t *rsize
, size_t size
,
58 size_t extra
, int flags
) JEMALLOC_ATTR(nonnull(1));
59 int JEMALLOC_P(sallocm
)(const void *ptr
, size_t *rsize
, int flags
)
60 JEMALLOC_ATTR(nonnull(1));
61 int JEMALLOC_P(dallocm
)(void *ptr
, int flags
) JEMALLOC_ATTR(nonnull(1));
66 #endif /* JEMALLOC_H_ */