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

Revert to simpler GC.gc API. #560

Merged
merged 1 commit into from
Jan 8, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/memory/binned.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function pool_alloc(bytes, pid=-1)
end

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

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

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

if pid != -1 && !isempty(pools_avail[pid])
Expand Down
4 changes: 2 additions & 2 deletions src/memory/dummy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ function alloc(sz)
ptr = nothing
for phase in 1:3
if phase == 2
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
elseif phase == 3
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
end

@pool_timeit "$phase.1 alloc" begin
Expand Down
4 changes: 2 additions & 2 deletions src/memory/simple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ function pool_alloc(sz)
block = nothing
for phase in 1:3
if phase == 2
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
elseif phase == 3
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
end

@pool_timeit "$phase.1 scan" begin
Expand Down
4 changes: 2 additions & 2 deletions src/memory/split.jl
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ function pool_alloc(sz)
block = nothing
for phase in 1:3
if phase == 2
@pool_timeit "$phase.0 gc (incremental)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Incremental : false)
@pool_timeit "$phase.0 gc (incremental)" GC.gc(false)
elseif phase == 3
@pool_timeit "$phase.0 gc (full)" GC.gc(VERSION >= v"1.4.0-DEV.257" ? GC.Full : true)
@pool_timeit "$phase.0 gc (full)" GC.gc(true)
end

if !isempty(freed)
Expand Down