runtime: rename _MSpanStack -> _MSpanManual
We're about to generalize _MSpanStack to be used for other forms of
in-heap manual memory management in the runtime. This is an automated
rename of _MSpanStack to _MSpanManual plus some comment fix-ups.
For #19325.
Change-Id: I1e20a57bb3b87a0d324382f92a3e294ffc767395
Reviewed-on: https://go-review.googlesource.com/38574
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index e81bb5b..b839727 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -220,7 +220,7 @@
// Adds stack x to the free pool. Must be called with stackpoolmu held.
func stackpoolfree(x gclinkptr, order uint8) {
s := mheap_.lookup(unsafe.Pointer(x))
- if s.state != _MSpanStack {
+ if s.state != _MSpanManual {
throw("freeing stack not in a stack span")
}
if s.stackfreelist.ptr() == nil {
@@ -465,7 +465,7 @@
}
} else {
s := mheap_.lookup(v)
- if s.state != _MSpanStack {
+ if s.state != _MSpanManual {
println(hex(s.base()), v)
throw("bad span state")
}