]> Cypherpunks repositories - gostls13.git/commit
runtime: remove unnecessary large parameter to mheap_.alloc
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 18 Sep 2019 15:15:59 +0000 (15:15 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 16:44:33 +0000 (16:44 +0000)
commit7f574e476ac4a6e8c2719b9674ee7b3786bb8401
tree073e28471cf5e47ff30552fd582abc2fd7f1dedf
parentffb5646fe0134af80273df57ef251d705d004425
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>
src/runtime/malloc.go
src/runtime/mcentral.go
src/runtime/mheap.go