diff options
Diffstat (limited to 'chromium/v8/src/heap/cppgc/gc-info-table.cc')
| -rw-r--r-- | chromium/v8/src/heap/cppgc/gc-info-table.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/chromium/v8/src/heap/cppgc/gc-info-table.cc b/chromium/v8/src/heap/cppgc/gc-info-table.cc index dda5f0a7e83..8f2ee965011 100644 --- a/chromium/v8/src/heap/cppgc/gc-info-table.cc +++ b/chromium/v8/src/heap/cppgc/gc-info-table.cc @@ -18,6 +18,11 @@ namespace internal { namespace { +// GCInfoTable::table_, the table which holds GCInfos, is maintained as a +// contiguous array reserved upfront. Subparts of the array are (re-)committed +// as read/write or read-only in OS pages, whose size is a power of 2. To avoid +// having GCInfos that cross the boundaries between these subparts we force the +// size of GCInfo to be a power of 2 as well. constexpr size_t kEntrySize = sizeof(GCInfo); static_assert(v8::base::bits::IsPowerOfTwo(kEntrySize), "GCInfoTable entries size must be power of " |
