Skip to content

Commit 4fca798

Browse files
tonyrandall77
authored andcommitted
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 <[email protected]> Reviewed-by: Michael Knyszek <[email protected]> Reviewed-by: Carlos Amedee <[email protected]>
1 parent 719dfcf commit 4fca798

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/runtime/mpagealloc_64bit.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ func (p *pageAlloc) sysGrow(base, limit uintptr) {
180180
sysUsed(unsafe.Pointer(need.base.addr()), need.size(), need.size())
181181
p.summaryMappedReady += need.size()
182182
}
183-
184-
// Update the scavenge index.
185-
p.summaryMappedReady += p.scav.index.sysGrow(base, limit, p.sysStat)
186183
}
187184

188185
// sysGrow increases the index's backing store in response to a heap growth.

0 commit comments

Comments
 (0)