[antlr-interest] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

Jim Idle jimi at temporal-wave.com
Thu Jun 19 10:37:42 PDT 2008


On Thu, 2008-06-19 at 10:30 -0700, siva.kumar at loglogic.com wrote:

> I have a simple grammar at:
> 
> http://pastie.textmate.org/218178
> 
> The LOG file that's parsed is of the form:
> 
> ABCD="....", EF="aaaa", abcd="1.2.3.4",hostname=a at b.com,
> 
> While I build and run this using antlr and java, I get the "Java heap
> space" problem on a very large file (70M). I don't have a problem with
> smaller files


Try using the -Xincgc option with your runtime, but are you doing
anything that would cause the runtime to try and create huge strings
such as the entire input lots of times in the lexer, or calling the
routine that produces the dot spec for graphviz (that blows up after the
number of nodes gets somewhat large. Or creating objects and  references
and then never freeing up the references to these objects?

You could always switch to the C output, where you could at least find
out where the memory was going to ;-)

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080619/7999584f/attachment.html 


More information about the antlr-interest mailing list