mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-28 11:23:08 +03:00
Add extent serial numbers.
Add extent serial numbers and use them where appropriate as a sort key that is higher priority than address, so that the allocation policy prefers older extents. This resolves #147.
This commit is contained in:
parent
c0a667112c
commit
a38acf716e
7 changed files with 126 additions and 35 deletions
|
|
@ -142,7 +142,8 @@ extent_alloc_dss(tsdn_t *tsdn, arena_t *arena, void *new_addr, size_t size,
|
|||
gap_size = (uintptr_t)ret - (uintptr_t)gap_addr;
|
||||
if (gap_size != 0) {
|
||||
extent_init(gap, arena, gap_addr, gap_size,
|
||||
gap_size, false, false, true, false);
|
||||
gap_size, arena_extent_sn_next(arena),
|
||||
false, false, true, false);
|
||||
}
|
||||
dss_next = (void *)((uintptr_t)ret + size);
|
||||
if ((uintptr_t)ret < (uintptr_t)max_cur ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue