The story’s score and claims

Comments on No. 13 of 141 · peng.fyi · edition of Friday 4 December 2026

Why untouched Go slices can end up in physical memory more often with GOMEMLIMIT

Summary

A post on peng.fyi traces why a Go program that allocates 400 MiB slices and never touches them still becomes resident. If a large allocation starts even slightly below an arena's zeroedBase mark, the runtime clears the whole span, and those writes fault in every page. In the author's demo, setting GOMEMLIMIT raised peak RSS from about 0.9 to 2.1 GiB, because constant GC opens more reused holes. Allocating with syscall.Mmap avoided it, but GOMEMLIMIT then ignores that memory. The figures come from one author's runs, unverified.

Comments

Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules