/* * Relallocate and release memory pools. * $Id$ * Copyright (c) 1997 by Tycho Softworks. * For conditions of distribution and reuse see product license. */ #include void memrelease(MEMPOOL *mem) { MEMPAGE *page = memfirst(mem); MEMPAGE *next; while(page) { next = page->page_next; free(page); page = next; } } void memreuse(MEMPOOL *mem) { MEMPAGE *page = memfirst(mem); MEMPAGE *next; page = page->page_next; while(page) { next = page->page_next; free(page); page = next; } mem->mem_pused = 1; mem->mem_free = NULL; page = mem->mem_last = memfirst(mem); page->page_used = 0; page->page_next = NULL; }