Lines Matching defs:bin_info
84 static size_t bin_info_run_size_calc(arena_bin_info_t *bin_info,
315 arena_run_reg_alloc(arena_run_t *run, arena_bin_info_t *bin_info)
320 (uintptr_t)bin_info->bitmap_offset);
323 assert(bitmap_full(bitmap, &bin_info->bitmap_info) == false);
325 regind = bitmap_sfu(bitmap, &bin_info->bitmap_info);
326 ret = (void *)((uintptr_t)run + (uintptr_t)bin_info->reg0_offset +
327 (uintptr_t)(bin_info->reg_interval * regind));
342 arena_bin_info_t *bin_info = &arena_bin_info[binind];
343 unsigned regind = arena_run_regind(run, bin_info, ptr);
345 (uintptr_t)bin_info->bitmap_offset);
347 assert(run->nfree < bin_info->nregs);
350 (uintptr_t)bin_info->reg0_offset)) %
351 (uintptr_t)bin_info->reg_interval == 0);
353 (uintptr_t)bin_info->reg0_offset);
355 assert(bitmap_get(bitmap, &bin_info->bitmap_info, regind));
357 bitmap_unset(bitmap, &bin_info->bitmap_info, regind);
788 arena_bin_info_t *bin_info;
795 bin_info = &arena_bin_info[binind];
796 npages = bin_info->run_size >> LG_PAGE;
985 arena_bin_info_t *bin_info = &arena_bin_info[binind];
986 size = bin_info->run_size;
1231 arena_bin_info_t *bin_info;
1240 bin_info = &arena_bin_info[binind];
1246 run = arena_run_alloc(arena, bin_info->run_size, false, binind, false);
1249 (uintptr_t)bin_info->bitmap_offset);
1254 run->nfree = bin_info->nregs;
1255 bitmap_init(bitmap, &bin_info->bitmap_info);
1286 arena_bin_info_t *bin_info;
1290 bin_info = &arena_bin_info[binind];
1299 ret = arena_run_reg_alloc(bin->runcur, bin_info);
1312 if (run->nfree == bin_info->nregs)
1327 return (arena_run_reg_alloc(bin->runcur, bin_info));
1372 arena_alloc_junk_small(void *ptr, arena_bin_info_t *bin_info, bool zero)
1376 size_t redzone_size = bin_info->redzone_size;
1379 memset((void *)((uintptr_t)ptr + bin_info->reg_size), 0xa5,
1382 memset((void *)((uintptr_t)ptr - bin_info->redzone_size), 0xa5,
1383 bin_info->reg_interval);
1388 arena_dalloc_junk_small(void *ptr, arena_bin_info_t *bin_info)
1390 size_t size = bin_info->reg_size;
1391 size_t redzone_size = bin_info->redzone_size;
1417 bin_info->reg_interval);
1602 arena_bin_info_t *bin_info = &arena_bin_info[binind];
1604 if (bin_info->nregs != 1) {
1620 arena_bin_info_t *bin_info;
1629 bin_info = &arena_bin_info[binind];
1633 npages = bin_info->run_size >> LG_PAGE;
1636 (uintptr_t)bin_info->reg0_offset + (uintptr_t)(run->nextind *
1637 bin_info->reg_interval - bin_info->redzone_size) -
1652 arena_mapbits_large_set(chunk, run_ind, bin_info->run_size, 0);
1694 arena_bin_info_t *bin_info;
1702 bin_info = &arena_bin_info[binind];
1704 size = bin_info->reg_size;
1707 arena_dalloc_junk_small(ptr, bin_info);
1710 if (run->nfree == bin_info->nregs) {
2141 * Calculate bin_info->run_size such that it meets the following constraints:
2143 * *) bin_info->run_size >= min_run_size
2144 * *) bin_info->run_size <= arena_maxclass
2146 * *) bin_info->nregs <= RUN_MAXREGS
2148 * bin_info->nregs, bin_info->bitmap_offset, and bin_info->reg0_offset are also
2152 bin_info_run_size_calc(arena_bin_info_t *bin_info, size_t min_run_size)
2173 size_t align_min = ZU(1) << (ffs(bin_info->reg_size) - 1);
2175 bin_info->redzone_size = REDZONE_MINSIZE;
2178 bin_info->redzone_size = align_min >> 1;
2179 pad_size = bin_info->redzone_size;
2182 bin_info->redzone_size = 0;
2185 bin_info->reg_interval = bin_info->reg_size +
2186 (bin_info->redzone_size << 1);
2200 bin_info->reg_interval)
2223 bin_info->reg_interval) - pad_size;
2241 bin_info->reg_interval)
2266 bin_info->reg_interval) - pad_size;
2270 && RUN_MAX_OVRHD * (bin_info->reg_interval << 3) >
2278 bin_info->run_size = good_run_size;
2279 bin_info->nregs = good_nregs;
2280 bin_info->bitmap_offset = good_bitmap_offset;
2281 bin_info->ctx0_offset = good_ctx0_offset;
2282 bin_info->reg0_offset = good_redzone0_offset + bin_info->redzone_size;
2284 assert(bin_info->reg0_offset - bin_info->redzone_size + (bin_info->nregs
2285 * bin_info->reg_interval) + pad_size == bin_info->run_size);
2293 arena_bin_info_t *bin_info;
2297 bin_info = &arena_bin_info[bin]; \
2298 bin_info->reg_size = size; \
2299 prev_run_size = bin_info_run_size_calc(bin_info, prev_run_size);\
2300 bitmap_info_init(&bin_info->bitmap_info, bin_info->nregs);