alloc_table
struct alloc_table alloc_table_default[] = {
struct alloc_table *alloc_table = alloc_table_default;
int allocate_space(struct disklabel *, const struct alloc_table *);
if ((alloc_table = calloc(1, sizeof(struct alloc_table))) == NULL)
if ((alloc_table[0].table = reallocarray(alloc_table[0].table,
sa = &(alloc_table[0].table[idx]);
alloc_table[0].sz = idx;
if (allocate_space(&label, &alloc_table[i]) == 0) {
allocate_space(struct disklabel *lp, const struct alloc_table *alloc_table)
for (i = 0; i < alloc_table->sz; i++) {
sa[i] = alloc_table->table[i];
if (alloc_table->table == alloc_big)
sa[alloc_table->sz - 1].rate = 100; /* Last allocation is greedy. */
for (i = 0; i < alloc_table->sz; i++) {
alloc_table:
goto alloc_table;
err = alloc_table(&pt, sz, sz, *npages, &prng,
err = alloc_table(&pt, prime, max, *npages, &prng,