Lines Matching refs:usize
1358 imalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) in imalloc_prof_sample() argument
1364 if (usize <= SMALL_MAXCLASS) { in imalloc_prof_sample()
1368 arena_prof_promoted(p, usize); in imalloc_prof_sample()
1370 p = imalloc(tsd, usize); in imalloc_prof_sample()
1376 imalloc_prof(tsd_t *tsd, size_t usize) in imalloc_prof() argument
1381 tctx = prof_alloc_prep(tsd, usize, prof_active_get_unlocked(), true); in imalloc_prof()
1383 p = imalloc_prof_sample(tsd, usize, tctx); in imalloc_prof()
1385 p = imalloc(tsd, usize); in imalloc_prof()
1390 prof_malloc(p, usize, tctx); in imalloc_prof()
1396 imalloc_body(size_t size, tsd_t **tsd, size_t *usize) in imalloc_body() argument
1404 *usize = s2u(size); in imalloc_body()
1405 if (unlikely(*usize == 0)) in imalloc_body()
1407 return (imalloc_prof(*tsd, *usize)); in imalloc_body()
1411 *usize = s2u(size); in imalloc_body()
1422 size_t usize JEMALLOC_CC_SILENCE_INIT(0); in JEMALLOC_ATTR()
1427 ret = imalloc_body(size, &tsd, &usize); in JEMALLOC_ATTR()
1437 assert(usize == isalloc(ret, config_prof)); in JEMALLOC_ATTR()
1438 *tsd_thread_allocatedp_get(tsd) += usize; in JEMALLOC_ATTR()
1441 JEMALLOC_VALGRIND_MALLOC(ret != NULL, ret, usize, false); in JEMALLOC_ATTR()
1446 imemalign_prof_sample(tsd_t *tsd, size_t alignment, size_t usize, in imemalign_prof_sample() argument
1453 if (usize <= SMALL_MAXCLASS) { in imemalign_prof_sample()
1458 arena_prof_promoted(p, usize); in imemalign_prof_sample()
1460 p = ipalloc(tsd, usize, alignment, false); in imemalign_prof_sample()
1466 imemalign_prof(tsd_t *tsd, size_t alignment, size_t usize) in imemalign_prof() argument
1471 tctx = prof_alloc_prep(tsd, usize, prof_active_get_unlocked(), true); in imemalign_prof()
1473 p = imemalign_prof_sample(tsd, alignment, usize, tctx); in imemalign_prof()
1475 p = ipalloc(tsd, usize, alignment, false); in imemalign_prof()
1480 prof_malloc(p, usize, tctx); in imemalign_prof()
1491 size_t usize; in imemalign() local
1517 usize = sa2u(size, alignment); in imemalign()
1518 if (unlikely(usize == 0)) { in imemalign()
1524 result = imemalign_prof(tsd, alignment, usize); in imemalign()
1526 result = ipalloc(tsd, usize, alignment, false); in imemalign()
1535 assert(usize == isalloc(result, config_prof)); in imemalign()
1536 *tsd_thread_allocatedp_get(tsd) += usize; in imemalign()
1579 icalloc_prof_sample(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) in icalloc_prof_sample() argument
1585 if (usize <= SMALL_MAXCLASS) { in icalloc_prof_sample()
1589 arena_prof_promoted(p, usize); in icalloc_prof_sample()
1591 p = icalloc(tsd, usize); in icalloc_prof_sample()
1597 icalloc_prof(tsd_t *tsd, size_t usize) in icalloc_prof() argument
1602 tctx = prof_alloc_prep(tsd, usize, prof_active_get_unlocked(), true); in icalloc_prof()
1604 p = icalloc_prof_sample(tsd, usize, tctx); in icalloc_prof()
1606 p = icalloc(tsd, usize); in icalloc_prof()
1611 prof_malloc(p, usize, tctx); in icalloc_prof()
1624 size_t usize JEMALLOC_CC_SILENCE_INIT(0); in JEMALLOC_ATTR()
1654 usize = s2u(num_size); in JEMALLOC_ATTR()
1655 if (unlikely(usize == 0)) { in JEMALLOC_ATTR()
1659 ret = icalloc_prof(tsd, usize); in JEMALLOC_ATTR()
1662 usize = s2u(num_size); in JEMALLOC_ATTR()
1676 assert(usize == isalloc(ret, config_prof)); in JEMALLOC_ATTR()
1677 *tsd_thread_allocatedp_get(tsd) += usize; in JEMALLOC_ATTR()
1680 JEMALLOC_VALGRIND_MALLOC(ret != NULL, ret, usize, true); in JEMALLOC_ATTR()
1685 irealloc_prof_sample(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t usize, in irealloc_prof_sample() argument
1692 if (usize <= SMALL_MAXCLASS) { in irealloc_prof_sample()
1696 arena_prof_promoted(p, usize); in irealloc_prof_sample()
1698 p = iralloc(tsd, old_ptr, old_usize, usize, 0, false); in irealloc_prof_sample()
1704 irealloc_prof(tsd_t *tsd, void *old_ptr, size_t old_usize, size_t usize) in irealloc_prof() argument
1712 tctx = prof_alloc_prep(tsd, usize, prof_active, true); in irealloc_prof()
1714 p = irealloc_prof_sample(tsd, old_ptr, old_usize, usize, tctx); in irealloc_prof()
1716 p = iralloc(tsd, old_ptr, old_usize, usize, 0, false); in irealloc_prof()
1721 prof_realloc(tsd, p, usize, tctx, prof_active, true, old_ptr, old_usize, in irealloc_prof()
1730 size_t usize; in ifree() local
1737 usize = isalloc(ptr, config_prof); in ifree()
1738 prof_free(tsd, ptr, usize); in ifree()
1740 usize = isalloc(ptr, config_prof); in ifree()
1742 *tsd_thread_deallocatedp_get(tsd) += usize; in ifree()
1750 isfree(tsd_t *tsd, void *ptr, size_t usize, tcache_t *tcache) in isfree() argument
1758 prof_free(tsd, ptr, usize); in isfree()
1760 *tsd_thread_deallocatedp_get(tsd) += usize; in isfree()
1763 isqalloc(tsd, ptr, usize, tcache); in isfree()
1774 size_t usize JEMALLOC_CC_SILENCE_INIT(0); in je_realloc()
1799 usize = s2u(size); in je_realloc()
1800 ret = unlikely(usize == 0) ? NULL : irealloc_prof(tsd, in je_realloc()
1801 ptr, old_usize, usize); in je_realloc()
1805 usize = s2u(size); in je_realloc()
1810 ret = imalloc_body(size, &tsd, &usize); in je_realloc()
1822 assert(usize == isalloc(ret, config_prof)); in je_realloc()
1823 *tsd_thread_allocatedp_get(tsd) += usize; in je_realloc()
1827 JEMALLOC_VALGRIND_REALLOC(true, ret, usize, true, ptr, old_usize, in je_realloc()
1915 imallocx_flags_decode_hard(tsd_t *tsd, size_t size, int flags, size_t *usize, in imallocx_flags_decode_hard() argument
1921 *usize = s2u(size); in imallocx_flags_decode_hard()
1924 *usize = sa2u(size, *alignment); in imallocx_flags_decode_hard()
1926 assert(*usize != 0); in imallocx_flags_decode_hard()
1946 imallocx_flags_decode(tsd_t *tsd, size_t size, int flags, size_t *usize, in imallocx_flags_decode() argument
1951 *usize = s2u(size); in imallocx_flags_decode()
1952 assert(*usize != 0); in imallocx_flags_decode()
1959 return (imallocx_flags_decode_hard(tsd, size, flags, usize, in imallocx_flags_decode()
1965 imallocx_flags(tsd_t *tsd, size_t usize, size_t alignment, bool zero, in imallocx_flags() argument
1970 return (ipalloct(tsd, usize, alignment, zero, tcache, arena)); in imallocx_flags()
1972 return (icalloct(tsd, usize, tcache, arena)); in imallocx_flags()
1973 return (imalloct(tsd, usize, tcache, arena)); in imallocx_flags()
1977 imallocx_prof_sample(tsd_t *tsd, size_t usize, size_t alignment, bool zero, in imallocx_prof_sample() argument
1982 if (usize <= SMALL_MAXCLASS) { in imallocx_prof_sample()
1989 arena_prof_promoted(p, usize); in imallocx_prof_sample()
1991 p = imallocx_flags(tsd, usize, alignment, zero, tcache, arena); in imallocx_prof_sample()
1997 imallocx_prof(tsd_t *tsd, size_t size, int flags, size_t *usize) in imallocx_prof() argument
2006 if (unlikely(imallocx_flags_decode(tsd, size, flags, usize, &alignment, in imallocx_prof()
2009 tctx = prof_alloc_prep(tsd, *usize, prof_active_get_unlocked(), true); in imallocx_prof()
2011 p = imallocx_flags(tsd, *usize, alignment, zero, tcache, arena); in imallocx_prof()
2013 p = imallocx_prof_sample(tsd, *usize, alignment, zero, tcache, in imallocx_prof()
2021 prof_malloc(p, *usize, tctx); in imallocx_prof()
2028 imallocx_no_prof(tsd_t *tsd, size_t size, int flags, size_t *usize) in imallocx_no_prof() argument
2038 *usize = s2u(size); in imallocx_no_prof()
2042 if (unlikely(imallocx_flags_decode_hard(tsd, size, flags, usize, in imallocx_no_prof()
2045 p = imallocx_flags(tsd, *usize, alignment, zero, tcache, arena); in imallocx_no_prof()
2057 size_t usize; in JEMALLOC_ATTR() local
2066 p = imallocx_prof(tsd, size, flags, &usize); in JEMALLOC_ATTR()
2068 p = imallocx_no_prof(tsd, size, flags, &usize); in JEMALLOC_ATTR()
2073 assert(usize == isalloc(p, config_prof)); in JEMALLOC_ATTR()
2074 *tsd_thread_allocatedp_get(tsd) += usize; in JEMALLOC_ATTR()
2077 JEMALLOC_VALGRIND_MALLOC(true, p, usize, MALLOCX_ZERO_GET(flags)); in JEMALLOC_ATTR()
2090 size_t usize, size_t alignment, bool zero, tcache_t *tcache, arena_t *arena, in irallocx_prof_sample() argument
2097 if (usize <= SMALL_MAXCLASS) { in irallocx_prof_sample()
2102 arena_prof_promoted(p, usize); in irallocx_prof_sample()
2104 p = iralloct(tsd, old_ptr, old_usize, usize, alignment, zero, in irallocx_prof_sample()
2113 size_t alignment, size_t *usize, bool zero, tcache_t *tcache, in irallocx_prof() argument
2122 tctx = prof_alloc_prep(tsd, *usize, prof_active, true); in irallocx_prof()
2124 p = irallocx_prof_sample(tsd, old_ptr, old_usize, *usize, in irallocx_prof()
2144 *usize = isalloc(p, config_prof); in irallocx_prof()
2146 prof_realloc(tsd, p, *usize, tctx, prof_active, true, old_ptr, in irallocx_prof()
2159 size_t usize; in je_rallocx() local
2194 usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment); in je_rallocx()
2195 assert(usize != 0); in je_rallocx()
2196 p = irallocx_prof(tsd, ptr, old_usize, size, alignment, &usize, in je_rallocx()
2206 usize = isalloc(p, config_prof); in je_rallocx()
2211 *tsd_thread_allocatedp_get(tsd) += usize; in je_rallocx()
2215 JEMALLOC_VALGRIND_REALLOC(true, p, usize, false, ptr, old_usize, in je_rallocx()
2231 size_t usize; in ixallocx_helper() local
2235 usize = isalloc(ptr, config_prof); in ixallocx_helper()
2237 return (usize); in ixallocx_helper()
2244 size_t usize; in ixallocx_prof_sample() local
2248 usize = ixallocx_helper(ptr, old_usize, size, extra, alignment, zero); in ixallocx_prof_sample()
2250 return (usize); in ixallocx_prof_sample()
2257 size_t usize_max, usize; in ixallocx_prof() local
2274 usize = ixallocx_prof_sample(ptr, old_usize, size, extra, in ixallocx_prof()
2277 usize = ixallocx_helper(ptr, old_usize, size, extra, alignment, in ixallocx_prof()
2280 if (usize == old_usize) { in ixallocx_prof()
2282 return (usize); in ixallocx_prof()
2284 prof_realloc(tsd, ptr, usize, tctx, prof_active, false, ptr, old_usize, in ixallocx_prof()
2287 return (usize); in ixallocx_prof()
2294 size_t usize, old_usize; in je_xallocx() local
2312 usize = old_usize; in je_xallocx()
2322 usize = ixallocx_prof(tsd, ptr, old_usize, size, extra, in je_xallocx()
2325 usize = ixallocx_helper(ptr, old_usize, size, extra, alignment, in je_xallocx()
2328 if (unlikely(usize == old_usize)) in je_xallocx()
2332 *tsd_thread_allocatedp_get(tsd) += usize; in je_xallocx()
2335 JEMALLOC_VALGRIND_REALLOC(false, ptr, usize, false, ptr, old_usize, in je_xallocx()
2339 return (usize); in je_xallocx()
2346 size_t usize; in JEMALLOC_ATTR() local
2352 usize = ivsalloc(ptr, config_prof); in JEMALLOC_ATTR()
2354 usize = isalloc(ptr, config_prof); in JEMALLOC_ATTR()
2356 return (usize); in JEMALLOC_ATTR()
2384 size_t usize; in inallocx() local
2387 usize = s2u(size); in inallocx()
2389 usize = sa2u(size, MALLOCX_ALIGN_GET_SPECIFIED(flags)); in inallocx()
2390 assert(usize != 0); in inallocx()
2391 return (usize); in inallocx()
2399 size_t usize; in je_sdallocx() local
2403 usize = inallocx(size, flags); in je_sdallocx()
2404 assert(usize == isalloc(ptr, config_prof)); in je_sdallocx()
2416 isfree(tsd, ptr, usize, tcache); in je_sdallocx()