+ c = d->next;
+ xfree(d);
+ }
+ for(d=p->first_large; d; d = c)
+ {
+ c = d->next;
+ xfree(d);
+ }
+ xfree(p);
+}
+
+void
+mp_flush(struct mempool *p)
+{
+ struct memchunk *c;
+
+ p->free = p->last = NULL;
+ p->current = p->first;
+ while (c = p->first_large)
+ {
+ p->first_large = c->next;
+ xfree(c);