CS350 COS
COS
|
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/cdefs.h>
#include <sys/kassert.h>
#include <sys/kdebug.h>
#include <sys/queue.h>
#include <sys/kmem.h>
#include <machine/pmap.h>
Go to the source code of this file.
Functions | |
LIST_HEAD (SlabListHead, Slab) | |
int | SlabExtend (Slab *slab) |
void * | Slab_Alloc (Slab *slab) |
void | Slab_Free (Slab *slab, void *region) |
static void | Debug_Slabs (int argc, const char *argv[]) |
REGISTER_DBGCMD (slabs, "Display list of slabs", Debug_Slabs) | |
|
static |
Definition at line 148 of file slab.c.
LIST_HEAD | ( | SlabListHead | , |
Slab | |||
) |
Definition at line 18 of file slab.c.
REGISTER_DBGCMD | ( | slabs | , |
"Display list of slabs" | , | ||
Debug_Slabs | |||
) |
void * Slab_Alloc | ( | Slab * | slab | ) |
Slab_Alloc –
Free a slab object. @param [in] slab Slab that the object belongs to. @retval NULL Could not allocate an object. @return Pointer to the allocated object.
Definition at line 105 of file slab.c.
void Slab_Free | ( | Slab * | slab, |
void * | region | ||
) |
Slab_Free –
Free a slab object. @param [in] slab Slab that the object belongs to. @param [in] region Object to free.
Definition at line 135 of file slab.c.
int SlabExtend | ( | Slab * | slab | ) |
SlabExtend –
Grow the slab to allocate new objects. @param [in] slab Slab that we want to expand. @retval -1 Failed to expand the slab. @retval 0 Success.
Definition at line 63 of file slab.c.