title: memset used for memory allocation?
body: <p>i was looking at this example at msdn:</p>
  
  <p><a href="http://msdn.microsoft.com/en-us/library/ms894209.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms894209.aspx</a></p>
  
  <pre><code>DWORD dwResult;
  
  MEMORY_BASIC_INFORMATION mbiMemory;
  
  // Clear the results structure.
  memset (&amp;mbiMemory, 0, sizeof(MEMORY_BASIC_INFORMATION));
  
  dwResult = VirtualQuery (lpPage,        // Page to examine
                       &amp;mbiMemory,    // Structure for results
                       sizeof(MEMORY_BASIC_INFORMATION));
  
  if (sizeof(MEMORY_BASIC_INFORMATION) != dwResult)
  {
  
      // Your error-handling code goes here.
  
  }
  </code></pre>
  
  <p>seems like they use memset as a way to allocate memory to mbiMemory. Is it ok? wont i run over some memory this way? thanks!</p>