runtime: stack allocate Panic structure during runtime.panic
Update #7347 When runtime.panic is called the *Panic is malloced from the heap. This can lead to a gc cycle while panicing which can make a bad situation worse. It appears to be possible to stack allocate the Panic and avoid malloc'ing during a panic. Ref: https://groups.google.com/d/topic/golang-dev/OfxqpklGkh0/discussion LGTM=minux.ma, dvyukov, rsc R=r, minux.ma, gobot, rsc, dvyukov CC=golang-codereviews https://golang.org/cl/66830043
Showing
Please register or sign in to comment