aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/stack.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/stack.go')
-rw-r--r--src/runtime/stack.go10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/runtime/stack.go b/src/runtime/stack.go
index 85902a6b68..d5d09ba7d7 100644
--- a/src/runtime/stack.go
+++ b/src/runtime/stack.go
@@ -1077,16 +1077,6 @@ func gostartcallfn(gobuf *gobuf, fv *funcval) {
// gp must be stopped, but the world need not be.
func shrinkstack(gp *g) {
gstatus := readgstatus(gp)
- if gstatus&^_Gscan == _Gdead {
- if gp.stack.lo != 0 {
- // Free whole stack - it will get reallocated
- // if G is used again.
- stackfree(gp.stack)
- gp.stack.lo = 0
- gp.stack.hi = 0
- }
- return
- }
if gp.stack.lo == 0 {
throw("missing stack in shrinkstack")
}