DuraSoft
.NET-29
Memory Management and GC
•CLR administers area of Heap - Managed Heap
•Takes full control of object space allocation
•As objects created, memory allocated linearly
–this allows for fast allocation
–results in fragmentation though
•GC takes care of this
–invoked automatically when needed
–explicitly called by GC.Collect();
o1
o2
o3
o1
o2
o3
o4
O4 allocated
o1
o2
o4
O3 released
fragmented
o1
o2
o4
GC