"increasing the memory size of the compiler"???
I do not know why it could help to solve the problem?
Are you allocate memory dynamically in your code? Or call the same function itself and end up in an infinite loop? Or ...
There are many possibility ...