From ccb798741b9bd9d5eda56648a8b3383e6e55cfcd Mon Sep 17 00:00:00 2001 From: Matthew Dempsky Date: Mon, 28 Mar 2022 09:30:41 -0700 Subject: runtime: change maxSearchAddr into a helper function This avoids a dependency on the compiler statically initializing maxSearchAddr, which is necessary so we can disable the (overly aggressive and spec non-conforming) optimizations in cmd/compile and gccgo. Updates #51913. Change-Id: I424e62c81c722bb179ed8d2d8e188274a1aeb7b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/396194 Reviewed-by: Michael Knyszek Reviewed-by: Austin Clements Run-TryBot: Matthew Dempsky TryBot-Result: Gopher Robot --- src/runtime/mpagecache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/runtime/mpagecache.go') diff --git a/src/runtime/mpagecache.go b/src/runtime/mpagecache.go index 7206e2dbdb..5bad4f789a 100644 --- a/src/runtime/mpagecache.go +++ b/src/runtime/mpagecache.go @@ -143,7 +143,7 @@ func (p *pageAlloc) allocToCache() pageCache { if addr == 0 { // We failed to find adequate free space, so mark the searchAddr as OoM // and return an empty pageCache. - p.searchAddr = maxSearchAddr + p.searchAddr = maxSearchAddr() return pageCache{} } ci := chunkIndex(addr) -- cgit v1.3