Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2020-10-21 22:41:11 +0300
committerJoyee Cheung <joyeec9h3@gmail.com>2020-10-21 22:41:11 +0300
commitd2a3078460095bef0db0772eb94a0b5d3232ec84 (patch)
tree5b0a050d43b355cc18fad698fecac0c0c809a8a9 /src/node_options.h
parentd5088d8dbbcf1cdc32e15a37e132a43e95dece2f (diff)
src: add --heapsnapshot-near-heap-limit option
This patch adds a --heapsnapshot-near-heap-limit CLI option that takes heap snapshots when the V8 heap is approaching the heap size limit. It will try to write the snapshots to disk before the program crashes due to OOM. PR-URL: https://github.com/nodejs/node/pull/33010 Refs: https://github.com/nodejs/node/issues/27552 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/node_options.h')
-rw-r--r--src/node_options.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_options.h b/src/node_options.h
index e8051f64bc3..84ee8e34bca 100644
--- a/src/node_options.h
+++ b/src/node_options.h
@@ -115,6 +115,7 @@ class EnvironmentOptions : public Options {
bool experimental_vm_modules = false;
bool expose_internals = false;
bool frozen_intrinsics = false;
+ int64_t heap_snapshot_near_heap_limit = 0;
std::string heap_snapshot_signal;
uint64_t max_http_header_size = 16 * 1024;
bool no_deprecation = false;