From fc13fb2ba5993d06d9d6ae5e80bc337aebbdc119 Mon Sep 17 00:00:00 2001 From: aqua Date: Sun, 8 Oct 2023 19:50:00 +0300 Subject: Use meson build system --- lib/libk/include/stdlib.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 lib/libk/include/stdlib.h (limited to 'lib/libk/include/stdlib.h') 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 + +/** + * 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); -- cgit v1.2.1