Lines Matching refs:usize

37 	size_t usize;  in huge_malloc()  local
39 usize = s2u(size); in huge_malloc()
40 if (usize == 0) { in huge_malloc()
45 return (huge_palloc(tsd, arena, usize, chunksize, zero, tcache)); in huge_malloc()
53 size_t usize; in huge_palloc() local
59 usize = sa2u(size, alignment); in huge_palloc()
60 if (unlikely(usize == 0)) in huge_palloc()
62 assert(usize >= chunksize); in huge_palloc()
110 huge_dalloc_junk(void *ptr, size_t usize) in huge_dalloc_junk() argument
119 memset(ptr, 0x5a, usize); in huge_dalloc_junk()
132 size_t usize, usize_next; in huge_ralloc_no_move_similar() local
139 for (usize = usize_min; usize < usize_max && (usize_next = s2u(usize+1)) in huge_ralloc_no_move_similar()
140 <= oldsize; usize = usize_next) in huge_ralloc_no_move_similar()
143 if (oldsize == usize) in huge_ralloc_no_move_similar()
151 if (oldsize > usize) { in huge_ralloc_no_move_similar()
152 size_t sdiff = oldsize - usize; in huge_ralloc_no_move_similar()
154 memset((void *)((uintptr_t)ptr + usize), 0x5a, sdiff); in huge_ralloc_no_move_similar()
158 ptr, CHUNK_CEILING(oldsize), usize, sdiff); in huge_ralloc_no_move_similar()
165 assert(extent_node_size_get(node) != usize); in huge_ralloc_no_move_similar()
166 extent_node_size_set(node, usize); in huge_ralloc_no_move_similar()
171 arena_chunk_ralloc_huge_similar(arena, ptr, oldsize, usize); in huge_ralloc_no_move_similar()
174 if (oldsize < usize) { in huge_ralloc_no_move_similar()
178 usize - oldsize); in huge_ralloc_no_move_similar()
181 memset((void *)((uintptr_t)ptr + oldsize), 0xa5, usize - in huge_ralloc_no_move_similar()
188 huge_ralloc_no_move_shrink(void *ptr, size_t oldsize, size_t usize) in huge_ralloc_no_move_shrink() argument
201 assert(oldsize > usize); in huge_ralloc_no_move_shrink()
204 cdiff = CHUNK_CEILING(oldsize) - CHUNK_CEILING(usize); in huge_ralloc_no_move_shrink()
206 CHUNK_CEILING(usize), cdiff, true, arena->ind)) in huge_ralloc_no_move_shrink()
209 if (oldsize > usize) { in huge_ralloc_no_move_shrink()
210 size_t sdiff = oldsize - usize; in huge_ralloc_no_move_shrink()
212 huge_dalloc_junk((void *)((uintptr_t)ptr + usize), in huge_ralloc_no_move_shrink()
217 CHUNK_ADDR2BASE((uintptr_t)ptr + usize), in huge_ralloc_no_move_shrink()
219 CHUNK_ADDR2OFFSET((uintptr_t)ptr + usize), sdiff); in huge_ralloc_no_move_shrink()
226 extent_node_size_set(node, usize); in huge_ralloc_no_move_shrink()
232 arena_chunk_ralloc_huge_shrink(arena, ptr, oldsize, usize); in huge_ralloc_no_move_shrink()
238 huge_ralloc_no_move_expand(void *ptr, size_t oldsize, size_t usize, bool zero) { in huge_ralloc_no_move_expand() argument
255 if (arena_chunk_ralloc_huge_expand(arena, ptr, oldsize, usize, in huge_ralloc_no_move_expand()
261 extent_node_size_set(node, usize); in huge_ralloc_no_move_expand()
271 CHUNK_CEILING(oldsize)), 0, usize - in huge_ralloc_no_move_expand()
275 memset((void *)((uintptr_t)ptr + oldsize), 0xa5, usize - in huge_ralloc_no_move_expand()
322 huge_ralloc_move_helper(tsd_t *tsd, arena_t *arena, size_t usize, in huge_ralloc_move_helper() argument
327 return (huge_malloc(tsd, arena, usize, zero, tcache)); in huge_ralloc_move_helper()
328 return (huge_palloc(tsd, arena, usize, alignment, zero, tcache)); in huge_ralloc_move_helper()
332 huge_ralloc(tsd_t *tsd, arena_t *arena, void *ptr, size_t oldsize, size_t usize, in huge_ralloc() argument
339 if (!huge_ralloc_no_move(ptr, oldsize, usize, usize, zero)) in huge_ralloc()
347 ret = huge_ralloc_move_helper(tsd, arena, usize, alignment, zero, in huge_ralloc()
352 copysize = (usize < oldsize) ? usize : oldsize; in huge_ralloc()