1
2
3
4
5
6
7
8
9
10
11
| ➜ p8 go build -gcflags '-m -m -l' main.go
# command-line-arguments
./main.go:8:14: make([]int, 100) does not escape
./main.go:15:14: make([]int, 1000000) escapes to heap:
./main.go:15:14: flow: {heap} = &{storage for make([]int, 1000000)}:
./main.go:15:14: from make([]int, 1000000) (too large for stack) at ./main.go:15:14
./main.go:15:14: make([]int, 1000000) escapes to heap
./main.go:23:11: make([]int, number) escapes to heap:
./main.go:23:11: flow: {heap} = &{storage for make([]int, number)}:
./main.go:23:11: from make([]int, number) (non-constant size) at ./main.go:23:11
./main.go:23:11: make([]int, number) escapes to heap
|