From: Maria Matejka Date: Thu, 30 May 2024 21:05:15 +0000 (+0200) Subject: Slab: can be deleted as a single object X-Git-Tag: v3.0.0~200 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2ddd3d443d83e00769f16f7cb0e6b777cca8476;p=thirdparty%2Fbird.git Slab: can be deleted as a single object --- diff --git a/lib/slab.c b/lib/slab.c index 935e35460..ab913f0cd 100644 --- a/lib/slab.c +++ b/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