runtime: pass correct size to malloc
In both cases we lie to malloc about the actual size that we need. In panic we ask for less memory than we are going to use. In slice we ask for more memory than we are going to use (potentially asking for a fractional number of elements). This breaks the new GC. LGTM=khr R=golang-codereviews, dave, khr CC=golang-codereviews, rsc https://golang.org/cl/116940043
Showing
Please register or sign in to comment