mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Move arena_slab_data_t's nfree into extent_t's e_bits.
Compact extent_t to 128 bytes on 64-bit systems by moving arena_slab_data_t's nfree into extent_t's e_bits. Cacheline-align extent_t structures so that they always cross the minimum number of cacheline boundaries. Re-order extent_t fields such that all fields except the slab bitmap (and overlaid heap profiling context pointer) are in the first cacheline. This resolves #461.
This commit is contained in:
@@ -94,7 +94,8 @@ extent_alloc(tsdn_t *tsdn, arena_t *arena) {
|
||||
extent = extent_list_last(&arena->extent_freelist);
|
||||
if (extent == NULL) {
|
||||
malloc_mutex_unlock(tsdn, &arena->extent_freelist_mtx);
|
||||
return base_alloc(tsdn, arena->base, sizeof(extent_t), QUANTUM);
|
||||
return base_alloc(tsdn, arena->base, sizeof(extent_t),
|
||||
CACHELINE);
|
||||
}
|
||||
extent_list_remove(&arena->extent_freelist, extent);
|
||||
malloc_mutex_unlock(tsdn, &arena->extent_freelist_mtx);
|
||||
|
||||
Reference in New Issue
Block a user