Lines Matching defs:usize
43 huge_malloc(tsdn_t *tsdn, arena_t *arena, size_t usize, bool zero)
46 assert(usize == s2u(usize));
48 return (huge_palloc(tsdn, arena, usize, chunksize, zero));
52 huge_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment,
66 ausize = sa2u(usize, alignment);
99 arena, usize, alignment, &sn, &is_zeroed)) == NULL) {
104 extent_node_init(node, arena, ret, usize, sn, is_zeroed, true);
107 arena_chunk_dalloc_huge(tsdn, arena, ret, usize, sn);
120 memset(ret, 0, usize);
122 memset(ret, JEMALLOC_ALLOC_JUNK, usize);
133 huge_dalloc_junk(void *ptr, size_t usize)
142 memset(ptr, JEMALLOC_FREE_JUNK, usize);
155 size_t usize, usize_next;
161 /* Increase usize to incorporate extra. */
162 for (usize = usize_min; usize < usize_max && (usize_next = s2u(usize+1))
163 <= oldsize; usize = usize_next)
166 if (oldsize == usize)
174 if (oldsize > usize) {
175 size_t sdiff = oldsize - usize;
177 memset((void *)((uintptr_t)ptr + usize),
182 &chunk_hooks, ptr, CHUNK_CEILING(oldsize), usize,
191 assert(extent_node_size_get(node) != usize);
192 extent_node_size_set(node, usize);
198 arena_chunk_ralloc_huge_similar(tsdn, arena, ptr, oldsize, usize);
201 if (oldsize < usize) {
205 usize - oldsize);
209 JEMALLOC_ALLOC_JUNK, usize - oldsize);
216 size_t usize)
229 assert(oldsize > usize);
232 cdiff = CHUNK_CEILING(oldsize) - CHUNK_CEILING(usize);
234 CHUNK_CEILING(usize), cdiff, true, arena->ind))
237 if (oldsize > usize) {
238 size_t sdiff = oldsize - usize;
240 huge_dalloc_junk((void *)((uintptr_t)ptr + usize),
246 usize), CHUNK_CEILING(oldsize),
247 CHUNK_ADDR2OFFSET((uintptr_t)ptr + usize), sdiff);
255 extent_node_size_set(node, usize);
262 arena_chunk_ralloc_huge_shrink(tsdn, arena, ptr, oldsize, usize,
270 size_t usize, bool zero) {
286 if (arena_chunk_ralloc_huge_expand(tsdn, arena, ptr, oldsize, usize,
292 extent_node_size_set(node, usize);
305 CHUNK_CEILING(oldsize)), 0, usize -
310 usize - oldsize);
369 huge_ralloc_move_helper(tsdn_t *tsdn, arena_t *arena, size_t usize,
374 return (huge_malloc(tsdn, arena, usize, zero));
375 return (huge_palloc(tsdn, arena, usize, alignment, zero));
380 size_t usize, size_t alignment, bool zero, tcache_t *tcache)
386 assert(usize > 0 && usize <= HUGE_MAXCLASS);
389 if (!huge_ralloc_no_move(tsd_tsdn(tsd), ptr, oldsize, usize, usize,
394 * usize and oldsize are different enough that we need to use a
398 ret = huge_ralloc_move_helper(tsd_tsdn(tsd), arena, usize, alignment,
403 copysize = (usize < oldsize) ? usize : oldsize;