mirror of
https://github.com/golang/go.git
synced 2026-04-03 17:59:55 +09:00
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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user