title: Why is my program leaking Virtual Memory?
body: <p>In search of memory leak, I have been using MemProof and be able to see live counts of resources being used, created and destroyed. After having run my program for over a day and half, I have noticed that everything else being constant or less, Virtual Memory (VM) is increasing in counts. It started out at 109 and now it is at 113 after 24 hours.</p>
  
  <p>This is what MemProof says for each VM leak:</p>
  
  <p>VirtualAlloc(address_location, 16384, 4096, 4); It is identified as Virtual Memory and its size is always 16384. API name is VirtualAlloc. The module is kernel32.dll.</p>
  
  <p>Furthermore, memproof says, "virtualalloc reserves or commits a region of pages in the virtual address space of the calling process. Allocated pages must be freed with virtualFree when no longer needed."</p>
  
  <p>VM leak is associated with a function in the file System.Pas.</p>
  
  <p>The function is as follows:</p>
  
  <pre><code>function GetCmdShow: Integer;
  var
    SI: TStartupInfo;
  begin
    Result := 10;                  { SW_SHOWDEFAULT }
    GetStartupInfo(SI);
    if SI.dwFlags and 1 &lt;&gt; 0 then  { STARTF_USESHOWWINDOW }
      Result := SI.wShowWindow;   
  end;  &lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;
  </code></pre>
  
  <p>I have the less than signs pointing at the key word "end" is where Memproof takes me to when I click on virtual memory leak(s).</p>
  
  <p>So, what does this mean?</p>