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: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#62923}
This commit is contained in:
parent
f9b2f66579
commit
84a641faa1
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user