xref: /aosp_15_r20/external/jemalloc_new/include/jemalloc/jemalloc_defs.h (revision 1208bc7e437ced7eb82efac44ba17e3beba411da)
1*1208bc7eSAndroid Build Coastguard Worker /* include/jemalloc/jemalloc_defs.h.  Generated from jemalloc_defs.h.in by configure.  */
2*1208bc7eSAndroid Build Coastguard Worker /* Defined if __attribute__((...)) syntax is supported. */
3*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_HAVE_ATTR
4*1208bc7eSAndroid Build Coastguard Worker 
5*1208bc7eSAndroid Build Coastguard Worker /* Defined if alloc_size attribute is supported. */
6*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_HAVE_ATTR_ALLOC_SIZE
7*1208bc7eSAndroid Build Coastguard Worker 
8*1208bc7eSAndroid Build Coastguard Worker /* Defined if format(gnu_printf, ...) attribute is supported. */
9*1208bc7eSAndroid Build Coastguard Worker /* #undef JEMALLOC_HAVE_ATTR_FORMAT_GNU_PRINTF */
10*1208bc7eSAndroid Build Coastguard Worker 
11*1208bc7eSAndroid Build Coastguard Worker /* Defined if format(printf, ...) attribute is supported. */
12*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_HAVE_ATTR_FORMAT_PRINTF
13*1208bc7eSAndroid Build Coastguard Worker 
14*1208bc7eSAndroid Build Coastguard Worker /*
15*1208bc7eSAndroid Build Coastguard Worker  * Define overrides for non-standard allocator-related functions if they are
16*1208bc7eSAndroid Build Coastguard Worker  * present on the system.
17*1208bc7eSAndroid Build Coastguard Worker  */
18*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_OVERRIDE_MEMALIGN
19*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_OVERRIDE_VALLOC
20*1208bc7eSAndroid Build Coastguard Worker 
21*1208bc7eSAndroid Build Coastguard Worker /*
22*1208bc7eSAndroid Build Coastguard Worker  * At least Linux omits the "const" in:
23*1208bc7eSAndroid Build Coastguard Worker  *
24*1208bc7eSAndroid Build Coastguard Worker  *   size_t malloc_usable_size(const void *ptr);
25*1208bc7eSAndroid Build Coastguard Worker  *
26*1208bc7eSAndroid Build Coastguard Worker  * Match the operating system's prototype.
27*1208bc7eSAndroid Build Coastguard Worker  */
28*1208bc7eSAndroid Build Coastguard Worker #define JEMALLOC_USABLE_SIZE_CONST const
29*1208bc7eSAndroid Build Coastguard Worker 
30*1208bc7eSAndroid Build Coastguard Worker /*
31*1208bc7eSAndroid Build Coastguard Worker  * If defined, specify throw() for the public function prototypes when compiling
32*1208bc7eSAndroid Build Coastguard Worker  * with C++.  The only justification for this is to match the prototypes that
33*1208bc7eSAndroid Build Coastguard Worker  * glibc defines.
34*1208bc7eSAndroid Build Coastguard Worker  */
35*1208bc7eSAndroid Build Coastguard Worker /* #undef JEMALLOC_USE_CXX_THROW */
36*1208bc7eSAndroid Build Coastguard Worker 
37*1208bc7eSAndroid Build Coastguard Worker #ifdef _MSC_VER
38*1208bc7eSAndroid Build Coastguard Worker #  ifdef _WIN64
39*1208bc7eSAndroid Build Coastguard Worker #    define LG_SIZEOF_PTR_WIN 3
40*1208bc7eSAndroid Build Coastguard Worker #  else
41*1208bc7eSAndroid Build Coastguard Worker #    define LG_SIZEOF_PTR_WIN 2
42*1208bc7eSAndroid Build Coastguard Worker #  endif
43*1208bc7eSAndroid Build Coastguard Worker #endif
44*1208bc7eSAndroid Build Coastguard Worker 
45*1208bc7eSAndroid Build Coastguard Worker /* sizeof(void *) == 2^LG_SIZEOF_PTR. */
46*1208bc7eSAndroid Build Coastguard Worker #if defined(__LP64__)
47*1208bc7eSAndroid Build Coastguard Worker #define LG_SIZEOF_PTR 3
48*1208bc7eSAndroid Build Coastguard Worker #else
49*1208bc7eSAndroid Build Coastguard Worker #define LG_SIZEOF_PTR 2
50*1208bc7eSAndroid Build Coastguard Worker #endif
51