Commit 84a641fa authored by Bill Ticehurst's avatar Bill Ticehurst Committed by Commit Bot

Fix layout of the Space class for members accessed via an offset

Bug: v8:9118
Change-Id: I2271a158226a12f69a7efdfcb6c4faccccf98d15
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1715090
Commit-Queue: Bill Ticehurst <billti@microsoft.com>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62923}
parent f9b2f665
......@@ -1532,10 +1532,6 @@ void MemoryChunk::ReleaseYoungGenerationBitmap() {
// -----------------------------------------------------------------------------
// PagedSpace implementation
void Space::CheckOffsetsAreConsistent() const {
DCHECK_EQ(Space::kIdOffset, OFFSET_OF(Space, id_));
}
void Space::AddAllocationObserver(AllocationObserver* observer) {
allocation_observers_.push_back(observer);
StartNextInlineAllocationStep();
......
......@@ -412,11 +412,8 @@ class V8_EXPORT_PRIVATE Space : public Malloced {
external_backing_store_bytes_[ExternalBackingStoreType::kArrayBuffer] = 0;
external_backing_store_bytes_[ExternalBackingStoreType::kExternalString] =
0;
CheckOffsetsAreConsistent();
}
void CheckOffsetsAreConsistent() const;
static inline void MoveExternalBackingStoreBytes(
ExternalBackingStoreType type, Space* from, Space* to, size_t amount);
......@@ -531,8 +528,6 @@ class V8_EXPORT_PRIVATE Space : public Malloced {
// Tracks off-heap memory used by this space.
std::atomic<size_t>* external_backing_store_bytes_;
static const intptr_t kIdOffset = 9 * kSystemPointerSize;
bool allocation_observers_paused_;
Heap* heap_;
AllocationSpace id_;
......
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