Skip to content

Commit 31afa1b

Browse files
mnordinecommit-bot@chromium.org
authored andcommitted
Incorrect wording
I think "contains" was meant here. Closes #47359 #47359 GitOrigin-RevId: ee2dee2 Change-Id: I78be99af3584dee00e4253a1ac32e3e476a01da6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215340 Reviewed-by: Michael Thomsen <[email protected]> Commit-Queue: Michael Thomsen <[email protected]>
1 parent e2a689b commit 31afa1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runtime/docs/gc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ Operations on headers and slots use [relaxed ordering](https://en.cppreference.c
154154

155155
The concurrent marker starts with an acquire-release operation, so all writes by the mutator up to the time that marking starts are visible to the marker.
156156

157-
For old-space objects created before marking started, in each slot the marker can see either its value at the time marking started or any subsequent value sorted in the slot. Any slot that contained a pointer continues to continue a valid pointer for the object's lifetime, so no matter which value the marker sees, it won't interpret a non-pointer as a pointer. (The one interesting case here is array truncation, where some slot in the array will become the header of a filler object. We ensure this is safe for concurrent marking by ensuring the header for the filler object looks like a Smi.) If the marker sees an old value, we may lose some precision and retain a dead object, but we remain correct because the new value has been marked by the mutator.
157+
For old-space objects created before marking started, in each slot the marker can see either its value at the time marking started or any subsequent value sorted in the slot. Any slot that contained a pointer continues to contain a valid pointer for the object's lifetime, so no matter which value the marker sees, it won't interpret a non-pointer as a pointer. (The one interesting case here is array truncation, where some slot in the array will become the header of a filler object. We ensure this is safe for concurrent marking by ensuring the header for the filler object looks like a Smi.) If the marker sees an old value, we may lose some precision and retain a dead object, but we remain correct because the new value has been marked by the mutator.
158158

159159
For old-space objects created after marking started, the marker may see uninitialized values because operations on slots are not synchronized. To prevent this, during marking we allocate old-space objects [black (marked)](https://en.wikipedia.org/wiki/Tracing_garbage_collection#TRI-COLOR) so the marker will not visit them.
160160

0 commit comments

Comments
 (0)