Skip to content

Commit 8dea2b8

Browse files
authored
Merge pull request #54 from bnoordhuis/no-madv-dontfork
Disable madvise(MADV_DONTFORK)
2 parents 9a0ad74 + 7a1ee4b commit 8dea2b8

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

‎libexec/extract-node‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ cd "${src}/node-v${version}"
3232
#patch -p1 < "${top}"/patch/gyp-libv8_monolith.patch
3333
#patch -p1 < "${top}"/patch/py2-icutrim.patch
3434
#patch -p1 < "${top}"/patch/py2-genv8constants.patch
35+
patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch
3536
patch -p1 < "${top}"/patch/v8-disable-pkey.patch
3637

3738
# TODO: the following still fails on py3 so the above one forcing py2 is needed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi
2+
index 6e21dac6d7..bcf022fb28 100644
3+
--- a/tools/v8_gypfiles/features.gypi
4+
+++ b/tools/v8_gypfiles/features.gypi
5+
@@ -73,7 +73,10 @@
6+
}, {
7+
'v8_enable_etw_stack_walking': 0,
8+
}],
9+
- ['OS=="linux"', {
10+
+ # Disable madvise(MADV_DONTFORK), it's a great optimization for programs
11+
+ # that fork & exec but not for programs that fork and keep running.
12+
+ # It makes mini_racer's test/test_forking.rb test segfault.
13+
+ ['False and OS=="linux"', {
14+
# Sets -dV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION.
15+
#
16+
# This flag speeds up the performance of fork/execve on Linux systems for

0 commit comments

Comments
 (0)