huge.h revision 6b694c4d47278cddfaaedeb7ee49fa5757e35ed5
1/******************************************************************************/
2#ifdef JEMALLOC_H_TYPES
3
4#endif /* JEMALLOC_H_TYPES */
5/******************************************************************************/
6#ifdef JEMALLOC_H_STRUCTS
7
8#endif /* JEMALLOC_H_STRUCTS */
9/******************************************************************************/
10#ifdef JEMALLOC_H_EXTERNS
11
12/* Huge allocation statistics. */
13extern uint64_t		huge_nmalloc;
14extern uint64_t		huge_ndalloc;
15extern size_t		huge_allocated;
16
17/* Protects chunk-related data structures. */
18extern malloc_mutex_t	huge_mtx;
19
20void	*huge_malloc(size_t size, bool zero);
21void	*huge_palloc(size_t size, size_t alignment, bool zero);
22void	*huge_ralloc_no_move(void *ptr, size_t oldsize, size_t size,
23    size_t extra);
24void	*huge_ralloc(void *ptr, size_t oldsize, size_t size, size_t extra,
25    size_t alignment, bool zero, bool try_tcache_dalloc);
26#ifdef JEMALLOC_JET
27typedef void (huge_dalloc_junk_t)(void *, size_t);
28extern huge_dalloc_junk_t *huge_dalloc_junk;
29#endif
30void	huge_dalloc(void *ptr, bool unmap);
31size_t	huge_salloc(const void *ptr);
32prof_ctx_t	*huge_prof_ctx_get(const void *ptr);
33void	huge_prof_ctx_set(const void *ptr, prof_ctx_t *ctx);
34bool	huge_boot(void);
35void	huge_prefork(void);
36void	huge_postfork_parent(void);
37void	huge_postfork_child(void);
38
39#endif /* JEMALLOC_H_EXTERNS */
40/******************************************************************************/
41#ifdef JEMALLOC_H_INLINES
42
43#endif /* JEMALLOC_H_INLINES */
44/******************************************************************************/
45