runtime: set GOEXPERIMENT=runtimefreegc to disabled by default

This CL is part of a set of CLs that attempt to reduce how much work the
GC must do. See the design in https://go.dev/design/74299-runtime-freegc

The plan has been for GOEXPERIMENT=runtimefreegc to be disabled
by default for Go 1.26, so here we disable it.

Also, we update the name of the GOEXPERIMENT to reflect the latest name.

Updates #74299

Change-Id: I94a34784700152e13ca93ef6711ee9b7f1769d9a
Reviewed-on: https://go-review.googlesource.com/c/go/+/720120
Reviewed-by: Junyang Shao <shaojunyang@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:
thepudds 2025-11-12 20:50:39 -05:00 committed by t hepudds
parent 1a03d0db3f
commit 5a347b775e
6 changed files with 18 additions and 19 deletions

View file

@ -83,7 +83,6 @@ func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
RegabiArgs: regabiSupported,
Dwarf5: dwarf5Supported,
RandomizedHeapBase64: true,
RuntimeFree: true,
SizeSpecializedMalloc: true,
GreenTeaGC: true,
}

View file

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

View file

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

View file

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

View file

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

View file

@ -113,8 +113,8 @@ type Flags struct {
// platforms.
RandomizedHeapBase64 bool
// RuntimeFree enables the runtime to free and reuse memory more eagerly in some circumstances with compiler help.
RuntimeFree bool
// RuntimeFreegc enables the runtime to free and reuse memory more eagerly in some circumstances with compiler help.
RuntimeFreegc bool
// SizeSpecializedMalloc enables malloc implementations that are specialized per size class.
SizeSpecializedMalloc bool