From 7ef2a042bcfb9b2c303017989712a78810ce5b58 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 935e3546..ab913f0c 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