type MyNode … // allocMyNode allocates nodes that are stored in an lfstack // outside the Go heap. // We require lfstack objects to live outside the heap so that // checkptr passes on the unsafe shenanigans used. func allocMyNode(data int) *MyNode { … } func fromMyNode(node *MyNode) *LFNode { … } func toMyNode(node *LFNode) *MyNode { … } var global … func TestLFStack(t *testing.T) { … } func TestLFStackStress(t *testing.T) { … }