aboutsummaryrefslogtreecommitdiff
path: root/lib/libk/include/stdlib.h
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2023-10-08 19:50:00 +0300
committeraqua <aqua@iserlohn-fortress.net>2023-11-27 21:02:22 +0200
commitfc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 (patch)
tree9607ab4d5f1d4069d4f761a0b25eada36088bd6b /lib/libk/include/stdlib.h
parentrules.mk: make include paths absolute (diff)
downloadkernel-fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119.tar.xz
Use meson build system
Diffstat (limited to 'lib/libk/include/stdlib.h')
-rw-r--r--lib/libk/include/stdlib.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libk/include/stdlib.h b/lib/libk/include/stdlib.h
new file mode 100644
index 0000000..143c931
--- /dev/null
+++ b/lib/libk/include/stdlib.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <stddef.h>
+
+/**
+ * Allocate size bytes and return a pointer to the allocated memory
+ */
+void *malloc(size_t size);
+
+/**
+ * Free the memory space pointed to by ptr
+ */
+void free(void *ptr);
+
+/**
+ * Fill the first n bytes of the memory area pointed to by s with the constant byte c.
+ */
+void *memset(void *s, int c, long unsigned n);
+
+/**
+ * Copy n bytes from memory area src to memory area dest. The memory areas must not overlap.
+ */
+void *memcpy(void *__restrict__ dest, const void *__restrict__ src, long unsigned n);