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
a9208e602d
commit
7ef2a042bc
11
lib/slab.c
11
lib/slab.c
@ -245,6 +245,17 @@ sl_new(pool *p, uint size)
|
||||
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
|
||||
* @s: slab
|
||||
|
Loading…
Reference in New Issue
Block a user