Skip to content
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

Generated code memory leak (real cases) #14499

Closed
tmptrash opened this issue Dec 29, 2015 · 2 comments
Closed

Generated code memory leak (real cases) #14499

tmptrash opened this issue Dec 29, 2015 · 2 comments

Comments

@tmptrash
Copy link

Good morning everyone.

Sorry for this reopening. But i have two real cases of eval() related memory leaks in my application. I wrote a comment to closed issue, but no answer, so i decided to open another one.

In two words: i have a biology research, where i need to generate a lot of different code. This is something like self modified aplication. So, here are the cases:

  • First is code evaluation from AST. I have something like AST modificator module, which changes AST all the time. I have to call eval(my_ast) every time, when new/modified AST appears. And this is quite offten action (~ once per 0.5 of a second). The ability to generate and change AST in Julia is a great feature. It was a one of few criterias why i chose this language.
  • Second - code evaluation from string. I have a string representation of Julia code. Some special module changes this string all the time. Like a result i have different code to run. I call eval(parse(code_str)) for every of these strings and run them. This is real time process and i need a lot of this. So, after 20min of working, depending on configuration, my app may eat ~6Gb of memory :)

In both cases memory leaks appears.

Thanks for help.

@yuflyud
Copy link

yuflyud commented Dec 29, 2015

I had the same issue. After unsuccessfull tryings to fix it I gave up and restarted the application every time the memory was full. In my case this awful workaround did a job. Any other ideas (or fixes) would be highly appriciated.

@JeffBezanson
Copy link
Sponsor Member

Reopened the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants