github.com/fjl/memsize@v0.0.2/runtimefunc_go121.go (about) 1 //go:build go1.21 2 // +build go1.21 3 4 package memsize 5 6 import "unsafe" 7 8 var _ = unsafe.Pointer(nil) 9 10 //go:linkname stwReason runtime.stwReason 11 type stwReason uint8 12 13 //go:linkname stwReadMemStats runtime.stwReadMemStats 14 const stwReadMemStats stwReason = 7 15 16 //go:linkname stopTheWorld runtime.stopTheWorld 17 func stopTheWorld(reason stwReason)