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

Issue 3975046: code review 3975046: runtime: faster allocator, garbage collector (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 9 months ago by rsc
Modified:
15 years, 8 months ago
Reviewers:
mattn, brainman, dho
CC:
iant, r, golang-dev
Visibility:
Public.

Description

runtime: faster allocator, garbage collector GC is still single-threaded. Multiple threads will happen in another CL. Garbage collection pauses are typically about half as long as they were before this CL.

Patch Set 1 #

Patch Set 2 : code review 3975046: runtime: faster allocator, garbage collector #

Total comments: 1

Patch Set 3 : code review 3975046: runtime: faster allocator, garbage collector #

Patch Set 4 : code review 3975046: runtime: faster allocator, garbage collector #

Patch Set 5 : code review 3975046: runtime: faster allocator, garbage collector #

Patch Set 6 : code review 3975046: runtime: faster allocator, garbage collector #

Total comments: 13

Patch Set 7 : code review 3975046: runtime: faster allocator, garbage collector #

Total comments: 1

Patch Set 8 : diff -r c45c540f43cb https://go.googlecode.com/hg/ #

Total comments: 3

Patch Set 9 : diff -r 9ab68eb94762 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+720 lines, -321 lines) Patch
M src/pkg/runtime/debug.go View 1 2 3 4 5 6 7 1 chunk +2 lines, -1 line 0 comments Download
M src/pkg/runtime/iface.c View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/malloc.h View 1 2 3 4 5 6 7 8 4 chunks +25 lines, -18 lines 0 comments Download
M src/pkg/runtime/malloc.goc View 1 2 3 4 5 6 7 8 16 chunks +98 lines, -79 lines 0 comments Download
M src/pkg/runtime/mcentral.c View 1 2 3 4 5 6 7 chunks +9 lines, -16 lines 0 comments Download
M src/pkg/runtime/mfinal.c View 1 2 3 4 5 3 chunks +6 lines, -8 lines 0 comments Download
M src/pkg/runtime/mgc0.c View 1 2 3 4 5 6 7 8 chunks +560 lines, -179 lines 0 comments Download
M src/pkg/runtime/mheap.c View 1 2 3 4 5 6 3 chunks +8 lines, -7 lines 0 comments Download
M src/pkg/runtime/mprof.goc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/runtime/msize.c View 3 chunks +3 lines, -4 lines 0 comments Download
M src/pkg/runtime/slice.c View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/runtime/string.goc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/runtime/windows/mem.c View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 18
brainman
Just a quick look, Russ. http://codereview.appspot.com/3975046/diff/2001/src/pkg/runtime/windows/mem.c File src/pkg/runtime/windows/mem.c (right): http://codereview.appspot.com/3975046/diff/2001/src/pkg/runtime/windows/mem.c#newcode73 src/pkg/runtime/windows/mem.c:73: p = runtime·stdcall(runtime·VirtualAlloc, 4, ...
15 years, 8 months ago (2011-01-25 23:22:14 UTC) #1
rsc
Hello brainman, iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years, 8 months ago (2011-01-31 23:52:48 UTC) #2
brainman
http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/windows/mem.c File src/pkg/runtime/windows/mem.c (right): http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/windows/mem.c#newcode61 src/pkg/runtime/windows/mem.c:61: return runtime·stdcall(runtime·VirtualAlloc, 4, v, n, MEM_RESERVE, PAGE_EXECUTE_READWRITE); return runtime·stdcall(runtime·VirtualAlloc, ...
15 years, 8 months ago (2011-02-01 00:29:50 UTC) #3
iant
LGTM http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/mcentral.c File src/pkg/runtime/mcentral.c (right): http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/mcentral.c#newcode76 src/pkg/runtime/mcentral.c:76: //runtime·printf("MCentral_Alloc %p<\n", c); Do you want to leave ...
15 years, 8 months ago (2011-02-01 06:23:45 UTC) #4
rsc
PTAL http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/mcentral.c File src/pkg/runtime/mcentral.c (right): http://codereview.appspot.com/3975046/diff/16001/src/pkg/runtime/mcentral.c#newcode76 src/pkg/runtime/mcentral.c:76: //runtime·printf("MCentral_Alloc %p<\n", c); On 2011/02/01 06:23:46, iant wrote: ...
15 years, 8 months ago (2011-02-01 17:41:41 UTC) #5
r
LGTM it seems fine; i can't internalize this in finite time. is there a guide ...
15 years, 8 months ago (2011-02-02 05:09:00 UTC) #6
rsc
PTAL. More comments added.
15 years, 8 months ago (2011-02-02 23:01:52 UTC) #7
iant
LGTM http://codereview.appspot.com/3975046/diff/20002/src/pkg/runtime/malloc.h File src/pkg/runtime/malloc.h (right): http://codereview.appspot.com/3975046/diff/20002/src/pkg/runtime/malloc.h#newcode377 src/pkg/runtime/malloc.h:377: int32 runtime·checking; What's runtime·checking for? Should it have ...
15 years, 8 months ago (2011-02-02 23:39:58 UTC) #8
r
LGTM new comments are a big help
15 years, 8 months ago (2011-02-02 23:40:33 UTC) #9
rsc
Hello brainman, iant, r (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
15 years, 8 months ago (2011-02-03 04:03:43 UTC) #10
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=1e800f6ac9dc *** runtime: faster allocator, garbage collector GC is still single-threaded. Multiple ...
15 years, 8 months ago (2011-02-03 04:03:49 UTC) #11
mattn
After applying this patch, I get below. C:\>cgo throw: runtime: cannot reserve memory bitmap virtual ...
15 years, 8 months ago (2011-02-03 05:10:48 UTC) #12
rsc
On Thu, Feb 3, 2011 at 00:10, <mattn.jp@gmail.com> wrote: > After applying this patch, I ...
15 years, 8 months ago (2011-02-03 05:18:21 UTC) #13
brainman
On 2011/02/03 05:18:21, rsc wrote: > On Thu, Feb 3, 2011 at 00:10, <mailto:mattn.jp@gmail.com> wrote: ...
15 years, 8 months ago (2011-02-03 05:27:12 UTC) #14
brainman
On 2011/02/03 05:27:12, brainman wrote: > You are asking for block of 805306368 bytes at ...
15 years, 8 months ago (2011-02-03 05:40:44 UTC) #15
dho
I'm too tired to look at this in detail right now (just got home from ...
15 years, 8 months ago (2011-02-03 05:45:08 UTC) #16
rsc
On Thu, Feb 3, 2011 at 00:45, Devon H. O'Dell <devon.odell@gmail.com> wrote: > I'm too ...
15 years, 8 months ago (2011-02-03 05:53:05 UTC) #17
rsc
15 years, 8 months ago (2011-02-03 05:54:38 UTC) #18
On Thu, Feb 3, 2011 at 00:52, Russ Cox <rsc@golang.org> wrote:
> On Thu, Feb 3, 2011 at 00:45, Devon H. O'Dell <devon.odell@gmail.com> wrote:
>> I'm too tired to look at this in detail right now (just got home from
>> work and it's past bedtime, heh), but the freebsd builder is reporting
>> similar issues.
>
> yes, everything is broken.

sorry, not everything: linux and darwin work fine if you
have ulimit -v unlimited.  i suspect the freebsd problem
is similar (run ulimit -v unlimited).

but in general this approach to managing memory is
breaking a lot of common situations.  i need to rethink.

russ
Sign in to reply to this message.

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