Commit 6e586fdf authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Free cache_node_mcb and cache_node_block at shutdown.

parent 05190dab
...@@ -182,3 +182,27 @@ set_mru(Cache_node_mcb *mcb, ...@@ -182,3 +182,27 @@ set_mru(Cache_node_mcb *mcb,
unlink_lru(node, &mcb->lru, &mcb->mru); unlink_lru(node, &mcb->lru, &mcb->mru);
insert_mru(node, &mcb->lru, &mcb->mru); insert_mru(node, &mcb->lru, &mcb->mru);
} }
static void
free_cache_node_block (Cache_node_block *block)
{
sfree(block->nodes);
sfree(block);
}
extern void
free_cache_node_mcb(Cache_node_mcb *control)
{
Cache_node_block *block;
while ( control->last_block != NULL )
{
block = control->last_block;
control->last_block = block->link;
free_cache_node_block (block);
}
sfree(control->lookup_table);
sfree(control);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment