aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/mgcmark_greenteagc.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/mgcmark_greenteagc.go')
-rw-r--r--src/runtime/mgcmark_greenteagc.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/runtime/mgcmark_greenteagc.go b/src/runtime/mgcmark_greenteagc.go
index 3a368438d4..018f7df6ff 100644
--- a/src/runtime/mgcmark_greenteagc.go
+++ b/src/runtime/mgcmark_greenteagc.go
@@ -183,10 +183,10 @@ func (s *mspan) initInlineMarkBits() {
s.inlineMarkBits().init(s.spanclass)
}
-// mergeInlineMarks merges the span's inline mark bits into dst.
+// moveInlineMarks merges the span's inline mark bits into dst and clears them.
//
// gcUsesSpanInlineMarkBits(s.elemsize) must be true.
-func (s *mspan) mergeInlineMarks(dst *gcBits) {
+func (s *mspan) moveInlineMarks(dst *gcBits) {
if doubleCheckGreenTea && !gcUsesSpanInlineMarkBits(s.elemsize) {
throw("expected span with inline mark bits")
}
@@ -203,6 +203,9 @@ func (s *mspan) mergeInlineMarks(dst *gcBits) {
if doubleCheckGreenTea && !s.spanclass.noscan() && imb.marks != imb.scans {
throw("marks don't match scans for span with pointer")
}
+
+ // Reset the inline mark bits.
+ imb.init(s.spanclass)
}
// inlineMarkBits returns the inline mark bits for the span.