mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: merge mallocgc, gomallocgc
I assumed they were the same when I wrote cgocallback.go earlier today. Merge them to eliminate confusion. I can't tell what gomallocgc did before with a nil type but without FlagNoScan. I created a call like that in cgocallback.go this morning, translating from a C file. It was supposed to do what the C version did, namely treat the block conservatively. Now it will. LGTM=khr R=khr CC=golang-codereviews https://golang.org/cl/141810043
This commit is contained in:
parent
0f99a91bb5
commit
bffb0590c1
13 changed files with 33 additions and 44 deletions
|
|
@ -147,7 +147,7 @@ func newdefer(siz int32) *_defer {
|
|||
if d == nil {
|
||||
// deferpool is empty or just a big defer
|
||||
total := goroundupsize(totaldefersize(uintptr(siz)))
|
||||
d = (*_defer)(gomallocgc(total, conservative, 0))
|
||||
d = (*_defer)(mallocgc(total, conservative, 0))
|
||||
}
|
||||
d.siz = siz
|
||||
d.special = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue