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

Issue 72490043: code review 72490043: runtime: fix memory leak in runfinq (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 3 months ago by rsc
Modified:
11 years, 3 months ago
Reviewers:
dvyukov, bradfitz
CC:
golang-codereviews, bradfitz, dvyukov, iant, khr
Visibility:
Public.

Description

runtime: fix memory leak in runfinq One reason the sync.Pool finalizer test can fail is that this function's ef1 contains uninitialized data that just happens to point at some of the old pool. I've seen this cause retention of a single pool cache line (32 elements) on arm. Really we need liveness information for C functions, but for now we can be more careful about data in long-lived C functions that block.

Patch Set 1 #

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

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

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

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

Messages

Total messages: 5
rsc
Hello golang-codereviews@googlegroups.com (cc: dvyukov, iant, khr), I'd like you to review this change to https://code.google.com/p/go/
11 years, 3 months ago (2014-03-07 15:53:14 UTC) #1
bradfitz
LGTM Fun. Or write more of the runtime in Go. Why don't you need the ...
11 years, 3 months ago (2014-03-07 15:56:22 UTC) #2
rsc
On Fri, Mar 7, 2014 at 10:56 AM, Brad Fitzpatrick <bradfitz@golang.org>wrote: > Why don't you ...
11 years, 3 months ago (2014-03-07 16:03:43 UTC) #3
dvyukov
LGTM
11 years, 3 months ago (2014-03-07 16:16:36 UTC) #4
rsc
11 years, 3 months ago (2014-03-07 16:27:07 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=3766534aabb9 ***

runtime: fix memory leak in runfinq

One reason the sync.Pool finalizer test can fail is that
this function's ef1 contains uninitialized data that just
happens to point at some of the old pool. I've seen this cause
retention of a single pool cache line (32 elements) on arm.

Really we need liveness information for C functions, but
for now we can be more careful about data in long-lived
C functions that block.

LGTM=bradfitz, dvyukov
R=golang-codereviews, bradfitz, dvyukov
CC=golang-codereviews, iant, khr
https://codereview.appspot.com/72490043
Sign in to reply to this message.

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