| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 42c0a83 commit 3f000a2
1 file 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 | |||
| 71 | 71 | Chrome DevTools. The JSON schema is undocumented and specific to the | |
| 72 | 72 | V8 engine. Therefore, the schema may change from one version of V8 to the next. | |
| 73 | 73 | ||
| 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 | + | ||
| 74 | 81 | ```js | |
| 75 | 82 | // Print heap snapshot to the console | |
| 76 | 83 | const v8 = require('v8'); | |
@@ -284,6 +291,13 @@ A heap snapshot is specific to a single V8 isolate. When using | |||
| 284 | 291 | [worker threads][], a heap snapshot generated from the main thread will | |
| 285 | 292 | not contain any information about the workers, and vice versa. | |
| 286 | 293 | ||
| 294 | + Creating a heap snapshot requires memory about twice the size of the heap at | ||
| 295 | + the time the snapshot is created. This results in the risk of OOM killers | ||
| 296 | + terminating the process. | ||
| 297 | + | ||
| 298 | + Generating a snapshot is a synchronous operation which blocks the event loop | ||
| 299 | + for a duration depending on the heap size. | ||
| 300 | + | ||
| 287 | 301 | ```js | |
| 288 | 302 | const { writeHeapSnapshot } = require('v8'); | |
| 289 | 303 | const { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments