internal/goexperiment: add a sizespecializedmalloc goexperiment setting

Change-Id: I6a6a696497f2a0b0d403bbb11d7502f62edec78b
Reviewed-on: https://go-review.googlesource.com/c/go/+/696535
Auto-Submit: Michael Matloob <matloob@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Matloob <matloob@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Michael Matloob 2025-03-17 11:45:52 -04:00 committed by Gopher Robot
parent c70713da82
commit 60c1ee9183
3 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,8 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build !goexperiment.sizespecializedmalloc
package goexperiment
const SizeSpecializedMalloc = false
const SizeSpecializedMallocInt = 0

View file

@ -0,0 +1,8 @@
// Code generated by mkconsts.go. DO NOT EDIT.
//go:build goexperiment.sizespecializedmalloc
package goexperiment
const SizeSpecializedMalloc = true
const SizeSpecializedMallocInt = 1

View file

@ -115,4 +115,7 @@ type Flags struct {
// RandomizedHeapBase enables heap base address randomization on 64-bit
// platforms.
RandomizedHeapBase64 bool
// SizeSpecializedMalloc enables malloc implementations that are specialized per size class.
SizeSpecializedMalloc bool
}