communication errors with software serial

I am not. It is a GSM shield.

You have a GSM shield that has wires? WTF are they for?

You would expect when running out of memory failure occurs at the same point.

There you are wrong. I expect undefined behavior when running out of memory. YOU expect the failure to occur consistently.

Yes, I do have a clue.

OK, Mr. SmartyPants. What does it do? Just because it was in some old code doesn't mean it is right. And, I can assure you that neither the old meaning of flush() or the new meaning of flush() is useful at that point. Mr. Igoe may be a pioneer in the Arduino field, but he is NOT a programmer, and some of his examples are crap.