| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1370b1a commit 51eb323
3 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | 37 | # Reset this number to 0 on major V8 upgrades. | |
| 38 | 38 | # Increment by one for each non-official patch applied to deps/v8. | |
| 39 | - 'v8_embedder_string': '-node.4', | ||
| 39 | + 'v8_embedder_string': '-node.5', | ||
| 40 | 40 | ||
| 41 | 41 | ##### V8 defaults for Node.js ##### | |
| 42 | 42 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,8 +37,13 @@ using ActiveSystemPages = ::heap::base::ActiveSystemPages; | |||
| 37 | 37 | ||
| 38 | 38 | class V8_EXPORT_PRIVATE MemoryChunkLayout { | |
| 39 | 39 | public: | |
| 40 | - static const int kNumSets = NUMBER_OF_REMEMBERED_SET_TYPES; | ||
| 41 | - static const int kNumTypes = ExternalBackingStoreType::kNumTypes; | ||
| 40 | + static constexpr int kNumSets = NUMBER_OF_REMEMBERED_SET_TYPES; | ||
| 41 | + static constexpr int kNumTypes = ExternalBackingStoreType::kNumTypes; | ||
| 42 | + #if V8_CC_MSVC && V8_TARGET_ARCH_IA32 | ||
| 43 | + static constexpr int kMemoryChunkAlignment = 8; | ||
| 44 | + #else | ||
| 45 | + static constexpr int kMemoryChunkAlignment = sizeof(size_t); | ||
| 46 | + #endif // V8_CC_MSVC && V8_TARGET_ARCH_IA32 | ||
| 42 | 47 | #define FIELD(Type, Name) \ | |
| 43 | 48 | k##Name##Offset, k##Name##End = k##Name##Offset + sizeof(Type) - 1 | |
| 44 | 49 | enum Header { | |
@@ -74,11 +79,17 @@ class V8_EXPORT_PRIVATE MemoryChunkLayout { | |||
| 74 | 79 | #endif // V8_ENABLE_INNER_POINTER_RESOLUTION_OSB | |
| 75 | 80 | FIELD(size_t, WasUsedForAllocation), | |
| 76 | 81 | kMarkingBitmapOffset, | |
| 77 | - kMemoryChunkHeaderSize = kMarkingBitmapOffset, | ||
| 82 | + kMemoryChunkHeaderSize = | ||
| 83 | + kMarkingBitmapOffset + | ||
| 84 | + ((kMarkingBitmapOffset % kMemoryChunkAlignment) == 0 | ||
| 85 | + ? 0 | ||
| 86 | + : kMemoryChunkAlignment - | ||
| 87 | + (kMarkingBitmapOffset % kMemoryChunkAlignment)), | ||
| 78 | 88 | kMemoryChunkHeaderStart = kSlotSetOffset, | |
| 79 | 89 | kBasicMemoryChunkHeaderSize = kMemoryChunkHeaderStart, | |
| 80 | 90 | kBasicMemoryChunkHeaderStart = 0, | |
| 81 | 91 | }; | |
| 92 | + #undef FIELD | ||
| 82 | 93 | static size_t CodePageGuardStartOffset(); | |
| 83 | 94 | static size_t CodePageGuardSize(); | |
| 84 | 95 | static intptr_t ObjectStartOffsetInCodePage(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -496,6 +496,17 @@ void MemoryChunk::ValidateOffsets(MemoryChunk* chunk) { | |||
| 496 | 496 | DCHECK_EQ(reinterpret_cast<Address>(&chunk->possibly_empty_buckets_) - | |
| 497 | 497 | chunk->address(), | |
| 498 | 498 | MemoryChunkLayout::kPossiblyEmptyBucketsOffset); | |
| 499 | + DCHECK_EQ(reinterpret_cast<Address>(&chunk->active_system_pages_) - | ||
| 500 | + chunk->address(), | ||
| 501 | + MemoryChunkLayout::kActiveSystemPagesOffset); | ||
| 502 | + #ifdef V8_ENABLE_INNER_POINTER_RESOLUTION_OSB | ||
| 503 | + DCHECK_EQ(reinterpret_cast<Address>(&chunk->object_start_bitmap_) - | ||
| 504 | + chunk->address(), | ||
| 505 | + MemoryChunkLayout::kObjectStartBitmapOffset); | ||
| 506 | + #endif // V8_ENABLE_INNER_POINTER_RESOLUTION_OSB | ||
| 507 | + DCHECK_EQ(reinterpret_cast<Address>(&chunk->was_used_for_allocation_) - | ||
| 508 | + chunk->address(), | ||
| 509 | + MemoryChunkLayout::kWasUsedForAllocationOffset); | ||
| 499 | 510 | } | |
| 500 | 511 | #endif | |
| 501 | 512 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments