mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2024-12-22 09:41:54 +00:00
Slab: can be deleted as a single object
This commit is contained in:
parent
9490ed2bc5
commit
a2ddd3d443
11
lib/slab.c
11
lib/slab.c
@ -245,6 +245,17 @@ sl_new(pool *p, uint size)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sl_delete - destroy an existing Slab
|
||||||
|
* @s: slab
|
||||||
|
*
|
||||||
|
* This function destroys the given Slab.
|
||||||
|
*/
|
||||||
|
void sl_delete(slab *s)
|
||||||
|
{
|
||||||
|
rfree(&s->r);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* sl_alloc - allocate an object from Slab
|
* sl_alloc - allocate an object from Slab
|
||||||
* @s: slab
|
* @s: slab
|
||||||
|
Loading…
Reference in New Issue
Block a user