Stop depending on JEMALLOC_N() for function interception during testing.

Instead, always define function pointers for interceptable functions,
but mark them const unless testing, so that the compiler can optimize
out the pointer dereferences.
This commit is contained in:
Jason Evans
2017-05-01 23:10:42 -07:00
parent b3b033eefd
commit a268af5085
13 changed files with 157 additions and 281 deletions

View File

@@ -30,4 +30,11 @@
# define restrict
#endif
/* Various function pointers are statick and immutable except during testing. */
#ifdef JEMALLOC_JET
# define JET_MUTABLE
#else
# define JET_MUTABLE const
#endif
#endif /* JEMALLOC_INTERNAL_MACROS_H */