You are viewing a plain text version of this content. The canonical link for it is here.
Posted to regexp-dev@jakarta.apache.org by Stephan Wiesner <wi...@werum.de> on 2001/08/13 09:16:48 UTC

Fix for Out of Memory with big Strings

I use the RexExp Classes in a way I would use them in Perl.
So I often scan text files.
When they are big (10MB) I get an 'out of memory' exception, though my
computer has lots of resources left.
The fix is quite simple, though I would have never thought of it, if I
hadn't used this trick to boost performance with other programms.

Just call your programm with
java -Xmx96m RegTest
This will allocate 96MB of memory for your programm.

I think this should be stated in the documentation, as it should be quite a
common problem (same with using XML DOM and big XML files).

Stephan