-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Antlr 4.7 creating Java Heap Size Out Of Memory issue #2384
Comments
Hi,
the place for support is the google discussion group.
Cheers,
Eric
… Le 23 oct. 2018 à 01:53, sufail ***@***.***> a écrit :
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?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#2384>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ADLYJOKM74V7OjWBBiyJRd-4lQ8rbNiNks5ungYegaJpZM4Xz2qw>.
|
This is what happened to me !!!I find the memory of org.antlr.v4.runtime.dfa.DFA do not gc。 val lexer = new myparserLexer(new ANTLRInputStream(clean_text)); after run this code
the memory do not gc, even I manual gc。 how can I do?thank you |
Please move this to the google discussion group
Envoyé de mon iPhone
… Le 10 août 2021 à 13:00, Huang.Xiao ***@***.***> a écrit :
This is what happened to me !!!I find the memory of org.antlr.v4.runtime.dfa.DFA do not gc。
here is my code:
`
val lexer = new myparserLexer(new ANTLRInputStream(clean_text));
lexer.removeErrorListeners();
lexer.addErrorListener(new ThrowingErrorListener());
val tokens = new CommonTokenStream(lexer);
val parser = new myparserParser(tokens);
parser.removeErrorListeners();
parser.addErrorListener(new ThrowingErrorListener());
val tree = parser.exprs()
val vistor = new parseVistor(is_sequence, is_graph)
vistor.visit(tree)
after run this code
val tree = parser.exprs()
`
the memory do not gc, even I manual gc。
how can I do?thank you
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
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?
The text was updated successfully, but these errors were encountered: