summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/stdc++-minimal.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/stdc++-minimal.cpp b/lib/stdc++-minimal.cpp
index c3b0559..982719b 100644
--- a/lib/stdc++-minimal.cpp
+++ b/lib/stdc++-minimal.cpp
@@ -39,3 +39,15 @@ void __cxa_deleted_virtual(void) {
printf("PANIC: __cxa_deleted_virtual() got called ...\r\n");
for(;;);
}
+
+void * operator new(size_t n)
+{
+ void * const p = malloc(n);
+ // handle p == 0
+ return p;
+}
+
+void operator delete(void * p) // or delete(void *, std::size_t)
+{
+ free(p);
+}