Skip to content
Opensource internals
  • Posts

Go

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 →

Weak Pointers in Go: The Runtime's Special Span for Non-Tracked Objects

Oct 21, 2026 16 min read Jay Hubbert

weak.Pointer is backed by a per-object special record holding a uintptr handle, which the GC scans as a root but never treats as a strong reference, so the target can still be …

GoInternalsGarbage collectionWeak pointersRuntime

Read more →

Why Go Randomizes Map Iteration: The Attack It Prevents

Oct 21, 2026 14 min read Jay Hubbert

Map iteration picks two random offsets at start-up - one in the table directory, one in the slot space - and every map gets a random hash seed, which together defeat hash-flooding …

GoInternalsRuntimeMapsSecurity

Read more →

← Newer Page 12 of 12 Older →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·