Skip to content

Commit 15d693b

Browse files
vtjnashJeffBezanson
authored andcommitted
revert breaking change to GC.gc() (#34336)
Removes the breaking part of b0ed147 from PR #34303
1 parent 08ebedc commit 15d693b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

base/gcutils.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ module GC
5353
GC.gc()
5454
GC.gc(full::Bool)
5555
56-
Perform garbage collection. The argument `full` determines the kind of collection: A full
57-
collection scans all objects, while an incremental collection only scans so-called young
58-
objects and is much quicker. If called without an argument, heuristics are used to determine
59-
which type of collection is needed.
56+
Perform garbage collection. The argument `full` determines the kind of
57+
collection: A full collection (default) sweeps all objects, which makes the
58+
next GC scan much slower, while an incremental collection may only sweep
59+
so-called young objects.
6060
6161
!!! warning
6262
Excessive use will likely lead to poor performance.
6363
"""
64-
gc() = ccall(:jl_gc_collect, Cvoid, (Cint,), 0)
64+
gc() = ccall(:jl_gc_collect, Cvoid, (Cint,), 1)
6565
gc(full::Bool) = ccall(:jl_gc_collect, Cvoid, (Cint,), full ? 1 : 2)
6666

6767
"""

0 commit comments

Comments
 (0)