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

Garbage collection issues using IJulia? #785

Closed
jnoynaert opened this issue Nov 29, 2018 · 3 comments
Closed

Garbage collection issues using IJulia? #785

jnoynaert opened this issue Nov 29, 2018 · 3 comments

Comments

@jnoynaert
Copy link

The Julia kernel appears to refuse to garbage collect allocations on Windows?

Repeatedly calling:

x = fill(NaN, (5000000,8))

increases the size of the Julia process in memory by 305 mb chunks (with no limit, until reaching out of memory).
-Reassigning x = 0 does not reduce the process size in memory as reported by task manager.
-Calling GC.gc() does not release the additional memory.

When using the standard Julia REPL, memory growth halts at +710 mb, with the additional allocation released (to +305mb, expected size of the array in memory) after a manual garbage collection call.

This behavior holds true for any large array operations so far.

IJulia 1.14.1 (using default miniconda setup, conda v1.1.1)
Julia 1.0.2
Windows 7 SP1

@stevengj
Copy link
Member

stevengj commented Nov 29, 2018

The Out array records all of the outputs of the previous cells, similar to IPython. So if x is the output of your cells, it gets saved. You can do empty!(Out) to force IJulia to forget the old outputs.

@stevengj
Copy link
Member

See e.g. here and here for similar discussions about IPython.

@jnoynaert
Copy link
Author

Makes sense. Knowing that saves the usability of jupyter/hydrogen for me for a lot of work--thanks!

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

2 participants