[vm] Avoid data race querying the new-space page cache.
This access is extremely infrequent, so we may as well consistently use the mutex. TEST=tsan Bug: https://github.com/dart-lang/sdk/issues/45521 Change-Id: I17b276f671e20c2eed8bf26735cc11c386fba9e6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194013 Reviewed-by: Alexander Aprelev <aam@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
06729f230a
commit
ee3a86d8ab
@@ -670,6 +670,7 @@ void SemiSpace::Cleanup() {
|
||||
}
|
||||
|
||||
intptr_t SemiSpace::CachedSize() {
|
||||
MutexLocker ml(page_cache_mutex);
|
||||
return page_cache_size * kNewPageSize;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user