diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-12-17 16:53:45 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-12-17 16:53:45 +0100 |
commit | 5f4e55a3d274838388696c3f8130b0f2dc40daf7 (patch) | |
tree | 066cb0ff68142acbfe9cc4a45ec0ef596ff93919 /cores/arduino/new.cpp | |
parent | bb9cc4f70c17eed497ab30d7bfe6eebb35055205 (diff) | |
parent | 09b755fb9c3f5c42fa9b38ffeef0dbfa2cfd8315 (diff) |
Merged 1.0.4 pre-release into 1.5
Diffstat (limited to 'cores/arduino/new.cpp')
-rw-r--r-- | cores/arduino/new.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp index 0f6d422..b81031e 100644 --- a/cores/arduino/new.cpp +++ b/cores/arduino/new.cpp @@ -5,10 +5,20 @@ void * operator new(size_t size) return malloc(size); } +void * operator new[](size_t size) +{ + return malloc(size); +} + void operator delete(void * ptr) { free(ptr); -} +} + +void operator delete[](void * ptr) +{ + free(ptr); +} int __cxa_guard_acquire(__guard *g) {return !*(char *)(g);}; void __cxa_guard_release (__guard *g) {*(char *)g = 1;}; |