title: How to get the value of max_old_space_size from the code?
body: <p>As I understand it is possible to set a maximum memory usage limit for an application like this:</p>
  
  <pre><code>node --max_old_space_size=500 app.js
  </code></pre>
  
  <p>Is it possible to get a value of the <code>max_old_space_size</code> from the code?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>With the help of @Grégory NEUT we found out that <code>v8.getHeapStatistics()</code> contains a field <code>heap_size_limit</code> which looks like what I am looking for.</p>
  
  <p>However I'm still not sure about it since I didn't find any official documentation (or some piece of code from Node.js) which will approve this theory. </p>
  
  <p>I also don't understand why <code>heap_size_limit</code> becomes <code>557842432</code> bytes (<code>557.8</code> MB) when I set <code>max_old_space_size</code> to <code>500</code> MB</p>