This is a PermGen space issue. Usually not caused by a memory leak, the permanent generation space is use for class loading, string literals, etc. The amount of RAM on the VM should not really affect your decision on this number.
Instead, give it increments that make sense. Try increasing to 256m as the maximum and see if the problem is resolved. If not, then something else is going on here.
Can you give some background in what you were doing at the time?
Also, you can try switching to JDK 8 which no longer uses permanent generation.