ind is ignored if dopts->alignment > 0. */
| 1610 | |
| 1611 | /* ind is ignored if dopts->alignment > 0. */ |
| 1612 | JEMALLOC_ALWAYS_INLINE void * |
| 1613 | imalloc_no_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
| 1614 | size_t size, size_t usize, szind_t ind) { |
| 1615 | tcache_t *tcache; |
| 1616 | arena_t *arena; |
| 1617 | |
| 1618 | /* Fill in the tcache. */ |
| 1619 | if (dopts->tcache_ind == TCACHE_IND_AUTOMATIC) { |
| 1620 | if (likely(!sopts->slow)) { |
| 1621 | /* Getting tcache ptr unconditionally. */ |
| 1622 | tcache = tsd_tcachep_get(tsd); |
| 1623 | assert(tcache == tcache_get(tsd)); |
| 1624 | } else { |
| 1625 | tcache = tcache_get(tsd); |
| 1626 | } |
| 1627 | } else if (dopts->tcache_ind == TCACHE_IND_NONE) { |
| 1628 | tcache = NULL; |
| 1629 | } else { |
| 1630 | tcache = tcaches_get(tsd, dopts->tcache_ind); |
| 1631 | } |
| 1632 | |
| 1633 | /* Fill in the arena. */ |
| 1634 | if (dopts->arena_ind == ARENA_IND_AUTOMATIC) { |
| 1635 | /* |
| 1636 | * In case of automatic arena management, we defer arena |
| 1637 | * computation until as late as we can, hoping to fill the |
| 1638 | * allocation out of the tcache. |
| 1639 | */ |
| 1640 | arena = NULL; |
| 1641 | } else { |
| 1642 | arena = arena_get(tsd_tsdn(tsd), dopts->arena_ind, true); |
| 1643 | } |
| 1644 | |
| 1645 | if (unlikely(dopts->alignment != 0)) { |
| 1646 | return ipalloct(tsd_tsdn(tsd), usize, dopts->alignment, |
| 1647 | dopts->zero, tcache, arena); |
| 1648 | } |
| 1649 | |
| 1650 | return iallocztm(tsd_tsdn(tsd), size, ind, dopts->zero, tcache, false, |
| 1651 | arena, sopts->slow); |
| 1652 | } |
| 1653 | |
| 1654 | JEMALLOC_ALWAYS_INLINE void * |
| 1655 | imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
no test coverage detected