Bug 20567 – GC should not start threads for parallel marking in simple programs

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-02-08T08:28:07Z
Last change time
2020-02-09T19:21:02Z
Keywords
pull
Assigned to
No Owner
Creator
Rainer Schuetze

Comments

Comment #0 by r.sagitario — 2020-02-08T08:28:07Z
A simple program like void main() { char[] buf = new char[2048]; } runs 3 collections and starts multiple threads for parallel marking. This should be avoided by default.
Comment #1 by dlang-bot — 2020-02-08T08:35:03Z
@rainers created dlang/druntime pull request #2933 "fix Issue 20567 - GC should not start threads for parallel marking in simple programs" fixing this issue: - fix Issue 20567 - GC should not start threads for parallel marking in simple programs avoid collection when there is no small/large pool to reuse anyway. Don't start parallel threads during shutdown https://github.com/dlang/druntime/pull/2933
Comment #2 by dlang-bot — 2020-02-09T19:21:02Z
dlang/druntime pull request #2933 "fix Issue 20567 - GC should not start threads for parallel marking in simple programs" was merged into master: - 3d44d2affda45e638ed52b0c9658435b3418d7f8 by Rainer Schuetze: fix Issue 20567 - GC should not start threads for parallel marking in simple programs avoid collection when there is no small/large pool to reuse anyway. Don't start parallel threads during shutdown https://github.com/dlang/druntime/pull/2933