We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version 1.13
yes
go env
2.3 GHz Dual-Core Intel Core i5
$ go env
I wrote 2 similar programs that do the same thing then built them with ' go build -gcflags "-m -m -l -N" '
A. func main () { x := 10 arr := make([]int, x) arr[0] = 0 }
B. func main () { arr := make([]int, 10) arr[0] = 0 }
that both programs either do, or do not produce heap allocations
program A escapes to heap in line 3, while program B doesn't
The text was updated successfully, but these errors were encountered:
Probably a dup of #29095
Sorry, something went wrong.
As mentioned above this issue is captured in #29095. Please feel free to comment if you feel this was closed in error.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?2.3 GHz Dual-Core Intel Core i5
Mac OSX
go env
OutputWhat did you do?
I wrote 2 similar programs that do the same thing
then built them with ' go build -gcflags "-m -m -l -N" '
A.
func main () {
x := 10
arr := make([]int, x)
arr[0] = 0
}
B.
func main () {
arr := make([]int, 10)
arr[0] = 0
}
What did you expect to see?
that both programs either do, or do not produce heap allocations
What did you see instead?
program A escapes to heap in line 3, while program B doesn't
The text was updated successfully, but these errors were encountered: