1 package main 2 3 import "runtime" 4 5 func allocA(n int32) (r []byte) { 6 r = []byte{:n} 7 return r 8 } 9 10 func allocB(n int32) (r []byte) { 11 r = []byte{:n} 12 return r 13 } 14 15 func main() { 16 x := allocA(16) 17 y := allocB(32) 18 println(int32(len(x)) + int32(len(y))) 19 runtime.PrintAllocCounters() 20 } 21