mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 13:13:06 +00:00
Move bin inline functions from arena_inlines_b.h to bin_inlines.h
This is a continuation of my previous clean-up change, now focusing on the inline functions defined in header files.
This commit is contained in:
committed by
Guangli Dai
parent
1cc563f531
commit
0ac9380cf1
@@ -2,7 +2,7 @@
|
||||
|
||||
#define INVALID_ARENA_IND ((1U << MALLOCX_ARENA_BITS) - 1)
|
||||
|
||||
TEST_BEGIN(test_arena_slab_regind) {
|
||||
TEST_BEGIN(test_bin_slab_regind) {
|
||||
szind_t binind;
|
||||
|
||||
for (binind = 0; binind < SC_NBINS; binind++) {
|
||||
@@ -15,13 +15,13 @@ TEST_BEGIN(test_arena_slab_regind) {
|
||||
false, true, EXTENT_PAI_PAC, 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);
|
||||
bin_dalloc_locked_info_t dalloc_info;
|
||||
bin_dalloc_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(&dalloc_info, binind, &slab, reg),
|
||||
bin_slab_regind(&dalloc_info, binind, &slab, reg),
|
||||
regind,
|
||||
"Incorrect region index computed for size %zu",
|
||||
bin_info->reg_size);
|
||||
@@ -33,5 +33,5 @@ TEST_END
|
||||
|
||||
int
|
||||
main(void) {
|
||||
return test(test_arena_slab_regind);
|
||||
return test(test_bin_slab_regind);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user