diff options
| author | raczman <none@none> | 2010-04-20 10:58:41 +0200 |
|---|---|---|
| committer | raczman <none@none> | 2010-04-20 10:58:41 +0200 |
| commit | 1532a2f9a2b227e0011a81959403a3b0b05153ba (patch) | |
| tree | 293e9bea38c5caee2fcef1c8cc1fcf38b505ece9 /dep/include/jemalloc/jemalloc.h.in | |
| parent | b34e2bdb1c988450d9737d7565f9d357edff4dc7 (diff) | |
Use jemalloc as memory allocator on linux.
In comparison to standard glibc allocator,
jemalloc fargments adress space less,
and scales linearly in multithreaded environment.
Author: Jason Evans, mad props to him.
--HG--
branch : trunk
Diffstat (limited to 'dep/include/jemalloc/jemalloc.h.in')
| -rw-r--r-- | dep/include/jemalloc/jemalloc.h.in | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/dep/include/jemalloc/jemalloc.h.in b/dep/include/jemalloc/jemalloc.h.in new file mode 100644 index 00000000000..8ef8183686e --- /dev/null +++ b/dep/include/jemalloc/jemalloc.h.in @@ -0,0 +1,42 @@ +#ifndef JEMALLOC_H_ +#define JEMALLOC_H_ +#ifdef __cplusplus +extern "C" { +#endif + +#define JEMALLOC_VERSION "@jemalloc_version@" +#define JEMALLOC_VERSION_MAJOR @jemalloc_version_major@ +#define JEMALLOC_VERSION_MINOR @jemalloc_version_minor@ +#define JEMALLOC_VERSION_BUGFIX @jemalloc_version_bugfix@ +#define JEMALLOC_VERSION_NREV @jemalloc_version_nrev@ +#define JEMALLOC_VERSION_GID "@jemalloc_version_gid@" + +#include "jemalloc_defs@install_suffix@.h" +#ifndef JEMALLOC_P +# define JEMALLOC_P(s) s +#endif + +extern const char *JEMALLOC_P(malloc_options); +extern void (*JEMALLOC_P(malloc_message))(void *, const char *); + +void *JEMALLOC_P(malloc)(size_t size) JEMALLOC_ATTR(malloc); +void *JEMALLOC_P(calloc)(size_t num, size_t size) JEMALLOC_ATTR(malloc); +int JEMALLOC_P(posix_memalign)(void **memptr, size_t alignment, size_t size) + JEMALLOC_ATTR(nonnull(1)); +void *JEMALLOC_P(realloc)(void *ptr, size_t size); +void JEMALLOC_P(free)(void *ptr); + +size_t JEMALLOC_P(malloc_usable_size)(const void *ptr); +void JEMALLOC_P(malloc_stats_print)(void (*write_cb)(void *, const char *), + void *cbopaque, const char *opts); +int JEMALLOC_P(mallctl)(const char *name, void *oldp, size_t *oldlenp, + void *newp, size_t newlen); +int JEMALLOC_P(mallctlnametomib)(const char *name, size_t *mibp, + size_t *miblenp); +int JEMALLOC_P(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, + size_t *oldlenp, void *newp, size_t newlen); + +#ifdef __cplusplus +}; +#endif +#endif /* JEMALLOC_H_ */ |
