To access the slab allocator API, include the following header file:
#include <parlib/slab.h>
struct slab_cache;
typedef struct slab_cache slab_cache_t;
typedef void (*slab_cache_ctor_t)(void *, size_t);
typedef void (*slab_cache_dtor_t)(void *, size_t);
struct slab_cache *slab_cache_create(const char *name, size_t obj_size,
int align, int flags,
slab_cache_ctor_t ctor,
slab_cache_dtor_t dtor);
void slab_cache_destroy(struct slab_cache *cp);
void *slab_cache_alloc(struct slab_cache *cp, int flags);
void slab_cache_free(struct slab_cache *cp, void *buf);