Lines Matching refs:size
41 * See umem_impl.h for the various magic numbers used, and the size
44 * The 'size' of the buffer includes the tags. That is, we encode the
59 size_t size;
62 size = size_arg + sizeof (malloc_data_t);
65 if (size > UMEM_SECOND_ALIGN) {
66 size += sizeof (malloc_data_t);
67 high_size = (size >> 32);
70 if (size < size_arg) {
74 ret = (malloc_data_t *)_umem_alloc(size, UMEM_DEFAULT);
76 if (size <= UMEM_MAXBUF)
83 uint32_t low_size = (uint32_t)size;
97 } else if (size > UMEM_SECOND_ALIGN) {
98 uint32_t low_size = (uint32_t)size;
108 ret->malloc_size = size;
109 ret->malloc_stat = UMEM_MALLOC_ENCODE(MALLOC_MAGIC, size);
118 size_t size = nelem * elsize;
121 if (nelem > 0 && elsize > 0 && size/nelem != elsize) {
126 retval = malloc(size);
130 (void) memset(retval, 0, size);
144 size_t size;
172 size = size_arg + overhead;
180 if (size < size_arg) {
185 buf = vmem_xalloc(umem_memalign_arena, size, align, phase,
199 uint32_t low_size = (uint32_t)size;
202 uint32_t high_size = (uint32_t)(size >> 32);
222 valloc(size_t size)
224 return (memalign(pagesize, size));
234 * On success, returns the data size through *data_size_arg, if (!is_free).
241 int do_free, /* free the buffer, or just get its size? */
247 size_t size;
256 size = buf->malloc_size;
258 switch (UMEM_MALLOC_DECODE(buf->malloc_stat, size)) {
262 data_size = size - sizeof (malloc_data_t);
272 data_size = size - 2 * sizeof (malloc_data_t);
291 size += high_size << 32;
294 data_size = size - 2 * sizeof (malloc_data_t);
321 size += high_size << 32;
331 data_size = size - overhead;
354 _umem_free(base, size);
363 vmem_xfree(umem_memalign_arena, base, size);
398 * get the old data size without freeing the buffer
405 if (newsize == oldsize) /* size didn't change */