aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/new.cpp
diff options
context:
space:
mode:
authorCristian Maglie <c.maglie@bug.st>2014-09-06 12:44:53 +0200
committerCristian Maglie <c.maglie@bug.st>2014-09-06 12:44:53 +0200
commitf02d637a89c1ac15ee16acc36ed02025f781c4e3 (patch)
tree807906dfab2f2bcd67f8e0532bcc3837b8e87af4 /cores/arduino/new.cpp
parenta4496b927bb7889ed076e7b7f0cc27fa0c4b9b75 (diff)
Fixed license for new.cpp and small cosmetic changes
Diffstat (limited to 'cores/arduino/new.cpp')
-rw-r--r--cores/arduino/new.cpp26
1 files changed, 20 insertions, 6 deletions
diff --git a/cores/arduino/new.cpp b/cores/arduino/new.cpp
index 1486012..cf6f89c 100644
--- a/cores/arduino/new.cpp
+++ b/cores/arduino/new.cpp
@@ -1,3 +1,20 @@
+/*
+ Copyright (c) 2014 Arduino. All right reserved.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+*/
#include <stdlib.h>
@@ -5,18 +22,15 @@ void *operator new(size_t size) {
return malloc(size);
}
-void * operator new[](size_t size)
-{
+void *operator new[](size_t size) {
return malloc(size);
}
-void operator delete(void * ptr)
-{
+void operator delete(void * ptr) {
free(ptr);
}
-void operator delete[](void * ptr)
-{
+void operator delete[](void * ptr) {
free(ptr);
}