-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.
Milestone
Description
Once we allocate a G, it is allocated forever. We have no mechanism to free them.
We should free dead Gs if they sit in the global free queue for long enough. Or maybe free all of them at each GC?
I noticed this while debugging #8832. The stacks for dead Gs are freed at GC time. This leads to a fragmented heap because spans for G storage and stack storage alternate in the heap. When only the stacks are freed, the resulting free spans won't coalesce because the spans for storing the Gs aren't freed.
prashantv, xjdrew, prologic, gemyago, crazypaul123 and 2 more
Metadata
Metadata
Assignees
Labels
compiler/runtimeIssues related to the Go compiler and/or runtime.Issues related to the Go compiler and/or runtime.