]>
git.saurik.com Git - redis.git/blob - deps/jemalloc/src/extent.c
1 #define JEMALLOC_EXTENT_C_
2 #include "jemalloc/internal/jemalloc_internal.h"
4 /******************************************************************************/
7 extent_szad_comp(extent_node_t
*a
, extent_node_t
*b
)
10 size_t a_size
= a
->size
;
11 size_t b_size
= b
->size
;
13 ret
= (a_size
> b_size
) - (a_size
< b_size
);
15 uintptr_t a_addr
= (uintptr_t)a
->addr
;
16 uintptr_t b_addr
= (uintptr_t)b
->addr
;
18 ret
= (a_addr
> b_addr
) - (a_addr
< b_addr
);
24 /* Generate red-black tree functions. */
25 rb_gen(, extent_tree_szad_
, extent_tree_t
, extent_node_t
, link_szad
,
29 extent_ad_comp(extent_node_t
*a
, extent_node_t
*b
)
31 uintptr_t a_addr
= (uintptr_t)a
->addr
;
32 uintptr_t b_addr
= (uintptr_t)b
->addr
;
34 return ((a_addr
> b_addr
) - (a_addr
< b_addr
));
37 /* Generate red-black tree functions. */
38 rb_gen(, extent_tree_ad_
, extent_tree_t
, extent_node_t
, link_ad
,