title: Allocating an array/pointer on the stack
body: <p>What is the standard procedure to allocate memory on the stack. I am currently creating a temporary array</p>
  
  <pre><code>const uint8_t _buf[buf_size];
  const uint8_t* buf = _buf;
  </code></pre>
  
  <p>I never use <code>_buf</code> again. I feel dirty. Is there a better way?</p>
  
  <p>Edit:</p>
  
  <p>The reason I need the pointer is because I am passing it to a function which increments the pointer. I dont believe this will work well with passing an array. Here are more details:</p>
  
  <pre><code>const uint8_t _buf[buf_size];
  const uint8_t* buf = _buf;
  buf_size = fread((void *)buf, 1, buf_size, file);
  // f increments the pointer in buf
  f(&amp;buf, &amp;buf_size);
  </code></pre>