ind is ignored if dopts->alignment > 0. */
| 1909 | |
| 1910 | /* ind is ignored if dopts->alignment > 0. */ |
| 1911 | JEMALLOC_ALWAYS_INLINE void * |
| 1912 | imalloc_no_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
| 1913 | size_t size, size_t usize, szind_t ind) { |
| 1914 | tcache_t *tcache; |
| 1915 | arena_t *arena; |
| 1916 | |
| 1917 | /* Fill in the tcache. */ |
| 1918 | if (dopts->tcache_ind == TCACHE_IND_AUTOMATIC) { |
| 1919 | if (likely(!sopts->slow)) { |
| 1920 | /* Getting tcache ptr unconditionally. */ |
| 1921 | tcache = tsd_tcachep_get(tsd); |
| 1922 | assert(tcache == tcache_get(tsd)); |
| 1923 | } else { |
| 1924 | tcache = tcache_get(tsd); |
| 1925 | } |
| 1926 | } else if (dopts->tcache_ind == TCACHE_IND_NONE) { |
| 1927 | tcache = NULL; |
| 1928 | } else { |
| 1929 | tcache = tcaches_get(tsd, dopts->tcache_ind); |
| 1930 | } |
| 1931 | |
| 1932 | /* Fill in the arena. */ |
| 1933 | if (dopts->arena_ind == ARENA_IND_AUTOMATIC) { |
| 1934 | /* |
| 1935 | * In case of automatic arena management, we defer arena |
| 1936 | * computation until as late as we can, hoping to fill the |
| 1937 | * allocation out of the tcache. |
| 1938 | */ |
| 1939 | arena = NULL; |
| 1940 | } else { |
| 1941 | arena = arena_get(tsd_tsdn(tsd), dopts->arena_ind, true); |
| 1942 | } |
| 1943 | |
| 1944 | if (unlikely(dopts->alignment != 0)) { |
| 1945 | return ipalloct(tsd_tsdn(tsd), usize, dopts->alignment, |
| 1946 | dopts->zero, tcache, arena); |
| 1947 | } |
| 1948 | |
| 1949 | return iallocztm(tsd_tsdn(tsd), size, ind, dopts->zero, tcache, false, |
| 1950 | arena, sopts->slow); |
| 1951 | } |
| 1952 | |
| 1953 | JEMALLOC_ALWAYS_INLINE void * |
| 1954 | imalloc_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |
no test coverage detected