mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-04 01:20:04 +03:00
Use rtree rather than [sz]ad trees for chunk split/coalesce operations.
This commit is contained in:
parent
25845db7c9
commit
ffa45a5331
6 changed files with 234 additions and 198 deletions
12
src/extent.c
12
src/extent.c
|
|
@ -39,15 +39,3 @@ extent_szad_comp(const extent_t *a, const extent_t *b)
|
|||
/* Generate red-black tree functions. */
|
||||
rb_gen(, extent_tree_szad_, extent_tree_t, extent_t, szad_link,
|
||||
extent_szad_comp)
|
||||
|
||||
JEMALLOC_INLINE_C int
|
||||
extent_ad_comp(const extent_t *a, const extent_t *b)
|
||||
{
|
||||
uintptr_t a_addr = (uintptr_t)extent_addr_get(a);
|
||||
uintptr_t b_addr = (uintptr_t)extent_addr_get(b);
|
||||
|
||||
return ((a_addr > b_addr) - (a_addr < b_addr));
|
||||
}
|
||||
|
||||
/* Generate red-black tree functions. */
|
||||
rb_gen(, extent_tree_ad_, extent_tree_t, extent_t, ad_link, extent_ad_comp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue