Commit be859096 authored by Anton Bikineev's avatar Anton Bikineev Committed by V8 LUCI CQ

cppgc: young-gen: Fix MSVC build

Bug: chromium:1029379
Change-Id: Ia1de91ab0ffc63912ce26349d095881a7a141ff8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3550269Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Cr-Commit-Position: refs/heads/main@{#79620}
parent 5d6a16fb
......@@ -31,10 +31,12 @@ void AgeTable::Reset(PageAllocator* allocator) {
// TODO(chromium:1029379): Consider MADV_DONTNEED instead of MADV_FREE on
// POSIX platforms.
std::fill(table_.begin(), table_.end(), Age::kOld);
const uintptr_t begin = RoundUp(reinterpret_cast<uintptr_t>(table_.begin()),
allocator->CommitPageSize());
const uintptr_t end = RoundDown(reinterpret_cast<uintptr_t>(table_.end()),
const uintptr_t begin = RoundUp(reinterpret_cast<uintptr_t>(table_.data()),
allocator->CommitPageSize());
const uintptr_t end =
RoundDown(reinterpret_cast<uintptr_t>(table_.data() + table_.size()),
allocator->CommitPageSize());
allocator->DiscardSystemPages(reinterpret_cast<void*>(begin), end - begin);
}
......
......@@ -130,7 +130,8 @@ void HeapBase::ResetRememberedSet() {
protected:
bool VisitNormalPageSpace(NormalPageSpace& space) {
some_lab_is_set_ |= space.linear_allocation_buffer().size();
some_lab_is_set_ |=
static_cast<bool>(space.linear_allocation_buffer().size());
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment