1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include "kstd/os/error.hpp" namespace kstd::libc { extern "C" { [[noreturn]] auto abort() -> void { kstd::os::abort(); } [[noreturn, gnu::weak]] auto free(void *) -> void { kstd::os::panic("Tried to call free."); } } } // namespace kstd::libc