]> Cypherpunks repositories - gostls13.git/commit
runtime: fix tiny memory leak
authorRuss Cox <rsc@golang.org>
Sun, 19 Feb 2012 05:26:33 +0000 (00:26 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 19 Feb 2012 05:26:33 +0000 (00:26 -0500)
commit89b075cc90f260edaa4973bd25258ee653a37a2f
treeb674eb55888a5169483f64507f7b47451ff154cc
parentefacb2a1b48df1a389289c045754ddb30f1a4038
runtime: fix tiny memory leak

The m->cret word holds the C return value when returning
across a stack split boundary.  It was not being cleared after
use, which means that the return value (if a C function)
or else the value of AX/R0 at the time of the last stack unsplit
was being kept alive longer than necessary.  Clear it.

I think the effect here should be very small, but worth fixing
anyway.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5677092
src/pkg/runtime/proc.c