I'm using BigNumber library on my project which is running on a Mega2560. Very fast, I encounter a freeze. I've find out that I've got a memory leak. I've pointed out my problem in a very short sketch which reproduce the problem :
The String class has long been a source of memory leaks and the problem is very well known. It is there only because somebody, at some point, thought that a char array was too difficult for a beginner to understand, but it really isn't. So, stay clear of this String thing, because everything you can do with it you can do without it. Once you have figured out how char arrays work, it's actually easier to use them instead of String, IMO.
Anything that uses dynamic memory allocation, String objects included, can lead to memory leaks. Strings are especially bad because it's so easy to do things that invoke the copy constructor which means you end up making multiple intermediate strings in RAM that you weren't aware of.
On an Arduino without much RAM, Strings can quickly lead to trouble.
That said, your example results are surprising - how do you have so little free memory with such a short piece of code?