title: memcpy c++ - crashing
body: <p>I have a very simple routine (at least should be simple)</p>
  
  <p>I create a large char array and I am copying data to it as I receive it moving. After about the third iteration the app crashes.</p>
  
  <p>first create a large buffer</p>
  
  <pre><code>_buffer = new char(7931880);
  
  ...
  
  void writeData(char* newData,size_t size)
  {
    memcpy(_buffer,newData,size); //this call succeeds the first 4 times then fails bytes received
   _buffer+=size;                 //(size) is never larger than 16000
  }
  </code></pre>