mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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>
This commit is contained in:
parent
719dfcf8a8
commit
4fca79833f
1 changed files with 0 additions and 3 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue