1 #include "jemalloc/internal/malloc_io.h"
2 #include "jemalloc/internal/util.h"
5 * Define a custom assert() in order to reduce the chances of deadlock during
9 #define assert(e) do { \
10 if (unlikely(config_debug && !(e))) { \
12 "<jemalloc>: %s:%d: Failed assertion: \"%s\"\n", \
13 __FILE__, __LINE__, #e); \
20 #define not_reached() do { \
23 "<jemalloc>: %s:%d: Unreachable code reached\n", \
24 __FILE__, __LINE__); \
31 #ifndef not_implemented
32 #define not_implemented() do { \
34 malloc_printf("<jemalloc>: %s:%d: Not implemented\n", \
35 __FILE__, __LINE__); \
41 #ifndef assert_not_implemented
42 #define assert_not_implemented(e) do { \
43 if (unlikely(config_debug && !(e))) { \
49 /* Use to assert a particular configuration, e.g., cassert(config_debug). */
51 #define cassert(c) do { \
52 if (unlikely(!(c))) { \