aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/new.cpp
diff options
context:
space:
mode:
authorPharap <2933055+Pharap@users.noreply.github.com>2018-08-18 09:09:15 +0100
committerGitHub <noreply@github.com>2018-08-18 09:09:15 +0100
commitc6ce36d56cd5e874e60c3ba8a36cc77c307df718 (patch)
tree73562226d18a76936e479f97d9c2385ac5b49e57 /cores/arduino/new.cpp
parentb7c607663fecc232e598f2c0acf419ceb0b7078c (diff)
Add placement new operator
Diffstat (limited to 'cores/arduino/new.cpp')
-rw-r--r--cores/arduino/new.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp
index cf6f89c..bfb219d 100644
--- a/cores/arduino/new.cpp
+++ b/cores/arduino/new.cpp
@@ -26,6 +26,10 @@ void *operator new[](size_t size) {
return malloc(size);
}
+void * operator new(size_t size, void * ptr) {
+ return ptr;
+}
+
void operator delete(void * ptr) {
free(ptr);
}