Browse Source

Update src/common/sparse_large_vector.h

Signed-off-by: Exverge <exverge@exverge.xyz>
pull/4219/head
Exverge 2 weeks ago
parent
commit
a602a6a244
No known key found for this signature in database GPG Key ID: DAD399BCC5FB77E4
  1. 4
      src/common/sparse_large_vector.h

4
src/common/sparse_large_vector.h

@ -107,8 +107,8 @@ public:
}
void ZeroRegion(std::size_t start, std::size_t end_) noexcept {
u64 base = reinterpret_cast<u64>(base_ptr[start]);
const u64 end = reinterpret_cast<u64>(base_ptr[end_]);
u64 base = reinterpret_cast<u64>(&base_ptr[start]);
const u64 end = reinterpret_cast<u64>(&base_ptr[end_]);
const u64 end_page = AlignUp(base, HostPageSize);
const u64 first_size = (std::min)(end_page, end) - base;

Loading…
Cancel
Save