runtime: compute data and bss root work units in one loop

This commit is contained in:
jeffery 2023-11-23 10:18:23 +08:00 committed by wsj.jeffery
parent de5b418bea
commit 711b8b8b93

View File

@ -73,9 +73,7 @@ func gcMarkRootPrepare() {
if nDataRoots > work.nDataRoots {
work.nDataRoots = nDataRoots
}
}
for _, datap := range activeModules() {
nBSSRoots := nBlocks(datap.ebss - datap.bss)
if nBSSRoots > work.nBSSRoots {
work.nBSSRoots = nBSSRoots