diff options
| author | tony <jianfeng.tony@gmail.com> | 2025-09-29 14:25:57 +0000 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2025-10-06 14:20:22 -0700 |
| commit | 4fca79833fcdd0dc19bb0feba8715a0def3d07be (patch) | |
| tree | 8285185489c2324da65faa0af934030e2c1fefbb /src/runtime/mpagealloc_64bit.go | |
| parent | 719dfcf8a8478d70360bf3c34c0e920be7b32994 (diff) | |
| download | go-4fca79833fcdd0dc19bb0feba8715a0def3d07be.tar.xz | |
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 <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Diffstat (limited to 'src/runtime/mpagealloc_64bit.go')
| -rw-r--r-- | src/runtime/mpagealloc_64bit.go | 3 |
1 files changed, 0 insertions, 3 deletions
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. |
