mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: remove g.stackAlloc
Since we're no longer stealing space for the stack barrier array from the stack allocation, the stack allocation is simply g.stack.hi-g.stack.lo. Updates #17503. Change-Id: Id9b450ae12c3df9ec59cfc4365481a0a16b7c601 Reviewed-on: https://go-review.googlesource.com/36621 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
This commit is contained in:
parent
d089a6c718
commit
0993b2fd06
4 changed files with 13 additions and 21 deletions
|
|
@ -712,7 +712,6 @@ type gsignalStack struct {
|
|||
stack stack
|
||||
stackguard0 uintptr
|
||||
stackguard1 uintptr
|
||||
stackAlloc uintptr
|
||||
stktopsp uintptr
|
||||
}
|
||||
|
||||
|
|
@ -729,7 +728,6 @@ func setGsignalStack(st *stackt, old *gsignalStack) {
|
|||
old.stack = g.m.gsignal.stack
|
||||
old.stackguard0 = g.m.gsignal.stackguard0
|
||||
old.stackguard1 = g.m.gsignal.stackguard1
|
||||
old.stackAlloc = g.m.gsignal.stackAlloc
|
||||
old.stktopsp = g.m.gsignal.stktopsp
|
||||
}
|
||||
stsp := uintptr(unsafe.Pointer(st.ss_sp))
|
||||
|
|
@ -737,7 +735,6 @@ func setGsignalStack(st *stackt, old *gsignalStack) {
|
|||
g.m.gsignal.stack.hi = stsp + st.ss_size
|
||||
g.m.gsignal.stackguard0 = stsp + _StackGuard
|
||||
g.m.gsignal.stackguard1 = stsp + _StackGuard
|
||||
g.m.gsignal.stackAlloc = st.ss_size
|
||||
}
|
||||
|
||||
// restoreGsignalStack restores the gsignal stack to the value it had
|
||||
|
|
@ -749,7 +746,6 @@ func restoreGsignalStack(st *gsignalStack) {
|
|||
gp.stack = st.stack
|
||||
gp.stackguard0 = st.stackguard0
|
||||
gp.stackguard1 = st.stackguard1
|
||||
gp.stackAlloc = st.stackAlloc
|
||||
gp.stktopsp = st.stktopsp
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue