6#include <sys/spinlock.h>
40#define SLAB_NAMELEN 32
65#define DECLARE_SLAB(_type) \
66 _type *_type##_Alloc(); \
67 void _type##_Free(_type *obj);
69#define DEFINE_SLAB(_type, _pool) \
70 _type *_type##_Alloc() { \
71 return (_type *)Slab_Alloc(_pool); \
73 void _type##_Free(_type *obj) { \
74 Slab_Free(_pool, obj); \
uintptr_t XMem_GetLength(XMem *xmem)
void PAlloc_Retain(void *pg)
void PAlloc_Release(void *pg)
void Slab_Free(Slab *slab, void *obj)
void * PAlloc_AllocPage()
void * Slab_Alloc(Slab *slab) __attribute__((malloc))
bool XMem_Allocate(XMem *xmem, uintptr_t length)
void PAlloc_AddRegion(uintptr_t start, uintptr_t len)
uintptr_t XMem_GetBase(XMem *xmem)
void XMem_Destroy(XMem *xmem)
void Slab_Init(Slab *slab, const char *name, uintptr_t objsz, uintptr_t align)
struct multiboot_mod_list __attribute__
LIST_ENTRY(SlabElement) free
LIST_ENTRY(Slab) slabList
LIST_HEAD(SlabElementHead, SlabElement) freeList