I noticed this in arduino-1.5\hardware\arduino\sam\libraries\Audio\Audio.cpp
buffer = (uint32_t *) malloc(bufferSize * sizeof(uint32_t));
Sadly, memory allocation has bugs at present. Boilerplate:
Please note that, at present, the
String library has bugs as discussed
here and
here.
In particular, the dynamic memory allocation used by the String class may fail and cause random crashes.
Does this use of malloc imply that Audio will have he same issues that the use of the String clas has at present? Or does the C compiler and library used on the SAM architecture not have those issues? (And if not, does that mean String is also safe to use, on Due?)