Take the 2-minute tour ×  This question already has an answer
here:  hey, I'm trying to programming a crossword creator. using
a given dictionary txt file and a given pattern txt file. The
basic idea is using DFS algorithm. the problem begin when the
dictionary file is v-e-r-y big (about 50000 words). then i
recive the :  Exception in thread "main"
java.lang.OutOfMemoryError: GC overhead limit exceeded  i know
that there is a part in my program that wastes memory, but i
don't know where it is, how to find it and how to fix it
share|improve this question  marked as duplicate by ThiefMaster
Mar 18 '13 at 23:11   "How to find" is covered by this related
question: stackoverflow.com/questions/2840421/… –  meriton Jun 6
'10 at 21:26  5 Answers 5  Does it really waste memory ? If
you're loading a sizeable dictionary, then you may simply want
to increase the JVM memory settings (the JVM has a maximum
memory allocation - dependent on your platform, and
configurable).   $ java -Xmx512m ....  would increase the
maximum