From: tony Date: Mon, 29 Sep 2025 14:25:57 +0000 (+0000) Subject: runtime: delete redundant code in the page allocator X-Git-Tag: go1.26rc1~695 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4fca79833f;p=gostls13.git runtime: delete redundant code in the page allocator The page allocator's scavenge index has sysGrow called on it twice, once in pageAlloc.grow, and once in pageAlloc.sysGrow on 64-bit platforms. Calling it twice is OK since sysGrow is idempotent, but it's also wasteful. This change removes the call in pageAlloc.sysGrow. Change-Id: I5b955b6e2beed5c2b8305ab82b76718ea305792c Reviewed-on: https://go-review.googlesource.com/c/go/+/707735 LUCI-TryBot-Result: Go LUCI Reviewed-by: Michael Knyszek Reviewed-by: Carlos Amedee --- diff --git a/src/runtime/mpagealloc_64bit.go b/src/runtime/mpagealloc_64bit.go index eb425f0704..2e3643004b 100644 --- a/src/runtime/mpagealloc_64bit.go +++ b/src/runtime/mpagealloc_64bit.go @@ -180,9 +180,6 @@ func (p *pageAlloc) sysGrow(base, limit uintptr) { sysUsed(unsafe.Pointer(need.base.addr()), need.size(), need.size()) p.summaryMappedReady += need.size() } - - // Update the scavenge index. - p.summaryMappedReady += p.scav.index.sysGrow(base, limit, p.sysStat) } // sysGrow increases the index's backing store in response to a heap growth.