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

Add note about references in Out #49729

Merged
merged 1 commit into from
May 11, 2023
Merged

Conversation

MasonProtter
Copy link
Contributor

@MasonProtter MasonProtter commented May 10, 2023

This is a common footgun with the whole Out thing, so it's good to warn people about it. E.g.

julia> using REPL

julia> REPL.numbered_prompt!()

In [3]: rand(1000, 1000);

In [4]: Base.summarysize(Out)
8000496

In [5]: rand(1000, 1000);

In [6]: Base.summarysize(Out)
16000544

In [7]: rand(1000, 1000);

In [8]: Base.summarysize(Out)
24000592

In [9]: rand(1000, 1000);

In [10]: Base.summarysize(Out)
32000640

In [11]: rand(1000, 1000);

In [12]: Base.summarysize(Out)
40000688

This is an easy way to run out of memory.

Prior art in https://julialang.github.io/IJulia.jl/dev/manual/usage/#Input-and-output-history

@KristofferC KristofferC merged commit e4633e0 into JuliaLang:master May 11, 2023
3 checks passed
@KristofferC KristofferC added the backport 1.9 Change should be backported to release-1.9 label May 11, 2023
KristofferC pushed a commit that referenced this pull request May 15, 2023
(cherry picked from commit e4633e0)
@KristofferC KristofferC mentioned this pull request May 19, 2023
51 tasks
KristofferC pushed a commit that referenced this pull request May 27, 2023
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label May 28, 2023
kpamnany pushed a commit that referenced this pull request Jun 21, 2023
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

Successfully merging this pull request may close these issues.

None yet

3 participants