Skip to content
Opensource internals
  • Posts

Posts

All posts published on this site.

Everything published here, newest first.

runtime.AddCleanup: How Go Replaced Finalizers With a Queue of Specials

Oct 21, 2026 19 min read Jay Hubbert

runtime.AddCleanup replaces SetFinalizer with span specials, a lock-free block queue and a pool of cleanup goroutines, so cleanups run promptly and in parallel instead of one at a …

GoInternalsGarbage collectionFinalizersRuntime

Read more →

sync.Map: Two Maps, A Miss Counter and Why Read-Mostly Wins

Oct 21, 2026 16 min read Jay Hubbert

sync.Map’s old read/dirty/misses design is gone: the type is now a wrapper around a 16-way hash trie whose reads take no locks at all, and whose doc still tells you to use it only …

GoInternalsSyncConcurrencyPerformance

Read more →

sync.Pool: Per-P Caches, a Victim Generation and Why Items Vanish

Oct 21, 2026 22 min read Jay Hubbert

sync.Pool is a per-P cache of per-P lock-free rings plus a private slot, with a victim generation that lets objects survive one GC cycle before being dropped.

GoInternalsConcurrencyMemory

Read more →

unique.Make and the Weak Pointer Map: Canonicalizing Strings Without Leaking

Oct 21, 2026 16 min read Jay Hubbert

unique.Make hashes a value into a lock-free hash trie whose leaves hold weak pointers and cleanup callbacks, so interned strings die with the last handle that references them.

GoInternalsGarbage collectionStringsPerformance

Read more →

unsafe.Pointer and //go:linkname: The Escape Hatches That Break Abstraction

Oct 21, 2026 20 min read Jay Hubbert

unsafe.Pointer reinterprets memory and //go:linkname reaches into other packages’ unexported symbols; the linker enforces an allowlist of linkname pulls and prunes unreachable …

GoInternalsUnsafeLinkerLinkname

Read more →

← Newer Page 33 of 82 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·