1 #ifndef R2_HEAP_JEMALLOC_H
2 #define R2_HEAP_JEMALLOC_H
3 
4 #include "r_jemalloc/internal/jemalloc_internal.h"
5 
6 #define INC_HEAP32 1
7 #include "r_heap_jemalloc.h"
8 #undef INC_HEAP32
9 #endif
10 
11 #undef GH
12 #undef GHT
13 #undef GHT_MAX
14 
15 #if INC_HEAP32
16 #define GH(x) x##_32
17 #define GHT ut32
18 #define GHT_MAX UT32_MAX
19 #else
20 #define GH(x) x##_64
21 #define GHT ut64
22 #define GHT_MAX UT64_MAX
23 #endif
24 
25 #define PRINTF_A(color, fmt , ...) r_cons_printf (color fmt Color_RESET, __VA_ARGS__)
26 #define PRINTF_YA(fmt, ...) PRINTF_A ("%s", fmt, pal->offset, __VA_ARGS__)
27 #define PRINTF_GA(fmt, ...) PRINTF_A ("%s", fmt, pal->args, __VA_ARGS__)
28 #define PRINTF_BA(fmt, ...) PRINTF_A ("%s", fmt, pal->num, __VA_ARGS__)
29 #define PRINTF_RA(fmt, ...) PRINTF_A ("%s", fmt, pal->invalid, __VA_ARGS__)
30 
31 #define PRINT_A(color, msg) r_cons_print (color msg Color_RESET)
32 #define PRINT_YA(msg) r_cons_printf ("%s" msg Color_RESET, pal->offset)
33 #define PRINT_GA(msg) r_cons_printf ("%s" msg Color_RESET, pal->args)
34 #define PRINT_BA(msg) r_cons_printf ("%s" msg Color_RESET, pal->num)
35 #define PRINT_RA(msg) r_cons_printf ("%s" msg Color_RESET, pal->invalid)
36