È possibile che freeMemory non tenga conto dello stack?
PS: fortuna che ti sei fermato a 9!, con 10 avresti visto la svista