aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mem_windows.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2014-12-27 20:58:00 -0800
committerKeith Randall <khr@golang.org>2014-12-28 06:16:16 +0000
commitb2a950bb7343a46ff3edd8502fe2f02fc051a308 (patch)
tree97511001e7aa590d22b1b0d8c962467319180681 /src/runtime/mem_windows.go
parentddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff)
downloadgo-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.gz
go-b2a950bb7343a46ff3edd8502fe2f02fc051a308.zip
runtime: rename gothrow to throw
Rename "gothrow" to "throw" now that the C version of "throw" is no longer needed. This change is purely mechanical except in panic.go where the old version of "throw" has been deleted. sed -i "" 's/[[:<:]]gothrow[[:>:]]/throw/g' runtime/*.go Change-Id: Icf0752299c35958b92870a97111c67bcd9159dc3 Reviewed-on: https://go-review.googlesource.com/2150 Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
Diffstat (limited to 'src/runtime/mem_windows.go')
-rw-r--r--src/runtime/mem_windows.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/runtime/mem_windows.go b/src/runtime/mem_windows.go
index a1dcad0136..d72d49b975 100644
--- a/src/runtime/mem_windows.go
+++ b/src/runtime/mem_windows.go
@@ -56,7 +56,7 @@ func sysUnused(v unsafe.Pointer, n uintptr) {
small &^= 4096 - 1
}
if small < 4096 {
- gothrow("runtime: failed to decommit pages")
+ throw("runtime: failed to decommit pages")
}
v = add(v, small)
n -= small
@@ -66,7 +66,7 @@ func sysUnused(v unsafe.Pointer, n uintptr) {
func sysUsed(v unsafe.Pointer, n uintptr) {
r := stdcall4(_VirtualAlloc, uintptr(v), n, _MEM_COMMIT, _PAGE_READWRITE)
if r != uintptr(v) {
- gothrow("runtime: failed to commit pages")
+ throw("runtime: failed to commit pages")
}
// Commit failed. See SysUnused.
@@ -77,7 +77,7 @@ func sysUsed(v unsafe.Pointer, n uintptr) {
small &^= 4096 - 1
}
if small < 4096 {
- gothrow("runtime: failed to decommit pages")
+ throw("runtime: failed to decommit pages")
}
v = add(v, small)
n -= small
@@ -88,7 +88,7 @@ func sysFree(v unsafe.Pointer, n uintptr, stat *uint64) {
xadd64(stat, -int64(n))
r := stdcall3(_VirtualFree, uintptr(v), 0, _MEM_RELEASE)
if r == 0 {
- gothrow("runtime: failed to release pages")
+ throw("runtime: failed to release pages")
}
}
@@ -114,6 +114,6 @@ func sysMap(v unsafe.Pointer, n uintptr, reserved bool, stat *uint64) {
xadd64(stat, int64(n))
p := stdcall4(_VirtualAlloc, uintptr(v), n, _MEM_COMMIT, _PAGE_READWRITE)
if p != uintptr(v) {
- gothrow("runtime: cannot map pages in arena address space")
+ throw("runtime: cannot map pages in arena address space")
}
}