mirror of
https://github.com/golang/go
synced 2024-11-11 21:50:21 -07:00
more readable
This commit is contained in:
parent
cd0fbe4941
commit
57205f91fe
@ -1064,7 +1064,9 @@ func newstack() {
|
||||
// recheck the bounds on return.)
|
||||
if f := findfunc(gp.sched.pc); f.valid() {
|
||||
max := uintptr(funcMaxSPDelta(f))
|
||||
for newsize-(gp.stack.hi-gp.sched.sp) < max+_StackGuard {
|
||||
needed := max + _StackGuard
|
||||
used := gp.stack.hi - gp.sched.sp
|
||||
for newsize-used < needed {
|
||||
newsize *= 2
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user