Home
last modified time | relevance | path

Searched refs:usize (Results 1 – 19 of 19) sorted by relevance

/third_party/ulib/jemalloc/include/jemalloc/internal/
A Dprof_inlines.h11 size_t usize, prof_tctx_t *tctx);
19 size_t usize, prof_tctx_t *tctx);
25 size_t usize);
92 arena_prof_tctx_set(tsdn, extent, ptr, usize, tctx); in prof_tctx_set()
123 if (likely(tdata->bytes_until_sample >= usize)) { in prof_sample_accum_update()
125 tdata->bytes_until_sample -= usize; in prof_sample_accum_update()
142 assert(usize == s2u(usize)); in prof_alloc_prep()
162 assert(usize == isalloc(tsdn, extent, ptr)); in prof_malloc()
167 prof_tctx_set(tsdn, extent, ptr, usize, in prof_malloc()
205 prof_tctx_set(tsd_tsdn(tsd), extent, ptr, usize, in prof_realloc()
[all …]
A Dlarge_externs.h6 void *large_malloc(tsdn_t *tsdn, arena_t *arena, size_t usize, bool zero);
7 void *large_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize,
12 size_t usize, size_t alignment, bool zero, tcache_t *tcache);
19 void large_dalloc_junk(void *ptr, size_t usize);
20 void large_dalloc_maybe_junk(void *ptr, size_t usize);
A Djemalloc_internal.h626 return (usize); in psz2u()
702 return (usize); in index2size_compute()
741 return (usize); in s2u_compute()
774 size_t usize; in sa2u() local
796 return (usize); in sa2u()
808 usize = s2u(size); in sa2u()
819 if (usize + large_pad + PAGE_CEILING(alignment) - PAGE < usize) { in sa2u()
823 return (usize); in sa2u()
1018 assert(usize == sa2u(usize, alignment)); in ipallocztm()
1108 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) in iralloct_realign()
[all …]
A Dtcache_inlines.h132 size_t usize JEMALLOC_CC_SILENCE_INIT(0); in tcache_alloc_small()
156 usize = index2size(binind); in tcache_alloc_small()
166 memset(ret, 0, usize); in tcache_alloc_small()
173 memset(ret, 0, usize); in tcache_alloc_small()
179 tcache->prof_accumbytes += usize; in tcache_alloc_small()
214 usize = index2size(binind); in tcache_alloc_large()
215 assert(usize <= tcache_maxclass); in tcache_alloc_large()
222 usize); in tcache_alloc_large()
224 memset(ret, 0, usize); in tcache_alloc_large()
227 memset(ret, 0, usize); in tcache_alloc_large()
[all …]
A Darena_inlines_b.h9 size_t usize, prof_tctx_t *tctx);
46 size_t usize, prof_tctx_t *tctx) in arena_prof_tctx_set() argument
153 size_t usize = extent_usize_get(extent); in arena_dalloc() local
155 if (likely(tcache != NULL) && usize <= tcache_maxclass) { in arena_dalloc()
156 if (config_prof && unlikely(usize <= SMALL_MAXCLASS)) { in arena_dalloc()
161 ptr, usize, slow_path); in arena_dalloc()
A Djemalloc_internal.h.in624 return (usize);
700 return (usize);
739 return (usize);
772 size_t usize; local
794 return (usize);
806 usize = s2u(size);
817 if (usize + large_pad + PAGE_CEILING(alignment) - PAGE < usize) {
821 return (usize);
1016 assert(usize == sa2u(usize, alignment));
1106 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS))
[all …]
A Dextent_inlines.h27 void extent_usize_set(extent_t *extent, size_t usize);
35 size_t size, size_t usize, size_t sn, bool active, bool zeroed,
206 extent_usize_set(extent_t *extent, size_t usize) in extent_usize_set() argument
208 extent->e_usize = usize; in extent_usize_set()
249 size_t usize, size_t sn, bool active, bool zeroed, bool committed, in extent_init() argument
257 extent_usize_set(extent, usize); in extent_init()
A Dextent_externs.h27 extent_hooks_t **r_extent_hooks, void *new_addr, size_t usize, size_t pad,
30 extent_hooks_t **r_extent_hooks, void *new_addr, size_t usize, size_t pad,
33 extent_hooks_t **r_extent_hooks, void *new_addr, size_t usize, size_t pad,
A Dprof_externs.h45 const void *ptr, size_t usize, prof_tctx_t *tctx);
46 void prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx);
A Darena_externs.h31 size_t usize, size_t alignment, bool *zero);
56 void *arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize,
59 size_t usize);
/third_party/ulib/jemalloc/src/
A Dlarge.c9 assert(usize == s2u(usize)); in large_malloc()
25 ausize = sa2u(usize, alignment); in large_palloc()
67 large_dalloc_junk(void *ptr, size_t usize) in large_dalloc_junk() argument
69 memset(ptr, JEMALLOC_FREE_JUNK, usize); in large_dalloc_junk()
90 large_dalloc_junk(ptr, usize); in large_dalloc_maybe_junk()
108 assert(oldusize > usize); in large_ralloc_no_move_shrink()
116 &extent_hooks, extent, usize + large_pad, usize, diff, in large_ralloc_no_move_shrink()
182 oldusize), 0, usize - oldusize); in large_ralloc_no_move_expand()
259 assert(usize > 0 && usize <= LARGE_MAXCLASS); in large_ralloc()
265 if (!large_ralloc_no_move(tsdn, extent, usize, usize, zero)) in large_ralloc()
[all …]
A Djemalloc.c1603 assert(usize > 0 && usize <= LARGE_MAXCLASS); in imalloc_body()
1607 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) { in imalloc_body()
1630 sopts, dopts, tsd, usize, usize, ind); in imalloc_body()
1880 usize); in irealloc_prof_sample()
1921 size_t usize; in ifree() local
1999 ret = unlikely(usize == 0 || usize > LARGE_MAXCLASS) ? in je_realloc()
2001 usize); in je_realloc()
2300 size_t usize; in je_rallocx() local
2334 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) in je_rallocx()
2373 size_t usize; in ixallocx_helper() local
[all …]
A Darena.c212 usize = LARGE_MINCLASS; in arena_large_malloc_stats_update()
828 size_t usize; in arena_reset() local
1182 size_t usize; in arena_malloc_small() local
1255 ret = arena_malloc(tsdn, arena, usize, size2index(usize), zero, in arena_palloc()
1268 size_t usize) in arena_prof_promote() argument
1312 size_t usize; in arena_dalloc_promoted() local
1481 return (arena_malloc(tsdn, arena, usize, size2index(usize), in arena_ralloc_move_helper()
1483 usize = sa2u(usize, alignment); in arena_ralloc_move_helper()
1484 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) in arena_ralloc_move_helper()
1496 usize = s2u(size); in arena_ralloc()
[all …]
A Dckh.c266 size_t usize; in ckh_grow() local
269 usize = sa2u(sizeof(ckhc_t) << lg_curcells, CACHELINE); in ckh_grow()
270 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) { in ckh_grow()
274 tab = (ckhc_t *)ipallocztm(tsd_tsdn(tsd), usize, CACHELINE, in ckh_grow()
308 size_t usize; in ckh_shrink() local
317 usize = sa2u(sizeof(ckhc_t) << lg_curcells, CACHELINE); in ckh_shrink()
318 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) in ckh_shrink()
359 size_t mincells, usize; in ckh_new() local
394 usize = sa2u(sizeof(ckhc_t) << lg_mincells, CACHELINE); in ckh_new()
395 if (unlikely(usize == 0 || usize > LARGE_MAXCLASS)) { in ckh_new()
[all …]
A Dextent.c452 size = usize + pad; in extent_recycle()
455 if (alloc_size < usize) in extent_recycle()
537 extent_usize_set(extent, usize); in extent_recycle()
620 assert(usize + pad != 0); in extent_alloc_cache_impl()
712 size = usize + pad; in extent_grow_retained()
716 if (alloc_size_min < usize) in extent_grow_retained()
777 extent_usize_set(extent, usize); in extent_grow_retained()
817 assert(usize != 0); in extent_alloc_retained()
825 size_t size = usize + pad; in extent_alloc_retained()
848 size = usize + pad; in extent_alloc_wrapper_hard()
[all …]
A Dbase.c154 size_t usize, header_size, gap_size, block_size; in base_block_alloc() local
157 usize = ALIGNMENT_CEILING(size, alignment); in base_block_alloc()
160 block_size = HUGEPAGE_CEILING(header_size + gap_size + usize); in base_block_alloc()
293 size_t usize, asize; in base_alloc() local
298 usize = ALIGNMENT_CEILING(size, alignment); in base_alloc()
299 asize = usize + alignment - QUANTUM; in base_alloc()
312 extent = base_extent_alloc(tsdn, base, usize, alignment); in base_alloc()
319 ret = base_extent_bump_alloc(tsdn, base, extent, usize, alignment); in base_alloc()
A Dprof.c227 size_t usize, prof_tctx_t *tctx) in prof_malloc_sample_object() argument
229 prof_tctx_set(tsdn, extent, ptr, usize, tctx); in prof_malloc_sample_object()
233 tctx->cnts.curbytes += usize; in prof_malloc_sample_object()
236 tctx->cnts.accumbytes += usize; in prof_malloc_sample_object()
243 prof_free_sampled_object(tsd_t *tsd, size_t usize, prof_tctx_t *tctx) in prof_free_sampled_object() argument
247 assert(tctx->cnts.curbytes >= usize); in prof_free_sampled_object()
249 tctx->cnts.curbytes -= usize; in prof_free_sampled_object()
/third_party/ulib/jemalloc/test/unit/
A Djunk.c40 large_dalloc_junk_intercept(void *ptr, size_t usize) in large_dalloc_junk_intercept() argument
44 large_dalloc_junk_orig(ptr, usize); in large_dalloc_junk_intercept()
45 for (i = 0; i < usize; i++) { in large_dalloc_junk_intercept()
48 i, usize); in large_dalloc_junk_intercept()
55 large_dalloc_maybe_junk_intercept(void *ptr, size_t usize) in large_dalloc_maybe_junk_intercept() argument
57 large_dalloc_maybe_junk_orig(ptr, usize); in large_dalloc_maybe_junk_intercept()
/third_party/ulib/jemalloc/test/integration/
A Dallocated.c18 size_t sz, usize; in thd_start() local
70 usize = malloc_usable_size(p); in thd_start()
71 assert_u64_le(a0 + usize, a1, in thd_start()
87 assert_u64_le(d0 + usize, d1, in thd_start()

Completed in 657 milliseconds