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 | 58580c80576c0281a1af5dbc1592d19810ee7d4b (patch) | |
tree | 7f4e97a8bdc88e990ca283269fab5c6ddb689bcd /src/runtime/chan.go | |
parent | 882621154ee94c92fe22ab7377df1b77cedd822a (diff) | |
download | go-58580c80576c0281a1af5dbc1592d19810ee7d4b.tar.gz |
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://codereview.appspot.com/141810043
Diffstat (limited to 'src/runtime/chan.go')
-rw-r--r-- | src/runtime/chan.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/chan.go b/src/runtime/chan.go index 91ade4d37..226b82406 100644 --- a/src/runtime/chan.go +++ b/src/runtime/chan.go @@ -37,7 +37,7 @@ func makechan(t *chantype, size int64) *hchan { // buf points into the same allocation, elemtype is persistent. // SudoG's are referenced from their owning thread so they can't be collected. // TODO(dvyukov,rlh): Rethink when collector can move allocated objects. - c = (*hchan)(gomallocgc(hchanSize+uintptr(size)*uintptr(elem.size), nil, flagNoScan)) + c = (*hchan)(mallocgc(hchanSize+uintptr(size)*uintptr(elem.size), nil, flagNoScan)) if size > 0 && elem.size != 0 { c.buf = (*uint8)(add(unsafe.Pointer(c), hchanSize)) } else { |