Add a libcxx with a new operator

This commit is contained in:
Drew Galbraith 2023-06-07 10:48:03 -07:00
parent dcc05f2741
commit 010e261dc7
8 changed files with 132 additions and 2 deletions

6
lib/libcxx/src/new.cpp Normal file
View file

@ -0,0 +1,6 @@
#include "new"
#include <stdlib.h>
[[nodiscard]] void* operator new(std::size_t size) { return malloc(size); }
[[nodiscard]] void* operator new[](std::size_t size) { return malloc(size); }