title: Delete sub buffer from a dynamically created buffer
body: <pre><code>char* ptr = new char[512]; // also malloc() can be used
  ptr = ptr + 10;
  delete[] ptr; // free() if memory allocated by malloc
  </code></pre>
  
  <p>As we know while allocating memory new and malloc saves the allocated memory size somewhere (where? Depends on compiler implementation). This saved size value is used by delete and free() while freeing the memory. 
  In my case I moved the starting pointer by 10 bytes. My question is:
  Is it case of memory leak?
  Undefined behaviour?
  Or will it try to free next extra 10 bytes after 512?</p>