Home | History | Annotate | Download | only in ofwboot

Lines Matching refs:size

87  * Each block actually has ALIGN(struct ml) + ALIGN(size) bytes allocated
91 * allocated or unallocated: holds size of user-data part of block.
98 * ALIGN(data size) - 1)
103 * However, note that ALIGN(sizeof(struct ml)) + ALIGN(data size) must
112 unsigned size;
122 alloc(size_t size)
126 unsigned bestsize = 0xffffffff; /* greater than any real size */
132 printf("alloc(%zu)", size);
139 size = ALIGN(size) + OVERHEAD;
143 for (f = freelist.lh_first; f != NULL && (size_t)f->size < size;
153 if ((size_t)f->size >= size) {
154 if ((size_t)f->size == size) /* exact match */
157 if (f->size < bestsize) {
160 bestsize = f->size;
173 * to page size, and record the chunk size.
175 size = roundup(size, NBPG);
176 help = OF_claim(NULL, (unsigned)size, NBPG);
181 f->size = (unsigned)size;
183 printf("=%lx (new chunk size %u)\n",
184 (u_long)(help + OVERHEAD), f->size);
199 printf("=%lx (origsize %u)\n", (u_long)(help + OVERHEAD), f->size);
208 dealloc(void *ptr, size_t size)
213 printf("dealloc(%lx, %zu) (origsize %u)\n", (u_long)ptr, size, a->size);
216 if (size > (size_t)a->size)
218 size, (u_long)ptr, a->size);
235 OF_release(m, m->size);
241 OF_release(m, m->size);