@@ -1510,6 +1510,9 @@ is no entry script.
1510
1510
<!-- YAML
1511
1511
added: v0.1.16
1512
1512
changes:
1513
+ - version: REPLACEME
1514
+ pr-url: https://github.com./nodejs/node/pull/31550
1515
+ description: Added `arrayBuffers` to the returned object.
1513
1516
- version: v7.2.0
1514
1517
pr-url: https://github.com./nodejs/node/pull/9587
1515
1518
description: Added `external` to the returned object.
@@ -1520,6 +1523,7 @@ changes:
1520
1523
* ` heapTotal ` {integer}
1521
1524
* ` heapUsed ` {integer}
1522
1525
* ` external ` {integer}
1526
+ * ` arrayBuffers ` {integer}
1523
1527
1524
1528
The ` process.memoryUsage() ` method returns an object describing the memory usage
1525
1529
of the Node.js process measured in bytes.
@@ -1538,19 +1542,22 @@ Will generate:
1538
1542
rss: 4935680 ,
1539
1543
heapTotal: 1826816 ,
1540
1544
heapUsed: 650472 ,
1541
- external: 49879
1545
+ external: 49879 ,
1546
+ arrayBuffers: 9386
1542
1547
}
1543
1548
```
1544
1549
1545
- ` heapTotal ` and ` heapUsed ` refer to V8's memory usage.
1546
- ` external ` refers to the memory usage of C++ objects bound to JavaScript
1547
- objects managed by V8. ` rss ` , Resident Set Size, is the amount of space
1548
- occupied in the main memory device (that is a subset of the total allocated
1549
- memory) for the process, which includes the _ heap_ , _ code segment_ and _ stack_ .
1550
-
1551
- The _ heap_ is where objects, strings, and closures are stored. Variables are
1552
- stored in the _ stack_ and the actual JavaScript code resides in the
1553
- _ code segment_ .
1550
+ * ` heapTotal ` and ` heapUsed ` refer to V8's memory usage.
1551
+ * ` external ` refers to the memory usage of C++ objects bound to JavaScript
1552
+ objects managed by V8.
1553
+ * ` rss ` , Resident Set Size, is the amount of space occupied in the main
1554
+ memory device (that is a subset of the total allocated memory) for the
1555
+ process, including all C++ and JavaScript objects and code.
1556
+ * ` arrayBuffers ` refers to memory allocated for ` ArrayBuffer ` s and
1557
+ ` SharedArrayBuffer ` s, including all Node.js [ ` Buffer ` ] [ ] s.
1558
+ This is also included in the ` external ` value. When Node.js is used as an
1559
+ embedded library, this value may be ` 0 ` because allocations for ` ArrayBuffer ` s
1560
+ may not be tracked in that case.
1554
1561
1555
1562
When using [ ` Worker ` ] [ ] threads, ` rss ` will be a value that is valid for the
1556
1563
entire process, while the other fields will only refer to the current thread.
@@ -2518,6 +2525,7 @@ cases:
2518
2525
[ `'exit'` ] : #process_event_exit
2519
2526
[ `'message'` ] : child_process.html#child_process_event_message
2520
2527
[ `'uncaughtException'` ] : #process_event_uncaughtexception
2528
+ [ `Buffer` ] : buffer.html
2521
2529
[ `ChildProcess.disconnect()` ] : child_process.html#child_process_subprocess_disconnect
2522
2530
[ `ChildProcess.send()` ] : child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
2523
2531
[ `ChildProcess` ] : child_process.html#child_process_class_childprocess
0 commit comments