/* slab.h - state purpose of file here. */
/* Copyright (C) 2018 Robin Miyagi https://www.linuxprogramming.ca/
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ifndef ____SLAB_H____
#define ____SLAB_H____

#include <stddef.h>

/*
 * A.D.T. for slab allocator.
 */
typedef struct {} t_slab;

/*
 * Allocate a new slab object.
 */
extern t_slab* slab_new (size_t s);

/*
 * Destroy the given slab object.
 */
extern void slab_delete (t_slab* s);

/*
 * Allocate one element in the given slab.
 */
extern void* slab_alloc (t_slab* s);

/*
 * Free the given memory in the given slab.
 */
extern void slab_free (t_slab* s, void* ptr);


#endif	/* ! ____SLAB_H____ */
