Cloudflare
Cloudflare logoCloudflare · Feature trail

Go Runtime Stack Management

1 post · Sep 2014

What this trail covers

Cloudflare's Go runtime stack management has evolved from segmented stacks to stack copying. Segmented stacks allowed stacks to grow and shrink on demand but suffered from a 'hot split' problem where shrinking was expensive. Stack copying addresses this by doubling the stack size on growth and making shrinking a free operation. This transition required a rewrite of large parts of the runtime in Go to ensure pointer information was available for garbage collection, enabling stack copying across the board. Special stacks are used for core runtime components like the scheduler and garbage collector.

All Cloudflare trails