How do the stack, heap and stack frame conceptually map to c# constructs? How are the they all related?
Asked
Active
Viewed 490 times
-1
-
What's a frame (here) and in general, what do you mean? Hardly looks like a real question. – H H Jul 30 '09 at 22:29
-
1I assume he means a stack frame – zebrabox Jul 30 '09 at 22:32
-
1Very fuzzy question, Janie. Which constructs did you have in mind? Gotta downvote this one, at least until you clear it up. – John Saunders Jul 30 '09 at 23:14
1 Answers
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