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

Issue 12650045: code review 12650045: cmd/gc: move large stack variables to heap (Closed)

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

Description

cmd/gc: move large stack variables to heap Individual variables bigger than 10 MB are now moved to the heap, as if they had escaped on their own. This avoids ridiculous stacks for programs that do things like x := [1<<30]byte{} ... use x ... If 10 MB is too small, we can raise the limit. Fixes issue 6077.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+246 lines, -8 lines) Patch
M src/cmd/gc/go.h View 1 2 2 chunks +3 lines, -0 lines 0 comments Download
M src/cmd/gc/lex.c View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/cmd/gc/pgen.c View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M test/escape5.go View 1 2 1 chunk +7 lines, -0 lines 0 comments Download
M test/fixedbugs/bug385_64.go View 1 2 1 chunk +209 lines, -8 lines 0 comments Download

Messages

Total messages: 4
rsc
Hello ken2 (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
4 years, 3 months ago (2013-08-08 17:46:28 UTC) #1
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=29b6246f5a9c *** cmd/gc: move large stack variables to heap Individual variables bigger ...
4 years, 3 months ago (2013-08-08 17:46:33 UTC) #2
bradfitz
This also fixes part of Issue 6036 On Thu, Aug 8, 2013 at 10:46 AM, ...
4 years, 3 months ago (2013-08-08 17:58:17 UTC) #3
ken3
4 years, 3 months ago (2013-08-08 18:13:49 UTC) #4
Message was sent while issue was closed.
On 2013/08/08 17:58:17, bradfitz wrote:
> This also fixes part of Issue 6036
> 
> 
> 
> On Thu, Aug 8, 2013 at 10:46 AM, <mailto:rsc@golang.org> wrote:
> 
> > Reviewers: ken2,
> >
> > Message:
> > Hello ken2 (cc: mailto:golang-dev@googlegroups.com),
> >
> > I'd like you to review this change to
> > https://code.google.com/p/go/
> >
> >
> > Description:
> > cmd/gc: move large stack variables to heap
> >
> > Individual variables bigger than 10 MB are now
> > moved to the heap, as if they had escaped on
> > their own.
> >
> > This avoids ridiculous stacks for programs that
> > do things like
> >         x := [1<<30]byte{}
> >         ... use x ...
> >
> > If 10 MB is too small, we can raise the limit.
> >
> > Fixes issue 6077.
> >
> > Please review this at
>
https://codereview.appspot.**com/12650045/%3Chttps://codereview.appspot.com/1...>
> >
> > Affected files:
> >   M src/cmd/gc/go.h
> >   M src/cmd/gc/lex.c
> >   M src/cmd/gc/pgen.c
> >   M test/escape5.go
> >   M test/fixedbugs/bug385_64.go
> >
> >
> > --
> >
> > ---You received this message because you are subscribed to the Google
> > Groups "golang-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to
>
mailto:golang-dev+unsubscribe@**googlegroups.com<golang-dev%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit
>
https://groups.google.com/**groups/opt_out%3Chttps://groups.google.com/groups...>
> > .
> >
> >
> >

lgtm

10m seems fine, maybe even a
little large.
Sign in to reply to this message.

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