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

Issue 5634050: code review 5634050: runtime: drop to 32 bit malloc if 64 bit will not work

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by borman
Modified:
13 years, 1 month ago
Reviewers:
rsc, cw
CC:
rsc, cw, golang-dev
Visibility:
Public.

Description

runtime: drop to 32 bit malloc if 64 bit will not work On 64 bit UML it is not possible to reserve memory at 0xF8<<32. Detect when linux cannot use these high virtual memory addresses and drop back to the 32 bit memory allocator.

Patch Set 1 #

Patch Set 2 : diff -r f79343c8a479 https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r f79343c8a479 https://go.googlecode.com/hg/ #

Total comments: 4

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

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

Total comments: 6

Patch Set 6 : diff -r f79343c8a479 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -8 lines) Patch
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 2 chunks +6 lines, -5 lines 0 comments Download
M src/pkg/runtime/mem_linux.c View 1 2 3 4 5 2 chunks +12 lines, -3 lines 0 comments Download

Messages

Total messages: 16
rsc
This seems small and reasonable. Minor comments below. Please run hg mail 5634050 when you're ...
13 years, 1 month ago (2012-02-06 19:08:43 UTC) #1
borman
Hello rsc@golang.org (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 1 month ago (2012-02-06 19:32:05 UTC) #2
borman
I am not sure I can easily do this without editing mem_linux.c. http://codereview.appspot.com/5634050/diff/2001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc ...
13 years, 1 month ago (2012-02-06 19:32:32 UTC) #3
rsc
What calls the functions you changed in mem_linux.c? Can the change go there instead (at ...
13 years, 1 month ago (2012-02-06 19:37:01 UTC) #4
borman
On 2012/02/06 19:37:01, rsc wrote: > What calls the functions you changed in mem_linux.c? > ...
13 years, 1 month ago (2012-02-06 19:59:56 UTC) #5
cw
Why not try the region between 1<<32 and 0xf8<<32? Is the complexity not worth the ...
13 years, 1 month ago (2012-02-06 20:27:16 UTC) #6
borman
On 2012/02/06 20:27:16, cw wrote: > Why not try the region between 1<<32 and 0xf8<<32? ...
13 years, 1 month ago (2012-02-06 20:39:54 UTC) #7
rsc
http://codereview.appspot.com/5634050/diff/6001/src/pkg/runtime/mem_linux.c File src/pkg/runtime/mem_linux.c (right): http://codereview.appspot.com/5634050/diff/6001/src/pkg/runtime/mem_linux.c#newcode76 src/pkg/runtime/mem_linux.c:76: // if we can reserve at least 64K and ...
13 years, 1 month ago (2012-02-06 20:43:39 UTC) #8
borman
http://codereview.appspot.com/5634050/diff/6001/src/pkg/runtime/mem_linux.c File src/pkg/runtime/mem_linux.c (right): http://codereview.appspot.com/5634050/diff/6001/src/pkg/runtime/mem_linux.c#newcode76 src/pkg/runtime/mem_linux.c:76: // if we can reserve at least 64K and ...
13 years, 1 month ago (2012-02-06 21:11:36 UTC) #9
rsc
On Mon, Feb 6, 2012 at 16:11, <borman@google.com> wrote: > But shouldn't this be > ...
13 years, 1 month ago (2012-02-06 22:58:30 UTC) #10
borman
On 2012/02/06 22:58:30, rsc wrote: > On Mon, Feb 6, 2012 at 16:11, <mailto:borman@google.com> wrote: ...
13 years, 1 month ago (2012-02-06 23:29:45 UTC) #11
borman
Hello rsc@golang.org, cw@f00f.org (cc: golang-dev@googlegroups.com), Please take another look.
13 years, 1 month ago (2012-02-06 23:29:57 UTC) #12
cw
LGTM
13 years, 1 month ago (2012-02-07 00:55:25 UTC) #13
borman
ping -- just to make sure this does not fall through the cracks
13 years, 1 month ago (2012-02-08 19:22:46 UTC) #14
rsc
LGTM
13 years, 1 month ago (2012-02-08 19:33:09 UTC) #15
rsc
13 years, 1 month ago (2012-02-08 19:39:19 UTC) #16
*** Submitted as http://code.google.com/p/go/source/detail?r=36c9c7810f14 ***

runtime: drop to 32 bit malloc if 64 bit will not work

On 64 bit UML it is not possible to reserve memory at 0xF8<<32.
Detect when linux cannot use these high virtual memory addresses
and drop back to the 32 bit memory allocator.

R=rsc, cw
CC=golang-dev
http://codereview.appspot.com/5634050

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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