Skip to content

Antlr 4.7 creating Java Heap Size Out Of Memory issue  #2384

@sufail

Description

@sufail

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. Is there any APIs being added for the cache eviction and to release resources efficiently?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions