| 1594 | } |
| 1595 | |
| 1596 | void |
| 1597 | arena_dalloc_promoted(tsdn_t *tsdn, void *ptr, tcache_t *tcache, |
| 1598 | bool slow_path) { |
| 1599 | cassert(config_prof); |
| 1600 | assert(opt_prof); |
| 1601 | |
| 1602 | extent_t *extent = iealloc(tsdn, ptr); |
| 1603 | size_t usize = extent_usize_get(extent); |
| 1604 | size_t bumped_usize = arena_prof_demote(tsdn, extent, ptr); |
| 1605 | if (config_opt_safety_checks && usize < SC_LARGE_MINCLASS) { |
| 1606 | /* |
| 1607 | * Currently, we only do redzoning for small sampled |
| 1608 | * allocations. |
| 1609 | */ |
| 1610 | assert(bumped_usize == SC_LARGE_MINCLASS); |
| 1611 | safety_check_verify_redzone(ptr, usize, bumped_usize); |
| 1612 | } |
| 1613 | if (bumped_usize <= tcache_maxclass && tcache != NULL) { |
| 1614 | tcache_dalloc_large(tsdn_tsd(tsdn), tcache, ptr, |
| 1615 | sz_size2index(bumped_usize), slow_path); |
| 1616 | } else { |
| 1617 | large_dalloc(tsdn, extent); |
| 1618 | } |
| 1619 | } |
| 1620 | |
| 1621 | static void |
| 1622 | arena_dissociate_bin_slab(arena_t *arena, extent_t *slab, bin_t *bin) { |
no test coverage detected