mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: simplify mallocgc flag argument
mallocgc can calculate noscan itself. The only remaining flag argument is needzero, so we just make that a boolean arg. Fixes #15379 Change-Id: I839a70790b2a0c9dbcee2600052bfbd6c8148e20 Reviewed-on: https://go-review.googlesource.com/22290 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
731531980a
commit
001e8e8070
8 changed files with 23 additions and 54 deletions
|
|
@ -205,7 +205,7 @@ func newdefer(siz int32) *_defer {
|
|||
if d == nil {
|
||||
// Allocate new defer+args.
|
||||
total := roundupsize(totaldefersize(uintptr(siz)))
|
||||
d = (*_defer)(mallocgc(total, deferType, 0))
|
||||
d = (*_defer)(mallocgc(total, deferType, true))
|
||||
}
|
||||
d.siz = siz
|
||||
gp := mp.curg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue