diff options
author | Russ Cox <rsc@golang.org> | 2014-09-09 01:08:34 -0400 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-09-09 01:08:34 -0400 |
commit | bffb0590c1e1125830377165eb98bf1b73bb016e (patch) | |
tree | b8a7f8e9ef3b9bfdb53c2c7aea4ca6d95193d46b /src/runtime/cgocallback.go | |
parent | 0f99a91bb56dd01dfd4e5ce4344e6006e3463ade (diff) | |
download | go-bffb0590c1e1125830377165eb98bf1b73bb016e.tar.gz go-bffb0590c1e1125830377165eb98bf1b73bb016e.zip |
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
Diffstat (limited to 'src/runtime/cgocallback.go')
-rw-r--r-- | src/runtime/cgocallback.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/cgocallback.go b/src/runtime/cgocallback.go index 844a095c22..b3edfb672a 100644 --- a/src/runtime/cgocallback.go +++ b/src/runtime/cgocallback.go @@ -21,7 +21,7 @@ import "unsafe" // Either we need to add types or we need to stop using it. func _cgo_allocate_internal(len uintptr) unsafe.Pointer { - ret := gomallocgc(len, nil, 0) + ret := mallocgc(len, conservative, 0) c := new(cgomal) c.alloc = ret gp := getg() |