Skip to content

Commit 2216a3b

Browse files
authored
deps: V8: cherry-pick 1e190bbb0396
Original commit message: [segmented-table] Disable segments pool if pages can be too large The segments pool can only be used if we have 16Kb allocation granularity. On OSs where the page size can be configured larger we have to disable it, since it is currently not runtime configurabe. Fixed: 425634685 Change-Id: If77e46b034fc2e324d7eabf19eff54958ea6f7cb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6973467 Reviewed-by: Dominik Inführ <dinfuehr@chromium.org> Auto-Submit: Olivier Flückiger <olivf@chromium.org> Commit-Queue: Olivier Flückiger <olivf@chromium.org> Cr-Commit-Position: refs/heads/main@{#102700} Refs: v8/v8@1e190bb PR-URL: #60206 Fixes: nodejs/build#4172 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
1 parent 3ac88a7 commit 2216a3b

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.9',
41+
'v8_embedder_string': '-node.10',
4242

4343
##### V8 defaults for Node.js #####
4444

deps/v8/src/common/segmented-table.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ class V8_EXPORT_PRIVATE SegmentedTable {
4141
static constexpr bool kUseContiguousMemory = true;
4242
static constexpr size_t kReservationSize = size;
4343
static constexpr size_t kMaxCapacity = kReservationSize / kEntrySize;
44-
#if defined(V8_TARGET_OS_WIN) || defined(V8_HOST_ARCH_PPC64)
44+
#if defined(V8_TARGET_OS_WIN)
4545
// On windows the allocation granularity is 64KB and thus we cannot make a
4646
// segment smaller than that.
47-
// PPC64 can utilize a 64KB page size.
4847
static constexpr bool kUseSegmentPool = false;
49-
static constexpr size_t kSegmentSize = 64 * KB;
5048
#else
51-
static constexpr bool kUseSegmentPool = true;
52-
static constexpr size_t kSegmentSize = 16 * KB;
49+
static constexpr bool kUseSegmentPool = kMinimumOSPageSize <= 16 * KB;
5350
#endif
51+
static constexpr size_t kSegmentSize = kUseSegmentPool ? 16 * KB : 64 * KB;
5452
#else
5553
// On 32 bit, segments are individually mapped.
5654
static constexpr bool kUseContiguousMemory = false;

0 commit comments

Comments
 (0)