@@ -1488,6 +1488,9 @@ is no entry script.
14881488<!-- YAML
14891489added: v0.1.16
14901490changes:
1491+ - version: REPLACEME
1492+ pr-url: https://github.com/nodejs/node/pull/31550
1493+ description: Added `arrayBuffers` to the returned object.
14911494 - version: v7.2.0
14921495 pr-url: https://github.com/nodejs/node/pull/9587
14931496 description: Added `external` to the returned object.
@@ -1498,6 +1501,7 @@ changes:
14981501 * ` heapTotal ` {integer}
14991502 * ` heapUsed ` {integer}
15001503 * ` external ` {integer}
1504+ * ` arrayBuffers ` {integer}
15011505
15021506The ` process.memoryUsage() ` method returns an object describing the memory usage
15031507of the Node.js process measured in bytes.
@@ -1516,19 +1520,22 @@ Will generate:
15161520 rss: 4935680 ,
15171521 heapTotal: 1826816 ,
15181522 heapUsed: 650472 ,
1519- external: 49879
1523+ external: 49879 ,
1524+ arrayBuffers: 9386
15201525}
15211526```
15221527
1523- ` heapTotal ` and ` heapUsed ` refer to V8's memory usage.
1524- ` external ` refers to the memory usage of C++ objects bound to JavaScript
1525- objects managed by V8. ` rss ` , Resident Set Size, is the amount of space
1526- occupied in the main memory device (that is a subset of the total allocated
1527- memory) for the process, which includes the _ heap_ , _ code segment_ and _ stack_ .
1528-
1529- The _ heap_ is where objects, strings, and closures are stored. Variables are
1530- stored in the _ stack_ and the actual JavaScript code resides in the
1531- _ code segment_ .
1528+ * ` heapTotal ` and ` heapUsed ` refer to V8's memory usage.
1529+ * ` external ` refers to the memory usage of C++ objects bound to JavaScript
1530+ objects managed by V8.
1531+ * ` rss ` , Resident Set Size, is the amount of space occupied in the main
1532+ memory device (that is a subset of the total allocated memory) for the
1533+ process, including all C++ and JavaScript objects and code.
1534+ * ` arrayBuffers ` refers to memory allocated for ` ArrayBuffer ` s and
1535+ ` SharedArrayBuffer ` s, including all Node.js [ ` Buffer ` ] [ ] s.
1536+ This is also included in the ` external ` value. When Node.js is used as an
1537+ embedded library, this value may be ` 0 ` because allocations for ` ArrayBuffer ` s
1538+ may not be tracked in that case.
15321539
15331540When using [ ` Worker ` ] [ ] threads, ` rss ` will be a value that is valid for the
15341541entire process, while the other fields will only refer to the current thread.
@@ -2497,6 +2504,7 @@ cases:
24972504[ `'exit'` ] : #process_event_exit
24982505[ `'message'` ] : child_process.html#child_process_event_message
24992506[ `'uncaughtException'` ] : #process_event_uncaughtexception
2507+ [ `Buffer` ] : buffer.html
25002508[ `ChildProcess.disconnect()` ] : child_process.html#child_process_subprocess_disconnect
25012509[ `ChildProcess.send()` ] : child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
25022510[ `ChildProcess` ] : child_process.html#child_process_class_childprocess
0 commit comments