.Net Memory Management & Garbage Collection « Ramani Sandeep's Blog

added by sandy060583
1/20/2010 7:47:34 AM

0 Kicks, 56 Views

The Microsoft .NET common language runtime requires that all resources be allocated from the managed heap. Objects are automatically freed when they are no longer needed by the application. When a process is initialized, the runtime reserves a contiguous region of address space that initially has no storage allocated for it. This address space region is the managed heap. The heap also maintains a pointer. This pointer indicates where the next object is to be allocated within the heap. Initially, the pointer is set to the base address of the reserved address space region.