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

Issue 4118042: code review 4118042: runtime: simpler heap map, memory allocation (Closed)

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

Description

runtime: simpler heap map, memory allocation The old heap maps used a multilevel table, but that was overkill: there are only 1M entries on a 32-bit machine and we can arrange to use a dense address range on a 64-bit machine. The heap map is in bss. The assumption is that if we don't touch the pages they won't be mapped in. Also moved some duplicated memory allocation code out of the OS-specific files.

Patch Set 1 #

Patch Set 2 : code review 4118042: runtime: simpler heap map, memory allocation #

Patch Set 3 : code review 4118042: runtime: simpler heap map, memory allocation #

Patch Set 4 : code review 4118042: runtime: simpler heap map, memory allocation #

Patch Set 5 : code review 4118042: runtime: simpler heap map, memory allocation #

Total comments: 2

Patch Set 6 : code review 4118042: runtime: simpler heap map, memory allocation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -461 lines) Patch
M src/pkg/runtime/Makefile View 1 2 2 chunks +0 lines, -2 lines 0 comments Download
M src/pkg/runtime/amd64/traceback.c View 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/darwin/386/sys.s View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/darwin/amd64/sys.s View 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/darwin/mem.c View 1 2 3 2 chunks +14 lines, -5 lines 0 comments Download
M src/pkg/runtime/darwin/thread.c View 1 chunk +6 lines, -2 lines 0 comments Download
M src/pkg/runtime/debug.go View 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/freebsd/mem.c View 1 2 3 2 chunks +14 lines, -5 lines 0 comments Download
M src/pkg/runtime/linux/mem.c View 1 2 3 2 chunks +16 lines, -5 lines 0 comments Download
M src/pkg/runtime/malloc.h View 1 2 3 8 chunks +28 lines, -20 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 3 chunks +65 lines, -2 lines 0 comments Download
M src/pkg/runtime/malloc_defs.go View 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/mcentral.c View 1 chunk +1 line, -2 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/mheap.c View 1 2 3 8 chunks +63 lines, -33 lines 0 comments Download
R src/pkg/runtime/mheapmap32.h View 1 chunk +0 lines, -41 lines 0 comments Download
R src/pkg/runtime/mheapmap32.c View 1 chunk +0 lines, -96 lines 0 comments Download
R src/pkg/runtime/mheapmap32_defs.go View 1 chunk +0 lines, -23 lines 0 comments Download
R src/pkg/runtime/mheapmap64.h View 1 chunk +0 lines, -60 lines 0 comments Download
R src/pkg/runtime/mheapmap64.c View 1 chunk +0 lines, -117 lines 0 comments Download
R src/pkg/runtime/mheapmap64_defs.go View 1 chunk +0 lines, -31 lines 0 comments Download
M src/pkg/runtime/pprof/pprof.go View 1 chunk +0 lines, -1 line 0 comments Download
M src/pkg/runtime/proc.c View 1 chunk +6 lines, -0 lines 0 comments Download
M src/pkg/runtime/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/pkg/runtime/windows/mem.c View 1 2 3 2 chunks +16 lines, -8 lines 0 comments Download
M test/run View 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 4
rsc
Hello r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 1 month ago (2011-01-28 19:42:05 UTC) #1
r
LGTM it does seem better http://codereview.appspot.com/4118042/diff/11001/src/pkg/runtime/malloc.goc File src/pkg/runtime/malloc.goc (right): http://codereview.appspot.com/4118042/diff/11001/src/pkg/runtime/malloc.goc#newcode262 src/pkg/runtime/malloc.goc:262: // possible let's try ...
14 years, 1 month ago (2011-01-28 19:56:15 UTC) #2
rsc
> http://codereview.appspot.com/4118042/diff/11001/src/pkg/runtime/malloc.goc#newcode262 > src/pkg/runtime/malloc.goc:262: // possible let's try to get one > starting at 0x000000f800000000. ...
14 years, 1 month ago (2011-01-28 19:58:27 UTC) #3
rsc
14 years, 1 month ago (2011-01-28 20:03:30 UTC) #4
*** Submitted as http://code.google.com/p/go/source/detail?r=dba56641aa19 ***

runtime: simpler heap map, memory allocation

The old heap maps used a multilevel table, but that
was overkill: there are only 1M entries on a 32-bit
machine and we can arrange to use a dense address
range on a 64-bit machine.

The heap map is in bss.  The assumption is that if
we don't touch the pages they won't be mapped in.

Also moved some duplicated memory allocation
code out of the OS-specific files.

R=r
CC=golang-dev
http://codereview.appspot.com/4118042
Sign in to reply to this message.

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