2009-12-29 16:09:15 +08:00
|
|
|
#ifndef JEMALLOC_H_
|
|
|
|
#define JEMALLOC_H_
|
2009-06-26 09:06:48 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2010-01-17 17:49:20 +08:00
|
|
|
#include "jemalloc_defs@install_suffix@.h"
|
2010-01-17 01:53:50 +08:00
|
|
|
#ifndef JEMALLOC_P
|
|
|
|
# define JEMALLOC_P(s) s
|
|
|
|
#endif
|
2009-06-26 09:06:48 +08:00
|
|
|
|
2010-01-17 01:53:50 +08:00
|
|
|
extern const char *JEMALLOC_P(malloc_options);
|
|
|
|
extern void (*JEMALLOC_P(malloc_message))(const char *p1,
|
2010-01-04 04:10:42 +08:00
|
|
|
const char *p2, const char *p3, const char *p4);
|
|
|
|
|
2010-01-17 01:53:50 +08:00
|
|
|
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)
|
2010-01-04 03:59:20 +08:00
|
|
|
JEMALLOC_ATTR(nonnull(1));
|
2010-01-17 01:53:50 +08:00
|
|
|
void *JEMALLOC_P(realloc)(void *ptr, size_t size);
|
|
|
|
void JEMALLOC_P(free)(void *ptr);
|
2009-06-26 09:06:48 +08:00
|
|
|
|
2010-01-17 01:53:50 +08:00
|
|
|
size_t JEMALLOC_P(malloc_usable_size)(const void *ptr);
|
2009-12-29 16:09:15 +08:00
|
|
|
#ifdef JEMALLOC_TCACHE
|
2010-01-17 01:53:50 +08:00
|
|
|
void JEMALLOC_P(malloc_tcache_flush)(void);
|
2009-12-29 16:09:15 +08:00
|
|
|
#endif
|
2010-01-18 07:49:25 +08:00
|
|
|
void JEMALLOC_P(malloc_stats_print)(void (*write4)(const char *,
|
|
|
|
const char *, const char *, const char *), const char *opts);
|
2009-06-26 09:06:48 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
};
|
|
|
|
#endif
|
2009-12-29 16:09:15 +08:00
|
|
|
#endif /* JEMALLOC_H_ */
|