title: WriteStream nodejs out memory
body: <p>I try to create a 20MB file, but it throws the error out of memory, set the max-old-space-size to 2gb, but still can someone explain to me why writing a 20mb stream consumes so much memory?</p>
  <p>I have 2.3 g.b of free memory</p>
  <pre><code>let size=20*1024*1024; //20MB
  
  for(let i=0;i&lt;size;i++){
       writeStream.write('A')
  }
  writeStream.end();
  </code></pre>