← All notes

Go runtime: goroutines, GC, and process controls

Answer: The runtime package contains operations that interact with Go's runtime system.

Goroutines and types

Those operations include functions to control goroutines.

The package also includes the low-level type information used by the reflect package.

GOGC and memory limits

The GOGC variable sets the initial garbage collection target percentage.

The default is GOGC=100.

Setting GOGC=off disables the garbage collector entirely.

The GOMEMLIMIT variable sets a soft memory limit for the runtime.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: The Go Authors, runtime; The Go Authors, runtime source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: The Go Authors, runtime; The Go Authors, runtime source. BSD-3-Clause (https://go.dev/LICENSE). Copyright The Go Authors.

Cite this

Permanent ID: iil:note:xctrgkw3

iinventedlight. 2026. "Go runtime: goroutines, GC, and process controls." iinventedlight Library, iil:note:xctrgkw3, version of 2026-11-25. https://iinventedlight.com/library/notes/go-runtime/. License: CC-BY-4.0.

@misc{iil_note_xctrgkw3,
  author = {{iinventedlight}},
  title = {{Go runtime: goroutines, GC, and process controls}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-25},
  url = {https://iinventedlight.com/library/notes/go-runtime/},
  note = {Permanent ID iil:note:xctrgkw3. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-runtime.md.