I simply burned the code written below but it is showing me irregular behaviour.. as in output's last paragraph, free memory increases after a runtime allocation, how it is possible? The output is attached :
#include <MemoryFree.h>
String str="rajat";
int flag=0;
void setup()
{
// put your setup code here, to run once:
Serial.begin(9600); Serial.println(freeMemory(), DEC); // print how much RAM is available.
Serial.println("Lets Start");
}
void loop()
{
Serial.println("");
Serial.println("Rajat0");
Serial.println(freeMemory(), DEC);
Serial.println("Rajat1");
str=str+"rjt";
Serial.println(str);
Serial.println("Rajat2");
Serial.println(freeMemory(), DEC);
Serial.println("Rajat3");
Serial.println("");
delay(1000);
}