In nodejs v8 module, there\'s a function called getHeapStatistics which return an object that contains information about memory usage:
{
total_heap_size:
There's V8 API documentation directly generated from the sources, but the details of HeapStatistics are not explained.
Some good explanation from gc-heap-stats package:
From Node.JS docs:
Self descriptive: