aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/kmalloc.h
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2014-12-07 11:49:52 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2014-12-07 11:49:52 +0100
commitd7aaba8c85cc71f3184cddcf20b740c5157c864d (patch)
treed99c9d6765eb433c73498c5e99ebcdb088c0e7e6 /kernel/include/kmalloc.h
parent26b68c108664cb54089613bdbc54624ed66f7fda (diff)
downloadkogata-d7aaba8c85cc71f3184cddcf20b740c5157c864d.tar.gz
kogata-d7aaba8c85cc71f3184cddcf20b740c5157c864d.zip
Refactor kmalloc & tests in kmain.
Diffstat (limited to 'kernel/include/kmalloc.h')
-rw-r--r--kernel/include/kmalloc.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/include/kmalloc.h b/kernel/include/kmalloc.h
new file mode 100644
index 0000000..a409865
--- /dev/null
+++ b/kernel/include/kmalloc.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <stdint.h>
+#include <stddef.h>
+
+// Kernel memory allocator : one slab allocator for shared memory
+// Thread-safe.
+
+void kmalloc_setup();
+
+void* kmalloc(size_t sz);
+void kfree(void* ptr);
+
+/* vim: set ts=4 sw=4 tw=0 noet :*/