summaryrefslogtreecommitdiff
path: root/src/runtime/chan.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-11-11 17:05:02 -0500
committerRuss Cox <rsc@golang.org>2014-11-11 17:05:02 -0500
commit6344d561aa5585607815558be8471fe7a02ad410 (patch)
treeb8766c223fd1b6bf971040246f04299ec9cbf625 /src/runtime/chan.go
parentbb9ee976541b2f008a1d1ded4bab7d823b313a53 (diff)
downloadgo-6344d561aa5585607815558be8471fe7a02ad410.tar.gz
[dev.cc] runtime: convert memory allocator and garbage collector to Go
The conversion was done with an automated tool and then modified only as necessary to make it compile and run. [This CL is part of the removal of C code from package runtime. See golang.org/s/dev.cc for an overview.] LGTM=r R=r CC=austin, dvyukov, golang-codereviews, iant, khr https://codereview.appspot.com/167540043
Diffstat (limited to 'src/runtime/chan.go')
-rw-r--r--src/runtime/chan.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/chan.go b/src/runtime/chan.go
index 004970182..bb0110f94 100644
--- a/src/runtime/chan.go
+++ b/src/runtime/chan.go
@@ -26,7 +26,7 @@ func makechan(t *chantype, size int64) *hchan {
if hchanSize%maxAlign != 0 || elem.align > maxAlign {
gothrow("makechan: bad alignment")
}
- if size < 0 || int64(uintptr(size)) != size || (elem.size > 0 && uintptr(size) > (maxmem-hchanSize)/uintptr(elem.size)) {
+ if size < 0 || int64(uintptr(size)) != size || (elem.size > 0 && uintptr(size) > (_MaxMem-hchanSize)/uintptr(elem.size)) {
panic("makechan: size out of range")
}