title: Increase Electron Memory limit
body: <p>My electron app crashes as soon as the memory usage reaches 2,000 MB.</p>
  
  <p>I can test it by having this code in my main process file which intentionally raises the memory usage:</p>
  
  <pre><code>    const all = [];
      let big = [];
      all.push(big);
      for (let i = 0; i &lt; 2000000000; i++) {
        const newLen = big.push(Math.random());
        if (newLen % 500000 === 0) {
          big = [];
          all.push(big);
          console.log('all.length: ' + all.length);
          console.log('heapTotal: ' + Math.round(process.memoryUsage().heapTotal / 1e6));
        }
      }
      console.log(all.length);
  </code></pre>
  
  <p>I have tried everything:</p>
  
  <pre><code>require('v8').setFlagsFromString('--max-old-space-size=4096');
  
  app.commandLine.appendSwitch('js-flags', '--max-old-space-size=4096');
  </code></pre>
  
  <p>But nothing it working...</p>
  
  <p>Tested on electron v3.0.0-beta.12 AND on electron v2.0.9 ~ 2.0.x</p>
  
  <p><strong>How can I increase the memory limit on Electron &amp; not have my app crash as soon as it hits 2GB or RAM usage?</strong></p>