LEFT | RIGHT |
1 // Copyright 2013 The Go Authors. All rights reserved. | 1 // Copyright 2010 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 #include "runtime.h" | 5 #include "runtime.h" |
6 #include "arch_GOARCH.h" | 6 #include "arch_GOARCH.h" |
7 #include "defs_GOOS_GOARCH.h" | 7 #include "defs_GOOS_GOARCH.h" |
8 #include "os_GOOS.h" | 8 #include "os_GOOS.h" |
9 #include "malloc.h" | 9 #include "malloc.h" |
10 | 10 |
11 enum | 11 enum |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 81 } |
82 return; | 82 return; |
83 } | 83 } |
84 | 84 |
85 p = runtime·mmap(v, n, PROT_READ|PROT_WRITE, MAP_ANON|MAP_FIXED|MAP_PRIV
ATE, -1, 0); | 85 p = runtime·mmap(v, n, PROT_READ|PROT_WRITE, MAP_ANON|MAP_FIXED|MAP_PRIV
ATE, -1, 0); |
86 if(p == (void*)ENOMEM) | 86 if(p == (void*)ENOMEM) |
87 runtime·throw("runtime: out of memory"); | 87 runtime·throw("runtime: out of memory"); |
88 if(p != v) | 88 if(p != v) |
89 runtime·throw("runtime: cannot map pages in arena address space"
); | 89 runtime·throw("runtime: cannot map pages in arena address space"
); |
90 } | 90 } |
LEFT | RIGHT |