mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-16 05:37:18 +03:00
Tcache flush: keep common path state in registers.
By carefully force-inlining the division constants and the operation sum count, we can eliminate redundant operations in the arena-level dalloc function. Do so.
This commit is contained in:
parent
31a629c3de
commit
229994a204
5 changed files with 130 additions and 79 deletions
|
|
@ -16,10 +16,13 @@ TEST_BEGIN(test_arena_slab_regind) {
|
|||
EXTENT_NOT_HEAD);
|
||||
expect_ptr_not_null(edata_addr_get(&slab),
|
||||
"Unexpected malloc() failure");
|
||||
arena_dalloc_bin_locked_info_t dalloc_info;
|
||||
arena_dalloc_bin_locked_begin(&dalloc_info, binind);
|
||||
for (regind = 0; regind < bin_info->nregs; regind++) {
|
||||
void *reg = (void *)((uintptr_t)edata_addr_get(&slab) +
|
||||
(bin_info->reg_size * regind));
|
||||
expect_zu_eq(arena_slab_regind(&slab, binind, reg),
|
||||
expect_zu_eq(arena_slab_regind(&dalloc_info, binind,
|
||||
&slab, reg),
|
||||
regind,
|
||||
"Incorrect region index computed for size %zu",
|
||||
bin_info->reg_size);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue