Lines Matching refs:size
88 * Each block actually has ALIGN(struct ml) + ALIGN(size) bytes allocated
92 * allocated or unallocated: holds size of user-data part of block.
99 * ALIGN(data size) - 1)
104 * However, note that ALIGN(sizeof(struct ml)) + ALIGN(data size) must
113 unsigned size;
123 alloc(size_t size)
127 unsigned bestsize = 0xffffffff; /* greater than any real size */
133 printf("alloc(%zu)", size);
140 size = ALIGN(size) + OVERHEAD;
144 for (f = freelist.lh_first; f != NULL && (size_t)f->size < size;
154 if ((size_t)f->size >= size) {
155 if ((size_t)f->size == size) /* exact match */
158 if (f->size < bestsize) {
161 bestsize = f->size;
174 * to page size, and record the chunk size.
176 size = roundup(size, NBPG);
177 help = OF_claim(NULL, (unsigned)size, NBPG);
182 f->size = (unsigned)size;
184 printf("=%lx (new chunk size %u)\n",
185 (u_long)(help + OVERHEAD), f->size);
200 printf("=%lx (origsize %u)\n", (u_long)(help + OVERHEAD), f->size);
209 dealloc(void *ptr, size_t size)
214 printf("dealloc(%lx, %zu) (origsize %u)\n", (u_long)ptr, size, a->size);
217 if (size > (size_t)a->size)
219 size, (u_long)ptr, a->size);
236 OF_release(m, m->size);
242 OF_release(m, m->size);