From 33f599bdb87e0604d2e3905b835c5f23b5e3b877 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 28 Nov 2018 18:11:29 +0100 Subject: added supported for arduino crypot lib --- lib/stdc++-minimal.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib') 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); +} -- cgit v1.2.3