Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Code-Review | +1 |
marked_bytes_.fetch_add(value, std::memory_order_relaxed);
nit: You could also write this as:
```
const size_t old_marked_bytes = marked_bytes_.fetch_add(value, std::memory_order_relaxed);
DCHECK_GE(old_marked_bytes + value, old_marked_bytes);
```
I don't think it matters if you crash before or after setting the value.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Removed Commit-Queue+2 by Michael Lippautz <mlip...@chromium.org>
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
Commit-Queue | +2 |
marked_bytes_.fetch_add(value, std::memory_order_relaxed);
nit: You could also write this as:
```
const size_t old_marked_bytes = marked_bytes_.fetch_add(value, std::memory_order_relaxed);
DCHECK_GE(old_marked_bytes + value, old_marked_bytes);
```
I don't think it matters if you crash before or after setting the value.
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |
2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: src/heap/cppgc/heap-page.h
Insertions: 2, Deletions: 4.
@@ -97,12 +97,10 @@
size_t discarded_memory() const { return discarded_memory_; }
void IncrementMarkedBytes(size_t value) {
-#ifdef DEBUG
const size_t old_marked_bytes =
- marked_bytes_.load(std::memory_order_relaxed);
+ marked_bytes_.fetch_add(value, std::memory_order_relaxed);
+ USE(old_marked_bytes);
DCHECK_GE(old_marked_bytes + value, old_marked_bytes);
-#endif
- marked_bytes_.fetch_add(value, std::memory_order_relaxed);
}
void ResetMarkedBytes() { marked_bytes_.store(0, std::memory_order_relaxed); }
size_t marked_bytes() const {
```
[cppgc] Fix range DCHECK for marked bytes
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. | Gerrit |