@@ -1488,6 +1488,9 @@ is no entry script.
1488
1488
<!-- YAML
1489
1489
added: v0.1.16
1490
1490
changes:
1491
+ - version: REPLACEME
1492
+ pr-url: https://github.com./nodejs/node/pull/31550
1493
+ description: Added `arrayBuffers` to the returned object.
1491
1494
- version: v7.2.0
1492
1495
pr-url: https://github.com./nodejs/node/pull/9587
1493
1496
description: Added `external` to the returned object.
@@ -1498,6 +1501,7 @@ changes:
1498
1501
* ` heapTotal ` {integer}
1499
1502
* ` heapUsed ` {integer}
1500
1503
* ` external ` {integer}
1504
+ * ` arrayBuffers ` {integer}
1501
1505
1502
1506
The ` process.memoryUsage() ` method returns an object describing the memory usage
1503
1507
of the Node.js process measured in bytes.
@@ -1516,19 +1520,22 @@ Will generate:
1516
1520
rss: 4935680 ,
1517
1521
heapTotal: 1826816 ,
1518
1522
heapUsed: 650472 ,
1519
- external: 49879
1523
+ external: 49879 ,
1524
+ arrayBuffers: 9386
1520
1525
}
1521
1526
```
1522
1527
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.
1532
1539
1533
1540
When using [ ` Worker ` ] [ ] threads, ` rss ` will be a value that is valid for the
1534
1541
entire process, while the other fields will only refer to the current thread.
@@ -2497,6 +2504,7 @@ cases:
2497
2504
[ `'exit'` ] : #process_event_exit
2498
2505
[ `'message'` ] : child_process.html#child_process_event_message
2499
2506
[ `'uncaughtException'` ] : #process_event_uncaughtexception
2507
+ [ `Buffer` ] : buffer.html
2500
2508
[ `ChildProcess.disconnect()` ] : child_process.html#child_process_subprocess_disconnect
2501
2509
[ `ChildProcess.send()` ] : child_process.html#child_process_subprocess_send_message_sendhandle_options_callback
2502
2510
[ `ChildProcess` ] : child_process.html#child_process_class_childprocess
0 commit comments