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

Issue 7307122: code review 7307122: runtime: allocate heap metadata at run time (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 8 months ago by rsc
Modified:
13 years, 8 months ago
Reviewers:
CC:
golang-dev, dave_cheney.net, minux1, remyoudompheng, iant
Visibility:
Public.

Description

runtime: allocate heap metadata at run time Before, the mheap structure was in the bss, but it's quite large (today, 256 MB, much of which is never actually paged in), and it makes Go binaries run afoul of exec-time bss size limits on some BSD systems. Fixes issue 4447.

Patch Set 1 #

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

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

Total comments: 2

Patch Set 4 : diff -r cb68bc803848 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 59da6744d66d https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -102 lines) Patch
M src/pkg/runtime/malloc.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/malloc.goc View 1 12 chunks +28 lines, -26 lines 0 comments Download
M src/pkg/runtime/mcache.c View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/mcentral.c View 1 4 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 28 chunks +50 lines, -50 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 3 chunks +4 lines, -4 lines 0 comments Download
M src/pkg/runtime/race.c View 1 2 3 5 chunks +5 lines, -10 lines 0 comments Download
M src/pkg/runtime/traceback_arm.c View 1 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/runtime/traceback_x86.c View 1 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10
rsc
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
13 years, 8 months ago (2013-02-15 04:46:38 UTC) #1
dave_cheney.net
Thanks rsc, I'll run some tests on 32 bit systems tonight.
13 years, 8 months ago (2013-02-15 06:35:57 UTC) #2
minux1
https://codereview.appspot.com/7307122/diff/5001/src/pkg/runtime/race.c File src/pkg/runtime/race.c (right): https://codereview.appspot.com/7307122/diff/5001/src/pkg/runtime/race.c#newcode43 src/pkg/runtime/race.c:43: sz = (byte*)runtime·mheap - noptrdata; this seems to make ...
13 years, 8 months ago (2013-02-15 06:37:37 UTC) #3
remyoudompheng
On 15 Feb 2013 05:46, <rsc@golang.org> wrote: > > Reviewers: golang-dev_googlegroups.com, > > Message: > ...
13 years, 8 months ago (2013-02-15 06:57:50 UTC) #4
dave_cheney.net
Here is a data point from a 32bit atom system 220887(~/go/test/bench/go1) % go version go ...
13 years, 8 months ago (2013-02-15 11:44:05 UTC) #5
dave_cheney.net
Results are less consistent for linux/arm, nexus7. nexus7(~/go/test/bench/go1) % go version go version devel +41ab0ca75ea3 ...
13 years, 8 months ago (2013-02-15 12:23:40 UTC) #6
iant
https://codereview.appspot.com/7307122/diff/5001/src/pkg/runtime/race.c File src/pkg/runtime/race.c (right): https://codereview.appspot.com/7307122/diff/5001/src/pkg/runtime/race.c#newcode43 src/pkg/runtime/race.c:43: sz = (byte*)runtime·mheap - noptrdata; On 2013/02/15 06:37:37, minux ...
13 years, 8 months ago (2013-02-15 15:12:26 UTC) #7
rsc
Hello golang-dev@googlegroups.com, dave@cheney.net, minux.ma@gmail.com, remyoudompheng@gmail.com, iant@golang.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 8 months ago (2013-02-15 18:13:02 UTC) #8
iant
LGTM
13 years, 8 months ago (2013-02-15 18:58:26 UTC) #9
rsc
13 years, 8 months ago (2013-02-15 19:27:09 UTC) #10
*** Submitted as https://code.google.com/p/go/source/detail?r=e7b206201e2a ***

runtime: allocate heap metadata at run time

Before, the mheap structure was in the bss,
but it's quite large (today, 256 MB, much of
which is never actually paged in), and it makes
Go binaries run afoul of exec-time bss size
limits on some BSD systems.

Fixes issue 4447.

R=golang-dev, dave, minux.ma, remyoudompheng, iant
CC=golang-dev
https://codereview.appspot.com/7307122
Sign in to reply to this message.

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