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

Delta Between Two Patch Sets: src/runtime/mgc0.c

Issue 149260043: code review 149260043: runtime: fix scanning of gc work buffer (Closed)
Left Patch Set: diff -r 38cd9f03739fe6cf029acf00a3d178c696c4399f https://khr%40golang.org@code.google.com/p/go/ Created 10 years, 5 months ago
Right Patch Set: diff -r cdc5a577da4ef89e10985472cefdf41e21313dd5 https://khr%40golang.org@code.google.com/p/go/ Created 10 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // Garbage collector (GC). 5 // Garbage collector (GC).
6 // 6 //
7 // GC is: 7 // GC is:
8 // - mark&sweep 8 // - mark&sweep
9 // - mostly precise (with the exception of some C-allocated objects, assembly fr ames/arguments, etc) 9 // - mostly precise (with the exception of some C-allocated objects, assembly fr ames/arguments, etc)
10 // - parallel (up to MaxGcproc threads) 10 // - parallel (up to MaxGcproc threads)
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1044 struct SweepData 1044 struct SweepData
1045 { 1045 {
1046 G* g; 1046 G* g;
1047 bool parked; 1047 bool parked;
1048 1048
1049 uint32 spanidx; // background sweeper position 1049 uint32 spanidx; // background sweeper position
1050 1050
1051 uint32 nbgsweep; 1051 uint32 nbgsweep;
1052 uint32 npausesweep; 1052 uint32 npausesweep;
1053 }; 1053 };
1054
1055 SweepData runtime·sweep; 1054 SweepData runtime·sweep;
1056 1055
1057 // sweeps one span 1056 // sweeps one span
1058 // returns number of pages returned to heap, or -1 if there is nothing to sweep 1057 // returns number of pages returned to heap, or -1 if there is nothing to sweep
1059 uintptr 1058 uintptr
1060 runtime·sweepone(void) 1059 runtime·sweepone(void)
1061 { 1060 {
1062 MSpan *s; 1061 MSpan *s;
1063 uint32 idx, sg; 1062 uint32 idx, sg;
1064 uintptr npages; 1063 uintptr npages;
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
1918 void runtime·gc_unixnanotime(int64 *now); 1917 void runtime·gc_unixnanotime(int64 *now);
1919 1918
1920 int64 1919 int64
1921 runtime·unixnanotime(void) 1920 runtime·unixnanotime(void)
1922 { 1921 {
1923 int64 now; 1922 int64 now;
1924 1923
1925 runtime·gc_unixnanotime(&now); 1924 runtime·gc_unixnanotime(&now);
1926 return now; 1925 return now;
1927 } 1926 }
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

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