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

bugfix: don't set pool_live_bytes to zero at the end of GC #52051

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

d-netto
Copy link
Member

@d-netto d-netto commented Nov 6, 2023

Sanity-checked this on a micro-benchmark (as I should have done two PRs ago) and seems to work now:

using Printf

mutable struct ListNode
  key::Int64
  next::ListNode
  ListNode() = new()
  ListNode(x)= new(x)
  ListNode(x,y) = new(x,y);
end

function list(n=128)
    start::ListNode = ListNode(1)
    current::ListNode = start
    for i = 2:(n*1024^2)
        current = ListNode(i,current)
    end
    @printf "%d\n" @ccall jl_gc_pool_live_bytes()::Int64
    return current.key
end

@time list()
4329322656
  3.560094 seconds (134.31 M allocations: 4.005 GiB, 81.34% gc time, 0.88% compilation time)

@d-netto d-netto added GC Garbage collector embarrassing-bugfix Whoops! labels Nov 6, 2023
@d-netto d-netto requested a review from gbaraldi November 6, 2023 17:34
@vtjnash vtjnash added the merge me PR is reviewed. Merge when all tests are passing label Nov 6, 2023
@vchuravy vchuravy merged commit 32df25b into master Nov 6, 2023
8 of 10 checks passed
@vchuravy vchuravy deleted the dcn-pool-live-bytes branch November 6, 2023 21:56
@oscardssmith oscardssmith removed the merge me PR is reviewed. Merge when all tests are passing label Nov 6, 2023
kpamnany pushed a commit to RelationalAI/julia that referenced this pull request Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embarrassing-bugfix Whoops! GC Garbage collector
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants