title: Can C++ array end at memory boundary?
body: <p>C++ standard (and C for that matter) allows to create (not dereference though) a pointer to one element past the end of the array. Does this mean that an array will never be allocated at such a location that its last element ends at the memory boundary? I understand that in practice some/all implementation might follow this convention, but which one the following is true:</p>
  
  <ol>
  <li>It's actually false, and an array might end at memory boundary, OR</li>
  <li>It is mandated by C++ standard to end at least one element's worth of memory before the boundary, OR</li>
  <li>Neither 1, nor 2, but it is still like that in actual compilers because it makes  implementation easier.</li>
  </ol>
  
  <p>Is anything different for the case of C?</p>
  
  <p><strong>Update:</strong>
  It seems like <strong>1</strong> is the correct answer. See answer from James Kanze below, and also see <code>efence</code> (<a href="http://linux.die.net/man/3/efence">http://linux.die.net/man/3/efence</a> - thanks to Michael Chastain for the pointer to it)</p>