ind is ignored if dopts->alignment > 0. */
| 1669 | |
| 1670 | /* ind is ignored if dopts->alignment > 0. */ |
| 1671 | JEMALLOC_ALWAYS_INLINE void * |
| 1672 | imalloc_no_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
| 1673 | size_t size, size_t usize, szind_t ind) { |
| 1674 | tcache_t *tcache; |
| 1675 | arena_t *arena; |
| 1676 | |
| 1677 | /* Fill in the tcache. */ |
| 1678 | if (dopts->tcache_ind == TCACHE_IND_AUTOMATIC) { |
| 1679 | if (likely(!sopts->slow)) { |
| 1680 | /* Getting tcache ptr unconditionally. */ |
| 1681 | tcache = tsd_tcachep_get(tsd); |
| 1682 | assert(tcache == tcache_get(tsd)); |
| 1683 | } else { |
| 1684 | tcache = tcache_get(tsd); |
| 1685 | } |
| 1686 | } else if (dopts->tcache_ind == TCACHE_IND_NONE) { |
| 1687 | tcache = NULL; |
| 1688 | } else { |
| 1689 | tcache = tcaches_get(tsd, dopts->tcache_ind); |
| 1690 | } |
| 1691 | |
| 1692 | /* Fill in the arena. */ |
| 1693 | if (dopts->arena_ind == ARENA_IND_AUTOMATIC) { |
| 1694 | /* |
| 1695 | * In case of automatic arena management, we defer arena |
| 1696 | * computation until as late as we can, hoping to fill the |
| 1697 | * allocation out of the tcache. |
| 1698 | */ |
| 1699 | arena = NULL; |
| 1700 | } else { |
| 1701 | arena = arena_get(tsd_tsdn(tsd), dopts->arena_ind, true); |
| 1702 | } |
| 1703 | |
| 1704 | if (unlikely(dopts->alignment != 0)) { |
| 1705 | return ipalloct(tsd_tsdn(tsd), usize, dopts->alignment, |
| 1706 | dopts->zero, tcache, arena); |
| 1707 | } |
| 1708 | |
| 1709 | return iallocztm(tsd_tsdn(tsd), size, ind, dopts->zero, tcache, false, |
| 1710 | arena, sopts->slow); |
| 1711 | } |
| 1712 | |
| 1713 | JEMALLOC_ALWAYS_INLINE void * |
| 1714 | imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
no test coverage detected