diff options
| author | changwang ma <machangwang.cn@gmail.com> | 2024-10-24 00:43:28 +0800 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2024-11-01 22:46:06 +0000 |
| commit | 3452f07457497c7e2efbdee50d707367308566e5 (patch) | |
| tree | abc31b762765e618a21976cc0a50a10ec1c116a9 /src/runtime | |
| parent | 2fd2718f6b64000fa25e0c5d1ee48aa1426d5a6f (diff) | |
| download | go-3452f07457497c7e2efbdee50d707367308566e5.tar.xz | |
runtime: fix out-of-date comment doc
Change-Id: I352fa0e4e048b896d63427f1c2c519bfed24c702
Reviewed-on: https://go-review.googlesource.com/c/go/+/622017
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/mbarrier.go | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/runtime/mbarrier.go b/src/runtime/mbarrier.go index dd99bf3a6a..19006044ae 100644 --- a/src/runtime/mbarrier.go +++ b/src/runtime/mbarrier.go @@ -92,19 +92,6 @@ import ( // barriers, which will slow down both the mutator and the GC, we always grey // the ptr object regardless of the slot's color. // -// Another place where we intentionally omit memory barriers is when -// accessing mheap_.arena_used to check if a pointer points into the -// heap. On relaxed memory machines, it's possible for a mutator to -// extend the size of the heap by updating arena_used, allocate an -// object from this new region, and publish a pointer to that object, -// but for tracing running on another processor to observe the pointer -// but use the old value of arena_used. In this case, tracing will not -// mark the object, even though it's reachable. However, the mutator -// is guaranteed to execute a write barrier when it publishes the -// pointer, so it will take care of marking the object. A general -// consequence of this is that the garbage collector may cache the -// value of mheap_.arena_used. (See issue #9984.) -// // // Stack writes: // |
