title: Where is a VB.NET Static variable stored?
body: <p>I want to know where a VB.NET local static variable is stored in the program's virtual address space, and how does a sub-routine/method retain its value between calls?</p>
  
  <p>I have searched extensively online in order to understand the VB.NET virtual address space for a process.  There are plenty of diagrams and explanations for Java and C running on Linux, which include an area in virtual memory known 'shared' or 'data', but it is harder to find something specifically about VB.NET. As far as I can see, .NET does not utilise an area in the virtual address space of a process called 'shared'.  My question is, where is the data for a local static variable stored, and how does a sub-routine/method regain access to it between each time it is called?  Intuitively, I presume the shared variable's data is stored on one of the heaps (LOH or SOH) depending on size, and the sub-routine/method has a reference to this on it's stack.  But if the sub-routine ends, the stack frame is removed and the reference is lost.  How does it regain this reference?  </p>