aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mcentral.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2019-09-18 15:15:59 +0000
committerMichael Knyszek <mknyszek@google.com>2019-11-08 16:44:33 +0000
commit7f574e476ac4a6e8c2719b9674ee7b3786bb8401 (patch)
tree073e28471cf5e47ff30552fd582abc2fd7f1dedf /src/runtime/mcentral.go
parentffb5646fe0134af80273df57ef251d705d004425 (diff)
downloadgo-7f574e476ac4a6e8c2719b9674ee7b3786bb8401.tar.gz
go-7f574e476ac4a6e8c2719b9674ee7b3786bb8401.zip
runtime: remove unnecessary large parameter to mheap_.alloc
mheap_.alloc currently accepts both a spanClass and a "large" parameter indicating whether the allocation is large. These are redundant, since spanClass.sizeclass() == 0 is an equivalent way to determine this and is already used in mheap_.alloc. There are no places in the runtime where the size class could be non-zero and large == true. Updates #35112. Change-Id: Ie66facf8f0faca6f4cd3d20a8ac4bc259e11823d Reviewed-on: https://go-review.googlesource.com/c/go/+/196639 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/mcentral.go')
-rw-r--r--src/runtime/mcentral.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/mcentral.go b/src/runtime/mcentral.go
index 2f97b7d094..78a3ae6ac1 100644
--- a/src/runtime/mcentral.go
+++ b/src/runtime/mcentral.go
@@ -252,7 +252,7 @@ func (c *mcentral) grow() *mspan {
npages := uintptr(class_to_allocnpages[c.spanclass.sizeclass()])
size := uintptr(class_to_size[c.spanclass.sizeclass()])
- s := mheap_.alloc(npages, c.spanclass, false, true)
+ s := mheap_.alloc(npages, c.spanclass, true)
if s == nil {
return nil
}