From a2ddd3d443d83e00769f16f7cb0e6b777cca8476 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Thu, 30 May 2024 23:05:15 +0200 Subject: [PATCH] Slab: can be deleted as a single object --- lib/slab.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.47.2