title: Global array allocation -- stack or heap?
body: <p>I'm compiling the following using Visual Studio 2008 for Windows.</p>
  
  <p>When I declare a global array as such:</p>
  
  <pre><code>//.cpp file
  
  // on a global scale
  // (i.e. outside any class definition)
  MY_ITEM glob_arr[1024];
  </code></pre>
  
  <p>where</p>
  
  <pre><code>//.h file
  extern MY_ITEM glob_arr[1024];
  
  class MyClass
  {
  public:
      MyClass()
      {
          //Start using glob_arr
          glob_arr[0].v = 0;
          //...
      }
  };
  </code></pre>
  
  <p>and</p>
  
  <pre><code>struct MY_ITEM{
      int v;
      WCHAR chrs[64];
  };
  </code></pre>
  
  <p>Where is <code>glob_arr</code> allocated -- from the stack or the process heap?</p>