runtime: unified the calculate for max objects per span

the freemark is used for mark the status for one span's slots.
the size can be simplify by directly use the predefined constant
of gc.MaxObjsPerSpan

Change-Id: Ieb174655a829cceeb70b908d83b48c829cc08705
GitHub-Last-Rev: d36aa73175
GitHub-Pull-Request: golang/go#77841
Reviewed-on: https://go-review.googlesource.com/c/go/+/749760
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Tony Tang <jianfeng.tony@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
Tony
2026-02-27 11:28:38 +00:00
committed by Gopher Robot
parent 93b78326c3
commit a48829de1e

View File

@@ -480,7 +480,7 @@ func dumproots() {
// Bit vector of free marks.
// Needs to be as big as the largest number of objects per span.
var freemark [pageSize / 8]bool
var freemark [gc.MaxObjsPerSpan]bool
func dumpobjs() {
// To protect mheap_.allspans.