File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,13 @@ This JSON stream format is intended to be used with tools such as
7171Chrome DevTools. The JSON schema is undocumented and specific to the
7272V8 engine. Therefore, the schema may change from one version of V8 to the next.
7373
74+ Creating a heap snapshot requires memory about twice the size of the heap at
75+ the time the snapshot is created. This results in the risk of OOM killers
76+ terminating the process.
77+
78+ Generating a snapshot is a synchronous operation which blocks the event loop
79+ for a duration depending on the heap size.
80+
7481``` js
7582// Print heap snapshot to the console
7683const v8 = require (' v8' );
@@ -290,6 +297,13 @@ A heap snapshot is specific to a single V8 isolate. When using
290297[ worker threads] [ ] , a heap snapshot generated from the main thread will
291298not contain any information about the workers, and vice versa.
292299
300+ Creating a heap snapshot requires memory about twice the size of the heap at
301+ the time the snapshot is created. This results in the risk of OOM killers
302+ terminating the process.
303+
304+ Generating a snapshot is a synchronous operation which blocks the event loop
305+ for a duration depending on the heap size.
306+
293307``` js
294308const { writeHeapSnapshot } = require (' v8' );
295309const {
You can’t perform that action at this time.
0 commit comments