aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/proc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/proc.go')
-rw-r--r--src/runtime/proc.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index c960d81408..5fc7d25390 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -2812,7 +2812,6 @@ func malg(stacksize int32) *g {
})
newg.stackguard0 = newg.stack.lo + _StackGuard
newg.stackguard1 = ^uintptr(0)
- newg.stackAlloc = uintptr(stacksize)
}
return newg
}
@@ -2949,11 +2948,11 @@ func gfput(_p_ *p, gp *g) {
throw("gfput: bad status (not Gdead)")
}
- stksize := gp.stackAlloc
+ stksize := gp.stack.hi - gp.stack.lo
if stksize != _FixedStack {
// non-standard stack size - free it.
- stackfree(gp.stack, gp.stackAlloc)
+ stackfree(gp.stack)
gp.stack.lo = 0
gp.stack.hi = 0
gp.stackguard0 = 0
@@ -3016,13 +3015,12 @@ retry:
gp.stack = stackalloc(_FixedStack)
})
gp.stackguard0 = gp.stack.lo + _StackGuard
- gp.stackAlloc = _FixedStack
} else {
if raceenabled {
- racemalloc(unsafe.Pointer(gp.stack.lo), gp.stackAlloc)
+ racemalloc(unsafe.Pointer(gp.stack.lo), gp.stack.hi-gp.stack.lo)
}
if msanenabled {
- msanmalloc(unsafe.Pointer(gp.stack.lo), gp.stackAlloc)
+ msanmalloc(unsafe.Pointer(gp.stack.lo), gp.stack.hi-gp.stack.lo)
}
}
}