When calling the v8 module's getHeapStatistics function the heap_size_limit property is incorrect for memory sizes set over 4GB. Specifically if you set max_old_space >= 4032, heap_size_limit is incorrect. To reproduce:
node --max_old_space_size=3072
require('v8').getHeapStatistics().heap_size_limit
3288334336
This is as you would expect, but look at what 4096 does:
node --max_old_space_size=4096
require('v8').getHeapStatistics().heap_size_limit
67108864
64 MB???? That's not right. After some trial and error, the magic breaking point is 4032:
node --max_old_space_size=4032
require('v8').getHeapStatistics().heap_size_limit
0
Heap size of ZERO, when set to 4092.
This also happens on Mac OS X 10.11.6 and Node v5.11.0
Most helpful comment
https://github.com/nodejs/node/pull/10186