SetMaxStack sets the maximum amount of memory that can be used by a single goroutine stack. If any goroutine exceeds this limit while growing its stack, the program crashes. SetMaxStack returns the previous setting. The initial setting is 1 GB on 64-bit systems, 250 MB on 32-bit systems.
SetMaxStack is useful mainly for limiting the damage done by goroutines that enter an infinite recursion. It only limits future stack growth.
SetMaxStack is referenced in 10 repositoriesbitbucket.org/Abex/yumeko
- 1 reference in yumeko.go
- 1 reference in Task/Find-limit-of-recursion/Go/find-limit-of-recursion.go
- 1 reference in scheduler_test.go