if (index == ~0 || template->baseva < ch->baseva)
{
pool_get (vam->chunks, new_ch);
if (index == ~0 || template->baseva < ch->baseva)
{
pool_get (vam->chunks, new_ch);
index = ch - vam->chunks;
pool_get (vam->chunks, new_ch);
index = ch - vam->chunks;
pool_get (vam->chunks, new_ch);
pool_get (vam->chunks, new_ch);
/* ch might have just moved */
ch = pool_elt_at_index (vam->chunks, index);
pool_get (vam->chunks, new_ch);
/* ch might have just moved */
ch = pool_elt_at_index (vam->chunks, index);
new_ch->next = new_ch->prev = ~0;
new_ch->baseva = ch->baseva + size;
new_ch->size = ch->size - size;
new_ch->next = new_ch->prev = ~0;
new_ch->baseva = ch->baseva + size;
new_ch->size = ch->size - size;
pool_put (vam->chunks, ch);
/* See about combining with next elt */
ch = prev_ch;
pool_put (vam->chunks, ch);
/* See about combining with next elt */
ch = prev_ch;