Simplify arena_slab_regind().
Rewrite arena_slab_regind() to provide sufficient constant data for the compiler to perform division strength reduction. This replaces more general manual strength reduction that was implemented before arena_bin_info was compile-time-constant. It would be possible to slightly improve on the compiler-generated division code by taking advantage of range limits that the compiler doesn't know about.
This commit is contained in:
@@ -271,6 +271,9 @@ void arena_extent_cache_maybe_insert(tsdn_t *tsdn, arena_t *arena,
|
||||
extent_t *extent, bool cache);
|
||||
void arena_extent_cache_maybe_remove(tsdn_t *tsdn, arena_t *arena,
|
||||
extent_t *extent, bool cache);
|
||||
#ifdef JEMALLOC_JET
|
||||
size_t arena_slab_regind(extent_t *slab, szind_t binind, const void *ptr);
|
||||
#endif
|
||||
extent_t *arena_extent_alloc_large(tsdn_t *tsdn, arena_t *arena,
|
||||
size_t usize, size_t alignment, bool *zero);
|
||||
void arena_extent_dalloc_large(tsdn_t *tsdn, arena_t *arena,
|
||||
|
@@ -66,6 +66,7 @@ arena_ralloc_no_move
|
||||
arena_reset
|
||||
arena_salloc
|
||||
arena_sdalloc
|
||||
arena_slab_regind
|
||||
arena_stats_merge
|
||||
arena_tcache_fill_small
|
||||
arena_tdata_get
|
||||
|
Reference in New Issue
Block a user