Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Commit 602aa5d

Browse files
committed
Revert to simpler GC.gc API.
On the latest Julia this API is equivalent to the explicit use. Ref JuliaLang/julia#34303
1 parent 43afa0b commit 602aa5d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/memory/binned.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ function pool_alloc(bytes, pid=-1)
201201
end
202202

203203
@pool_timeit "2. gc (incremental)" begin
204-
GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
204+
GC.gc(false)
205205
end
206206

207207
if pid != -1 && !isempty(pools_avail[pid])
@@ -222,7 +222,7 @@ function pool_alloc(bytes, pid=-1)
222222
end
223223

224224
@pool_timeit "5. gc (full)" begin
225-
GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
225+
GC.gc(true)
226226
end
227227

228228
if pid != -1 && !isempty(pools_avail[pid])

src/memory/dummy.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ function alloc(sz)
1414
ptr = nothing
1515
for phase in 1:3
1616
if phase == 2
17-
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
17+
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
1818
elseif phase == 3
19-
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
19+
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
2020
end
2121

2222
@pool_timeit "$phase.1 alloc" begin

src/memory/simple.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ function pool_alloc(sz)
7474
block = nothing
7575
for phase in 1:3
7676
if phase == 2
77-
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
77+
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
7878
elseif phase == 3
79-
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
79+
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
8080
end
8181

8282
@pool_timeit "$phase.1 scan" begin

src/memory/split.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,9 @@ function pool_alloc(sz)
328328
block = nothing
329329
for phase in 1:3
330330
if phase == 2
331-
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
331+
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
332332
elseif phase == 3
333-
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
333+
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
334334
end
335335

336336
if !isempty(freed)

0 commit comments

Comments
 (0)