Skip to content

Commit a883079

Browse files
jamesmintrambgianfo
authored andcommitted
Kernel: Add missing new/delete and kcalloc to dummy.cpp
1 parent 031b0c7 commit a883079

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Kernel/Arch/aarch64/dummy.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ void dummy() { }
1818
size_t kmalloc_good_size(size_t);
1919
size_t kmalloc_good_size(size_t) { return 0; }
2020

21+
void* kcalloc(unsigned long, unsigned long) { return nullptr; }
22+
2123
void kfree_sized(void*, size_t);
2224
void kfree_sized(void*, size_t) { }
2325

@@ -27,6 +29,21 @@ void* kmalloc(size_t) { return nullptr; }
2729
void* operator new(size_t size) { return kmalloc(size); }
2830
void* operator new(size_t size, std::align_val_t) { return kmalloc(size); }
2931

32+
void* operator new(size_t, std::nothrow_t const&) noexcept { return nullptr; }
33+
void* operator new(size_t, std::align_val_t, std::nothrow_t const&) noexcept { return nullptr; }
34+
void* operator new[](size_t) { return (void*)0xdeadbeef; }
35+
void* operator new[](size_t, std::nothrow_t const&) noexcept { return nullptr; }
36+
37+
void operator delete(void*) noexcept { }
38+
void operator delete(void*, size_t) noexcept { }
39+
void operator delete(void*, size_t, std::align_val_t) noexcept { }
40+
void operator delete[](void*) noexcept { }
41+
void operator delete[](void*, size_t) noexcept { }
42+
43+
namespace std {
44+
const nothrow_t nothrow;
45+
}
46+
3047
namespace Kernel {
3148

3249
void dump_backtrace(PrintToScreen) { }

0 commit comments

Comments
 (0)