diff options
Diffstat (limited to 'na/include')
| -rw-r--r-- | na/include/lume/slab.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/na/include/lume/slab.h b/na/include/lume/slab.h new file mode 100644 index 0000000..4ebade1 --- /dev/null +++ b/na/include/lume/slab.h @@ -0,0 +1,28 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* Copyright (C) 2026 Richard Qin */ + +#pragma once + +/* + * SLUB public API + * + * This header exposes the allocator entry points to the rest of the kernel. + * Implementation details stay in mm/slab.h and mm/slab.cc. + */ + +#include <lume/types.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* Initialize global slab caches. */ +void slab_init(); + +/* Allocate/free kernel memory. */ +void* kmalloc(uint32 size); +void kfree(void* ptr); + +#ifdef __cplusplus +} +#endif |
