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

revert breaking change to GC.gc() #34336

Merged
merged 1 commit into from
Jan 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions base/gcutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ module GC
GC.gc()
GC.gc(full::Bool)

Perform garbage collection. The argument `full` determines the kind of collection: A full
collection scans all objects, while an incremental collection only scans so-called young
objects and is much quicker. If called without an argument, heuristics are used to determine
which type of collection is needed.
Perform garbage collection. The argument `full` determines the kind of
collection: A full collection (default) sweeps all objects, which makes the
next GC scan much slower, while an incremental collection may only sweep
so-called young objects.

!!! warning
Excessive use will likely lead to poor performance.
"""
gc() = ccall(:jl_gc_collect, Cvoid, (Cint,), 0)
gc() = ccall(:jl_gc_collect, Cvoid, (Cint,), 1)
gc(full::Bool) = ccall(:jl_gc_collect, Cvoid, (Cint,), full ? 1 : 2)

"""
Expand Down