Lines Matching refs:size

39 /* Align the header's size so that ralloc() allocations will return with the
105 ralloc_size(const void *ctx, size_t size)
109 * - Allocations of a size that rounds up to a multiple of 16 bytes
111 * - Allocations of a size that rounds up to a multiple of 8 bytes and
114 void *block = malloc(align64(size + sizeof(ralloc_header),
145 rzalloc_size(const void *ctx, size_t size)
147 void *ptr = ralloc_size(ctx, size);
150 memset(ptr, 0, size);
157 resize(void *ptr, size_t size)
162 info = realloc(old, align64(size + sizeof(ralloc_header),
188 reralloc_size(const void *ctx, void *ptr, size_t size)
191 return ralloc_size(ctx, size);
194 return resize(ptr, size);
213 ralloc_array_size(const void *ctx, size_t size, unsigned count)
215 if (count > SIZE_MAX/size)
218 return ralloc_size(ctx, size * count);
222 rzalloc_array_size(const void *ctx, size_t size, unsigned count)
224 if (count > SIZE_MAX/size)
227 return rzalloc_size(ctx, size * count);
231 reralloc_array_size(const void *ctx, void *ptr, size_t size, unsigned count)
233 if (count > SIZE_MAX/size)
236 return reralloc_size(ctx, ptr, size * count);
240 rerzalloc_array_size(const void *ctx, void *ptr, size_t size,
243 if (new_count > SIZE_MAX/size)
246 return rerzalloc_size(ctx, ptr, size * old_count, size * new_count);
461 size_t size = u_printf_length(fmt, args) + 1;
463 char *ptr = ralloc_size(ctx, size);
465 vsnprintf(ptr, size, fmt, args);
564 unsigned size; /* size of the buffer */
584 unsigned size; /* for realloc */
614 node->size = min_size;
622 linear_alloc_child(void *parent, unsigned size)
633 size = ALIGN_POT(size, SUBALLOC_ALIGNMENT);
634 full_size = sizeof(linear_size_chunk) + size;
636 if (unlikely(latest->offset + full_size > latest->size)) {
638 new_node = create_linear_node(latest->ralloc_parent, size);
649 ptr->size = size;
657 linear_alloc_parent(void *ralloc_ctx, unsigned size)
664 size = ALIGN_POT(size, SUBALLOC_ALIGNMENT);
666 node = create_linear_node(ralloc_ctx, size);
672 sizeof(linear_size_chunk), size);
676 linear_zalloc_child(void *parent, unsigned size)
678 void *ptr = linear_alloc_child(parent, size);
681 memset(ptr, 0, size);
686 linear_zalloc_parent(void *parent, unsigned size)
688 void *ptr = linear_alloc_parent(parent, size);
691 memset(ptr, 0, size);
751 old_size = ((linear_size_chunk*)old)[-1].size;
796 unsigned size = u_printf_length(fmt, args) + 1;
798 char *ptr = linear_alloc_child(parent, size);
800 vsnprintf(ptr, size, fmt, args);