The Wayback Machine - https://web.archive.org/web/20220509104741/https://github.com/nodejs/node/commit/4050b0d64f
Skip to content
Permalink
Browse files
build: enable V8's shared read-only heap
It is what V8's build config does by default.

PR-URL: #42809
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
targos committed Apr 28, 2022
1 parent d33cbab commit 4050b0d64f2a5b92b54a2de346f301a60d8553ba
Showing with 13 additions and 4 deletions.
  1. +1 −0 configure.py
  2. +4 −4 test/parallel/test-worker-nearheaplimit-deadlock.js
  3. +7 −0 tools/v8_gypfiles/features.gypi
  4. +1 −0 tools/v8_gypfiles/v8.gyp
@@ -1458,6 +1458,7 @@ def configure_v8(o):
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression else 1
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
@@ -1,3 +1,7 @@
// Flags: --no-node-snapshot
// With node snapshot the OOM can occur during the deserialization of the
// context, so disable it since we want the OOM to occur during the creation of
// the message port.
'use strict';
const common = require('../common');
const assert = require('assert');
@@ -11,10 +15,6 @@ if (!process.env.HAS_STARTED_WORKER) {
maxYoungGenerationSizeMb: 0,
maxOldGenerationSizeMb: 0
},
// With node snapshot the OOM can occur during the deserialization of
// the context, so disable it since we want the OOM to occur during
// the creation of the message port.
execArgv: [ ...process.execArgv, '--no-node-snapshot']
};

const worker = new Worker(__filename, opts);
@@ -179,6 +179,10 @@
# Controls the threshold for on-heap/off-heap Typed Arrays.
'v8_typed_array_max_size_in_heap%': 64,

# Enable sharing read-only space across isolates.
# Sets -DV8_SHARED_RO_HEAP.
'v8_enable_shared_ro_heap%': 0,

# Enable lazy source positions by default.
'v8_enable_lazy_source_positions%': 1,

@@ -396,6 +400,9 @@
['v8_use_siphash==1', {
'defines': ['V8_USE_SIPHASH',],
}],
['v8_enable_shared_ro_heap==1', {
'defines': ['V8_SHARED_RO_HEAP',],
}],
['dcheck_always_on!=0', {
'defines': ['DEBUG',],
}],
@@ -1757,6 +1757,7 @@
'v8_enable_verify_csa=<(v8_enable_verify_csa)',
'v8_enable_lite_mode=<(v8_enable_lite_mode)',
'v8_enable_pointer_compression=<(v8_enable_pointer_compression)',
'v8_enable_shared_ro_heap=<(v8_enable_shared_ro_heap)',
'v8_enable_webassembly=<(v8_enable_webassembly)',
# Not available in gyp.
'v8_control_flow_integrity=0',

0 comments on commit 4050b0d

Please sign in to comment.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.