Lines Matching defs:tsd

430 arena_bind_locked(tsd_t *tsd, unsigned ind)
437 if (tsd_nominal(tsd))
438 tsd_arena_set(tsd, arena);
442 arena_bind(tsd_t *tsd, unsigned ind)
446 arena_bind_locked(tsd, ind);
451 arena_migrate(tsd_t *tsd, unsigned oldind, unsigned newind)
461 tsd_arena_set(tsd, newarena);
476 arena_unbind(tsd_t *tsd, unsigned ind)
484 tsd_arena_set(tsd, NULL);
488 arena_get_hard(tsd_t *tsd, unsigned ind, bool init_if_missing)
491 arena_t **arenas_cache = tsd_arenas_cache_get(tsd);
492 unsigned narenas_cache = tsd_narenas_cache_get(tsd);
500 tsd_arenas_cache_set(tsd, arenas_cache);
501 tsd_narenas_cache_set(tsd, narenas_cache);
506 bool *arenas_cache_bypassp = tsd_arenas_cache_bypassp_get(tsd);
531 tsd_arenas_cache_set(tsd, arenas_cache);
532 tsd_narenas_cache_set(tsd, narenas_cache);
559 arena_choose_hard(tsd_t *tsd)
609 arena_bind_locked(tsd, choose);
613 arena_bind(tsd, 0);
620 thread_allocated_cleanup(tsd_t *tsd)
627 thread_deallocated_cleanup(tsd_t *tsd)
634 arena_cleanup(tsd_t *tsd)
638 arena = tsd_arena_get(tsd);
640 arena_unbind(tsd, arena->ind);
644 arenas_cache_cleanup(tsd_t *tsd)
648 arenas_cache = tsd_arenas_cache_get(tsd);
652 bool *arenas_cache_bypassp = tsd_arenas_cache_bypassp_get(tsd);
654 tsd_arenas_cache_set(tsd, NULL);
661 narenas_cache_cleanup(tsd_t *tsd)
668 arenas_cache_bypass_cleanup(tsd_t *tsd)
1358 imalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx)
1365 p = imalloc(tsd, LARGE_MINCLASS);
1370 p = imalloc(tsd, usize);
1376 imalloc_prof(tsd_t *tsd, size_t usize)
1381 tctx = prof_alloc_prep(tsd, usize, true);
1383 p = imalloc_prof_sample(tsd, usize, tctx);
1385 p = imalloc(tsd, usize);
1387 prof_alloc_rollback(tsd, tctx, true);
1396 imalloc_body(size_t size, tsd_t **tsd, size_t *usize)
1401 *tsd = tsd_fetch();
1405 return (imalloc_prof(*tsd, *usize));
1410 return (imalloc(*tsd, size));
1417 tsd_t *tsd;
1423 ret = imalloc_body(size, &tsd, &usize);
1434 *tsd_thread_allocatedp_get(tsd) += usize;
1442 imemalign_prof_sample(tsd_t *tsd, size_t alignment, size_t usize,
1451 p = imalloc(tsd, LARGE_MINCLASS);
1456 p = ipalloc(tsd, usize, alignment, false);
1462 imemalign_prof(tsd_t *tsd, size_t alignment, size_t usize)
1467 tctx = prof_alloc_prep(tsd, usize, true);
1469 p = imemalign_prof_sample(tsd, alignment, usize, tctx);
1471 p = ipalloc(tsd, usize, alignment, false);
1473 prof_alloc_rollback(tsd, tctx, true);
1486 tsd_t *tsd;
1496 tsd = tsd_fetch();
1520 result = imemalign_prof(tsd, alignment, usize);
1522 result = ipalloc(tsd, usize, alignment, false);
1532 *tsd_thread_allocatedp_get(tsd) += usize;
1572 icalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx)
1579 p = icalloc(tsd, LARGE_MINCLASS);
1584 p = icalloc(tsd, usize);
1590 icalloc_prof(tsd_t *tsd, size_t usize)
1595 tctx = prof_alloc_prep(tsd, usize, true);
1597 p = icalloc_prof_sample(tsd, usize, tctx);
1599 p = icalloc(tsd, usize);
1601 prof_alloc_rollback(tsd, tctx, true);
1613 tsd_t *tsd;
1622 tsd = tsd_fetch();
1646 ret = icalloc_prof(tsd, usize);
1650 ret = icalloc(tsd, num_size);
1664 *tsd_thread_allocatedp_get(tsd) += usize;
1672 irealloc_prof_sample(tsd_t *tsd, void *oldptr, size_t old_usize, size_t usize,
1680 p = iralloc(tsd, oldptr, old_usize, LARGE_MINCLASS, 0, false);
1685 p = iralloc(tsd, oldptr, old_usize, usize, 0, false);
1691 irealloc_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t usize)
1697 tctx = prof_alloc_prep(tsd, usize, true);
1699 p = irealloc_prof_sample(tsd, oldptr, old_usize, usize, tctx);
1701 p = iralloc(tsd, oldptr, old_usize, usize, 0, false);
1704 prof_realloc(tsd, p, usize, tctx, true, old_usize, old_tctx);
1710 ifree(tsd_t *tsd, void *ptr, tcache_t *tcache)
1720 prof_free(tsd, ptr, usize);
1724 *tsd_thread_deallocatedp_get(tsd) += usize;
1727 iqalloc(tsd, ptr, tcache);
1732 isfree(tsd_t *tsd, void *ptr, size_t usize, tcache_t *tcache)
1740 prof_free(tsd, ptr, usize);
1742 *tsd_thread_deallocatedp_get(tsd) += usize;
1745 isqalloc(tsd, ptr, usize, tcache);
1753 tsd_t *tsd JEMALLOC_CC_SILENCE_INIT(NULL);
1762 tsd = tsd_fetch();
1763 ifree(tsd, ptr, tcache_get(tsd, false));
1772 tsd = tsd_fetch();
1780 ret = irealloc_prof(tsd, ptr, old_usize, usize);
1785 ret = iralloc(tsd, ptr, old_usize, size, 0, false);
1789 ret = imalloc_body(size, &tsd, &usize);
1802 *tsd_thread_allocatedp_get(tsd) += usize;
1803 *tsd_thread_deallocatedp_get(tsd) += old_usize;
1817 tsd_t *tsd = tsd_fetch();
1818 ifree(tsd, ptr, tcache_get(tsd, false));
1890 imallocx_flags_decode_hard(tsd_t *tsd, size_t size, int flags, size_t *usize,
1906 *tcache = tcaches_get(tsd, MALLOCX_TCACHE_GET(flags));
1908 *tcache = tcache_get(tsd, true);
1911 *arena = arena_get(tsd, arena_ind, true, true);
1920 imallocx_flags_decode(tsd_t *tsd, size_t size, int flags, size_t *usize,
1929 *tcache = tcache_get(tsd, true);
1933 return (imallocx_flags_decode_hard(tsd, size, flags, usize,
1939 imallocx_flags(tsd_t *tsd, size_t usize, size_t alignment, bool zero,
1944 return (ipalloct(tsd, usize, alignment, zero, tcache, arena));
1946 return (icalloct(tsd, usize, tcache, arena));
1947 return (imalloct(tsd, usize, tcache, arena));
1951 imallocx_maybe_flags(tsd_t *tsd, size_t size, int flags, size_t usize,
1956 return (imalloc(tsd, size));
1957 return (imallocx_flags(tsd, usize, alignment, zero, tcache, arena));
1961 imallocx_prof_sample(tsd_t *tsd, size_t size, int flags, size_t usize,
1969 p = imalloct(tsd, LARGE_MINCLASS, tcache, arena);
1974 p = imallocx_maybe_flags(tsd, size, flags, usize, alignment,
1982 imallocx_prof(tsd_t *tsd, size_t size, int flags, size_t *usize)
1991 if (unlikely(imallocx_flags_decode(tsd, size, flags, usize, &alignment,
1994 tctx = prof_alloc_prep(tsd, *usize, true);
1996 p = imallocx_maybe_flags(tsd, size, flags, *usize, alignment,
1999 p = imallocx_prof_sample(tsd, size, flags, *usize, alignment,
2004 prof_alloc_rollback(tsd, tctx, true);
2013 imallocx_no_prof(tsd_t *tsd, size_t size, int flags, size_t *usize)
2023 return (imalloc(tsd, size));
2026 if (unlikely(imallocx_flags_decode_hard(tsd, size, flags, usize,
2029 return (imallocx_flags(tsd, *usize, alignment, zero, tcache, arena));
2035 tsd_t *tsd;
2043 tsd = tsd_fetch();
2046 p = imallocx_prof(tsd, size, flags, &usize);
2048 p = imallocx_no_prof(tsd, size, flags, &usize);
2054 *tsd_thread_allocatedp_get(tsd) += usize;
2069 irallocx_prof_sample(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size,
2078 p = iralloct(tsd, oldptr, old_usize, LARGE_MINCLASS, alignment,
2084 p = iralloct(tsd, oldptr, old_usize, size, alignment, zero,
2092 irallocx_prof(tsd_t *tsd, void *oldptr, size_t old_usize, size_t size,
2100 tctx = prof_alloc_prep(tsd, *usize, false);
2102 p = irallocx_prof_sample(tsd, oldptr, old_usize, size,
2105 p = iralloct(tsd, oldptr, old_usize, size, alignment, zero,
2109 prof_alloc_rollback(tsd, tctx, false);
2124 prof_realloc(tsd, p, *usize, tctx, false, old_usize, old_tctx);
2133 tsd_t *tsd;
2146 tsd = tsd_fetch();
2150 arena = arena_get(tsd, arena_ind, true, true);
2160 tcache = tcaches_get(tsd, MALLOCX_TCACHE_GET(flags));
2162 tcache = tcache_get(tsd, true);
2171 p = irallocx_prof(tsd, ptr, old_usize, size, alignment, &usize,
2176 p = iralloct(tsd, ptr, old_usize, size, alignment, zero,
2185 *tsd_thread_allocatedp_get(tsd) += usize;
2186 *tsd_thread_deallocatedp_get(tsd) += old_usize;
2241 ixallocx_prof(tsd_t *tsd, void *ptr, size_t old_usize, size_t size,
2256 tctx = prof_alloc_prep(tsd, max_usize, false);
2265 prof_alloc_rollback(tsd, tctx, false);
2268 prof_realloc(tsd, ptr, usize, tctx, false, old_usize, old_tctx);
2276 tsd_t *tsd;
2287 tsd = tsd_fetch();
2294 usize = ixallocx_prof(tsd, ptr, old_usize, size, extra,
2304 *tsd_thread_allocatedp_get(tsd) += usize;
2305 *tsd_thread_deallocatedp_get(tsd) += old_usize;
2333 tsd_t *tsd;
2339 tsd = tsd_fetch();
2344 tcache = tcaches_get(tsd, MALLOCX_TCACHE_GET(flags));
2346 tcache = tcache_get(tsd, false);
2368 tsd_t *tsd;
2377 tsd = tsd_fetch();
2382 tcache = tcaches_get(tsd, MALLOCX_TCACHE_GET(flags));
2384 tcache = tcache_get(tsd, false);
2387 isfree(tsd, ptr, usize, tcache);