aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc1.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/malloc1.go
parentddef2d27fec52c271ee72911e60b07f5f62cf3cb (diff)
downloadgo-b2a950bb7343a46ff3edd8502fe2f02fc051a308.tar.xz
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/malloc1.go')
-rw-r--r--src/runtime/malloc1.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/malloc1.go b/src/runtime/malloc1.go
index 3866f77873..50e272c1c1 100644
--- a/src/runtime/malloc1.go
+++ b/src/runtime/malloc1.go
@@ -89,7 +89,7 @@ func mallocinit() {
initSizes()
if class_to_size[_TinySizeClass] != _TinySize {
- gothrow("bad TinySizeClass")
+ throw("bad TinySizeClass")
}
var p, bitmapSize, spansSize, pSize, limit uintptr
@@ -196,7 +196,7 @@ func mallocinit() {
}
}
if p == 0 {
- gothrow("runtime: cannot reserve arena virtual address space")
+ throw("runtime: cannot reserve arena virtual address space")
}
}
@@ -214,7 +214,7 @@ func mallocinit() {
if mheap_.arena_start&(_PageSize-1) != 0 {
println("bad pagesize", hex(p), hex(p1), hex(spansSize), hex(bitmapSize), hex(_PageSize), "start", hex(mheap_.arena_start))
- gothrow("misrounded allocation in mallocinit")
+ throw("misrounded allocation in mallocinit")
}
// Initialize the rest of the allocator.
@@ -262,7 +262,7 @@ func mHeap_SysAlloc(h *mheap, n uintptr) unsafe.Pointer {
}
if uintptr(p)&(_PageSize-1) != 0 {
- gothrow("misrounded allocation in MHeap_SysAlloc")
+ throw("misrounded allocation in MHeap_SysAlloc")
}
return (unsafe.Pointer)(p)
}
@@ -302,7 +302,7 @@ func mHeap_SysAlloc(h *mheap, n uintptr) unsafe.Pointer {
}
if uintptr(p)&(_PageSize-1) != 0 {
- gothrow("misrounded allocation in MHeap_SysAlloc")
+ throw("misrounded allocation in MHeap_SysAlloc")
}
return (unsafe.Pointer)(p)
}
@@ -313,7 +313,7 @@ func largeAlloc(size uintptr, flag uint32) *mspan {
// print("largeAlloc size=", size, "\n")
if size+_PageSize < size {
- gothrow("out of memory")
+ throw("out of memory")
}
npages := size >> _PageShift
if size&_PageMask != 0 {
@@ -321,7 +321,7 @@ func largeAlloc(size uintptr, flag uint32) *mspan {
}
s := mHeap_Alloc(&mheap_, npages, 0, true, flag&_FlagNoZero == 0)
if s == nil {
- gothrow("out of memory")
+ throw("out of memory")
}
s.limit = uintptr(s.start)<<_PageShift + size
v := unsafe.Pointer(uintptr(s.start) << _PageShift)