Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(913)

Issue 5677092: code review 5677092: runtime: fix tiny memory leak (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by rsc
Modified:
13 years, 3 months ago
Reviewers:
CC:
golang-dev, bradfitz
Visibility:
Public.

Description

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.

Patch Set 1 #

Patch Set 2 : diff -r c2a342f5b72d https://code.google.com/p/go/ #

Patch Set 3 : diff -r c2a342f5b72d https://code.google.com/p/go/ #

Patch Set 4 : diff -r e2e49d7a148a https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -1 line) Patch
M src/pkg/runtime/proc.c View 1 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 3
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
13 years, 3 months ago (2012-02-19 05:21:46 UTC) #1
bradfitz
LGTM On Sat, Feb 18, 2012 at 9:21 PM, <rsc@golang.org> wrote: > Reviewers: golang-dev_googlegroups.com, > ...
13 years, 3 months ago (2012-02-19 05:23:58 UTC) #2
rsc
13 years, 3 months ago (2012-02-19 05:26:37 UTC) #3
*** Submitted as b65103673706 ***

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
http://codereview.appspot.com/5677092
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b