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

Issue 91010048: code review 91010048: runtime: do not set m->locks around memory allocation (Closed)

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

Description

runtime: do not set m->locks around memory allocation If slice append is the only place where a program allocates, then it will consume all available memory w/o triggering GC. This was demonstrated in the issue. Fixes issue 7922.

Patch Set 1 #

Patch Set 2 : diff -r b0443478e712 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 3 : diff -r b0443478e712 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 4 : diff -r b0443478e712 https://dvyukov%40google.com@code.google.com/p/go/ #

Patch Set 5 : diff -r a80c7c32d1cc https://dvyukov%40google.com@code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -9 lines) Patch
M src/pkg/runtime/slice.goc View 1 2 1 chunk +5 lines, -9 lines 0 comments Download

Messages

Total messages: 5
dvyukov
Hello golang-codereviews@googlegroups.com (cc: iant@golang.org, khr@golang.org, rsc@golang.org), I'd like you to review this change to https://dvyukov%40google.com@code.google.com/p/go/
11 years, 11 months ago (2014-05-02 11:14:21 UTC) #1
rsc
Why is this safe? Why does the comment no longer apply?
11 years, 11 months ago (2014-05-02 16:15:44 UTC) #2
dvyukov
On 2014/05/02 16:15:44, rsc wrote: > Why is this safe? Why does the comment no ...
11 years, 11 months ago (2014-05-02 16:21:39 UTC) #3
rsc
LGTM
11 years, 11 months ago (2014-05-02 16:33:38 UTC) #4
dvyukov
11 years, 11 months ago (2014-05-02 16:39:31 UTC) #5
*** Submitted as https://code.google.com/p/go/source/detail?r=afef4a014b0e ***

runtime: do not set m->locks around memory allocation
If slice append is the only place where a program allocates,
then it will consume all available memory w/o triggering GC.
This was demonstrated in the issue.
Fixes issue 7922.

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

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