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
- id: C1 claim: The package interacts with Go's runtime system, including goroutine controls. source: S1 evidence: "Package runtime contains operations that interact with Go's runtime system"
- id: C2 claim: The default garbage-collection target is GOGC=100. source: S1 evidence: "The default is GOGC=100."
- id: C3 claim: The package interacts with Go's runtime system, including goroutine controls. source: S2 evidence: "Package runtime contains operations that interact with Go's runtime system"
- id: C4 claim: Setting GOGC=off turns the garbage collector off entirely. source: S2 evidence: "Setting GOGC=off disables the garbage collector entirely."
Sources
- [S1] runtime. The Go Authors. https://pkg.go.dev/runtime . License: BSD-3-Clause. Accessed 2026-11-25.
- [S2] runtime source. The Go Authors. https://go.dev/src/runtime/extern.go . License: BSD-3-Clause. Accessed 2026-11-25.
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
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.},
}
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.
- go-runtime.schema.json (schema; CC-BY-4.0)
- go-runtime.table.json (table; CC-BY-4.0)
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.