File tree 4 files changed +7
-2
lines changed
4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Returns an object with the following properties
15
15
total_heap_size: 7326976,
16
16
total_heap_size_executable: 4194304,
17
17
total_physical_size: 7326976,
18
+ total_available_size: 1152656,
18
19
used_heap_size: 3476208,
19
20
heap_size_limit: 1535115264
20
21
}
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const heapStatisticsBuffer =
22
22
const kTotalHeapSizeIndex = v8binding . kTotalHeapSizeIndex ;
23
23
const kTotalHeapSizeExecutableIndex = v8binding . kTotalHeapSizeExecutableIndex ;
24
24
const kTotalPhysicalSizeIndex = v8binding . kTotalPhysicalSizeIndex ;
25
+ const kTotalAvailableSize = v8binding . kTotalAvailableSize ;
25
26
const kUsedHeapSizeIndex = v8binding . kUsedHeapSizeIndex ;
26
27
const kHeapSizeLimitIndex = v8binding . kHeapSizeLimitIndex ;
27
28
@@ -34,6 +35,7 @@ exports.getHeapStatistics = function() {
34
35
'total_heap_size' : buffer [ kTotalHeapSizeIndex ] ,
35
36
'total_heap_size_executable' : buffer [ kTotalHeapSizeExecutableIndex ] ,
36
37
'total_physical_size' : buffer [ kTotalPhysicalSizeIndex ] ,
38
+ 'total_available_size' : buffer [ kTotalAvailableSize ] ,
37
39
'used_heap_size' : buffer [ kUsedHeapSizeIndex ] ,
38
40
'heap_size_limit' : buffer [ kHeapSizeLimitIndex ]
39
41
} ;
Original file line number Diff line number Diff line change @@ -26,8 +26,9 @@ using v8::Value;
26
26
V (0 , total_heap_size, kTotalHeapSizeIndex ) \
27
27
V (1 , total_heap_size_executable, kTotalHeapSizeExecutableIndex ) \
28
28
V (2 , total_physical_size, kTotalPhysicalSizeIndex ) \
29
- V (3 , used_heap_size, kUsedHeapSizeIndex ) \
30
- V (4 , heap_size_limit, kHeapSizeLimitIndex )
29
+ V (3 , total_available_size, kTotalAvailableSize ) \
30
+ V (4 , used_heap_size, kUsedHeapSizeIndex ) \
31
+ V (5 , heap_size_limit, kHeapSizeLimitIndex )
31
32
32
33
#define V (a, b, c ) +1
33
34
static const size_t kHeapStatisticsPropertiesCount =
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ var v8 = require('v8');
6
6
var s = v8 . getHeapStatistics ( ) ;
7
7
var keys = [
8
8
'heap_size_limit' ,
9
+ 'total_available_size' ,
9
10
'total_heap_size' ,
10
11
'total_heap_size_executable' ,
11
12
'total_physical_size' ,
You can’t perform that action at this time.
0 commit comments