mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
internal/runtime/gc/scan: correct size class size check
This check intends to skip size classes that are too big for scanSpan, but it compares the size class index with a byte size. It must do the conversion first. For #73581. Change-Id: I6a6a636c8d19fa3bf2a2b609870d67d33f47f66e Reviewed-on: https://go-review.googlesource.com/c/go/+/715460 Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
9a77aa4f08
commit
ff2ebf69c4
1 changed files with 2 additions and 1 deletions
|
|
@ -114,7 +114,8 @@ func benchmarkScanSpanPackedAllSizeClasses(b *testing.B, nPages int) {
|
|||
if sc == 0 {
|
||||
continue
|
||||
}
|
||||
if sc >= gc.MinSizeForMallocHeader {
|
||||
size := gc.SizeClassToSize[sc]
|
||||
if size >= gc.MinSizeForMallocHeader {
|
||||
break
|
||||
}
|
||||
b.Run(fmt.Sprintf("sizeclass=%d", sc), func(b *testing.B) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue