diff options
author | Roman Klauke <romaaan.git@gmail.com> | 2015-08-11 20:06:41 +0200 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2015-08-11 22:51:50 +0200 |
commit | ad7f74453dfe4b13738e13eaf039e73c3daf1fd8 (patch) | |
tree | fc0a7fe7183ccc6d80cce5f1cbded965681143be /lib/v8.js | |
parent | ae05807f0472fbe73b96660a93ae4b4924eb67ce (diff) | |
download | nodejs-ad7f74453dfe4b13738e13eaf039e73c3daf1fd8.tar.gz nodejs-ad7f74453dfe4b13738e13eaf039e73c3daf1fd8.tar.bz2 nodejs-ad7f74453dfe4b13738e13eaf039e73c3daf1fd8.zip |
src: add total_available_size to v8 statistics
v8 introduced the new flag `total_available_size` in version 4.4
and upwards. This flag is now available on `v8.getHeapStatistics`
with the name `total_available_size`. It contains the total
available heap size of v8.
Introduced with commit: v8/v8-git-mirror@0a1352a7
PR-URL: https://github.com/nodejs/io.js/pull/2348
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'lib/v8.js')
-rw-r--r-- | lib/v8.js | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -22,6 +22,7 @@ const heapStatisticsBuffer = const kTotalHeapSizeIndex = v8binding.kTotalHeapSizeIndex; const kTotalHeapSizeExecutableIndex = v8binding.kTotalHeapSizeExecutableIndex; const kTotalPhysicalSizeIndex = v8binding.kTotalPhysicalSizeIndex; +const kTotalAvailableSize = v8binding.kTotalAvailableSize; const kUsedHeapSizeIndex = v8binding.kUsedHeapSizeIndex; const kHeapSizeLimitIndex = v8binding.kHeapSizeLimitIndex; @@ -34,6 +35,7 @@ exports.getHeapStatistics = function() { 'total_heap_size': buffer[kTotalHeapSizeIndex], 'total_heap_size_executable': buffer[kTotalHeapSizeExecutableIndex], 'total_physical_size': buffer[kTotalPhysicalSizeIndex], + 'total_available_size': buffer[kTotalAvailableSize], 'used_heap_size': buffer[kUsedHeapSizeIndex], 'heap_size_limit': buffer[kHeapSizeLimitIndex] }; |