summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2018-11-28 18:11:29 +0100
committerChristian Pointner <equinox@spreadspace.org>2018-11-28 18:11:29 +0100
commit33f599bdb87e0604d2e3905b835c5f23b5e3b877 (patch)
treefb0801a97de92409dc6146723c19a0e34e497f78 /lib
parentusb-lora example works now - but is not stable yet... (diff)
added supported for arduino crypot lib
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);
+}