cockroach: Index | Files

package growstack

import ""


Package Files


func Grow Uses

func Grow()

Grow grows the goroutine stack by 16 KB. Goroutine stacks currently start at 2 KB in size. The code paths through the storage package often need a stack that is 32 KB in size. The stack growth is mildly expensive making it useful to trick the runtime into growing the stack early. Since goroutine stacks grow in multiples of 2 and start at 2 KB in size, by placing a 16 KB object on the stack early in the lifetime of a goroutine we force the runtime to use a 32 KB stack for the goroutine.

Package growstack is imported by 8 packages. Updated 2019-08-08. Refresh now. Tools for package owners.