diff options
Diffstat (limited to 'src/runtime/mgc.go')
| -rw-r--r-- | src/runtime/mgc.go | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/src/runtime/mgc.go b/src/runtime/mgc.go index f7fd4e51d5..82b12b6c09 100644 --- a/src/runtime/mgc.go +++ b/src/runtime/mgc.go @@ -133,18 +133,7 @@ const ( _RootFlushCaches = 4 _RootCount = 5 - // firstStackBarrierOffset is the approximate byte offset at - // which to place the first stack barrier from the current SP. - // This is a lower bound on how much stack will have to be - // re-scanned during mark termination. Subsequent barriers are - // placed at firstStackBarrierOffset * 2^n offsets. - // - // For debugging, this can be set to 0, which will install a - // stack barrier at every frame. If you do this, you may also - // have to raise _StackMin, since the stack barrier - // bookkeeping will use a large amount of each stack. - firstStackBarrierOffset = 1024 - debugStackBarrier = false + debugStackBarrier = false // sweepMinHeapDistance is a lower bound on the heap distance // (in bytes) reserved for concurrent sweeping between GC @@ -152,6 +141,18 @@ const ( sweepMinHeapDistance = 1024 * 1024 ) +// firstStackBarrierOffset is the approximate byte offset at +// which to place the first stack barrier from the current SP. +// This is a lower bound on how much stack will have to be +// re-scanned during mark termination. Subsequent barriers are +// placed at firstStackBarrierOffset * 2^n offsets. +// +// For debugging, this can be set to 0, which will install a +// stack barrier at every frame. If you do this, you may also +// have to raise _StackMin, since the stack barrier +// bookkeeping will use a large amount of each stack. +var firstStackBarrierOffset = 1024 + // heapminimum is the minimum heap size at which to trigger GC. // For small heaps, this overrides the usual GOGC*live set rule. // |
