Use of "new" compiling for Due requires 51Kb extra program memory #1485
Labels
Board: Arduino Due
Applies only to the Due
Component: Core
Related to the code for the standard Arduino API
Milestone
See forum thread: http://forum.arduino.cc/index.php?topic=173718
A small test program which uses a small class, statically allocated, compiled for the Due under 1.5.2, takes:
Changing (only) to use the "new" operator to allocate the class dynamically, the sketch now takes:
It seems excessive to take 10% of available memory just to implement the operator new.
Adding these lines to the start of the sketch:
The sketch now takes:
Only 1% more memory.
There must be some linking or other problem in the way the files implementing "operator new" are constructed.
The text was updated successfully, but these errors were encountered: