diff --git a/libraries/AP_Common/c++.cpp b/libraries/AP_Common/c++.cpp new file mode 100644 index 0000000000..107d7fb045 --- /dev/null +++ b/libraries/AP_Common/c++.cpp @@ -0,0 +1,21 @@ +// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*- + +// +// C++ runtime support not provided by Arduino +// +// Note: use new/delete with caution. The heap is small and +// easily fragmented. +// + +#include + +void * operator new(size_t size) +{ + return(calloc(size, 1)); +} + +void operator delete(void *p) +{ + if (p) + free(p); +} diff --git a/libraries/AP_Common/keywords.txt b/libraries/AP_Common/keywords.txt new file mode 100644 index 0000000000..470e71f7a8 --- /dev/null +++ b/libraries/AP_Common/keywords.txt @@ -0,0 +1,4 @@ +Menu KEYWORD1 +run KEYWORD2 +Location KEYWORD2 +