summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-11 13:30:19 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-11 14:14:51 +0200
commit0718bd264c42cd373085d68607324f3981b1a05c (patch)
tree1b8231f1c13bc527a0c248f07a4b48e8bca2200a
parentf684742f154620e6adaeec9db10b0e04d5e76729 (diff)
downloadserenity-0718bd264c42cd373085d68607324f3981b1a05c.zip
Kernel: Remove some no-longer-needed C library functions
Now that we no longer demangle symbols in the kernel, we don't need to provide stuff like malloc(), memchr(), free(), etc to the demangler.
-rw-r--r--Kernel/StdLib.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp
index 71c76b35b0..dc8da48252 100644
--- a/Kernel/StdLib.cpp
+++ b/Kernel/StdLib.cpp
@@ -396,32 +396,6 @@ char* strstr(const char* haystack, const char* needle)
return const_cast<char*>(haystack);
}
-void* memchr(const void* ptr, int c, size_t size)
-{
- char ch = c;
- auto* cptr = (const char*)ptr;
- for (size_t i = 0; i < size; ++i) {
- if (cptr[i] == ch)
- return const_cast<char*>(cptr + i);
- }
- return nullptr;
-}
-
-void* malloc(size_t s)
-{
- return kmalloc(s);
-}
-
-void* realloc(void* p, size_t s)
-{
- return krealloc(p, s);
-}
-
-void free(void* p)
-{
- return kfree(p);
-}
-
// Functions that are automatically called by the C++ compiler.
// Declare them first, to tell the silly compiler that they are indeed being used.
[[noreturn]] void __stack_chk_fail() __attribute__((used));