3

I am trying to create ParseTree objects for a huge set of (really huge) java files using the Java7 grammar, but in the middle, getting an out of memory issue with GC overhead. I am cleaning up the ParseTree and Parser/Lexer after completing each file. When I looked at the memory analyzer, it is found that org.antlr.v4.runtime.dfa.DFA[] is taking 87% of the heap space. I have gone through some old bugs related to this but nothing really works for me. I am using Antlr version 4.7.

From the old bugs, I understand that clearing the DFA[] won't help. Are there any APIs being added for the cache eviction and to release resources efficiently? thanks in advance.

Shalu T D
  • 3,921
  • 2
  • 26
  • 37
  • We have just found a similar error with a similar fingerprint. prod]# Exception in thread "main" java.lang.OutOfMemoryError: Java heap spaceException in thread "main" java.lang.OutOfMemoryError: Java heap space - We are also doing a parsetree on 3m lines of code. Anyone seeing similar issue ? – billDickens Aug 17 '20 at 19:21

0 Answers0