diff options
author | aqua <aqua@iserlohn-fortress.net> | 2022-11-08 10:46:07 +0200 |
---|---|---|
committer | aqua <aqua@iserlohn-fortress.net> | 2022-11-08 14:56:42 +0200 |
commit | 527a5ea7a896a9b00e0563abbbed7771a398971b (patch) | |
tree | 81dcbe1b95c88bea447dfcc32d6fed46835713bb /lib/stdlib.h | |
parent | Capture ps2 mouse packets (diff) | |
download | kernel-527a5ea7a896a9b00e0563abbbed7771a398971b.tar.xz |
Add python-sphinx docs
Diffstat (limited to 'lib/stdlib.h')
-rw-r--r-- | lib/stdlib.h | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/stdlib.h b/lib/stdlib.h index 6b8e09d..7f235f0 100644 --- a/lib/stdlib.h +++ b/lib/stdlib.h @@ -1,6 +1,21 @@ #pragma once -#include <stddef.h> +/** + * Allocate size bytes and return a pointer to the allocated memory + */ +void *malloc(unsigned int size); -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); |