mirror of
https://github.com/golang/go
synced 2024-11-18 06:04:53 -07:00
runtime: don't reserve space for stack barriers if they're off
Change-Id: I79ebccdaefc434c47b77bd545cc3c50723c18b61 Reviewed-on: https://go-review.googlesource.com/31135 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
5b7497f327
commit
7bc42a145a
@ -148,6 +148,10 @@ var firstStackBarrierOffset = 1024
|
||||
// gcMaxStackBarriers returns the maximum number of stack barriers
|
||||
// that can be installed in a stack of stackSize bytes.
|
||||
func gcMaxStackBarriers(stackSize int) (n int) {
|
||||
if debug.gcstackbarrieroff > 0 {
|
||||
return 0
|
||||
}
|
||||
|
||||
if firstStackBarrierOffset == 0 {
|
||||
// Special debugging case for inserting stack barriers
|
||||
// at every frame. Steal half of the stack for the
|
||||
|
Loading…
Reference in New Issue
Block a user