-1

How do the stack, heap and stack frame conceptually map to c# constructs? How are the they all related?

trincot
  • 317,000
  • 35
  • 244
  • 286
Janie
  • 1,855
  • 2
  • 13
  • 9

1 Answers1

1

I'm going to make some assumptions about your question:

the .NET call stack (and info for individual frames) are directly accessible via the StackFrame and StackTrace classes in System.Diagnostics.

in .NET, the garbage collector manages "heap" allocations. There are 3 generations of objects, the oldest living in generation 2 at the bottom of the heap. generation 0 is where new objects get allocated from. In addition, large objects are allocated in a separate section.

Jimmy
  • 89,068
  • 17
  • 119
  • 137