I am using https://www.npmjs.com/package/memory-usage to see how my Node application uses the memory, by running 'memory-usage app.js' in MACOS terminal. However, after some testing, it always crash at 1.4GB.
In normal nodejs command, to set the memory limit higher, I could just use 'node --max-old-space-size=8192 app.js'. However running 'memory-usage --max-old-space-size=8192 app.js' won't work.
My Mac has following RAM details:
BANK 0/DIMM0:
Size: 4 GB Type: DDR3 Speed: 1867 MHz
BANK 1/DIMM0:
Size: 4 GB Type: DDR3 Speed: 1867 MHz
What is the maximum size I can go for my Nodejs application and how to set that with memory-usage?
Thank you.