diff options
| author | Richard Qin <richard.qin.x@gmail.com> | 2026-05-13 15:48:53 +0800 |
|---|---|---|
| committer | Richard Qin <richard.qin.x@gmail.com> | 2026-05-13 15:48:53 +0800 |
| commit | 60a7d7409c91216a11c13abee53066b260edb17a (patch) | |
| tree | 34b4fbb393f354bc1eddcaf54fe08eb3ee6620ee /na/include | |
| parent | b5faa01c335354f6b4090757603343ad26071591 (diff) | |
| download | lume-60a7d7409c91216a11c13abee53066b260edb17a.tar.gz lume-60a7d7409c91216a11c13abee53066b260edb17a.tar.xz | |
feat: update slab allocator to use Page descriptors instead of Frame
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 |
