Click here to Skip to main content
15,905,229 members
Home / Discussions / C#
   

C#

 
GeneralRe: root in managed heap Pin
George_George19-Apr-08 23:21
George_George19-Apr-08 23:21 
GeneralRe: root in managed heap Pin
Jordanwb20-Apr-08 4:06
Jordanwb20-Apr-08 4:06 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 2:37
sitebuilderLuc Pattyn20-Apr-08 2:37 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 3:16
George_George20-Apr-08 3:16 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 3:38
sitebuilderLuc Pattyn20-Apr-08 3:38 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 4:42
George_George20-Apr-08 4:42 
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 13:03
sitebuilderLuc Pattyn20-Apr-08 13:03 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 19:20
George_George20-Apr-08 19:20 
Thanks Luc,


I read your points before again. Your approach of checking whether an object is live or not in heap is to check whether there are any reference from stack.

I agree but I am not sure whether it is enough in general situations. Why you do not check whether there are reference from not only stack variable, but also from heap variable -- to decide whether an object is live or not? Smile | :)

--------------------
I was inaccurate for the heap; most systems use a variation of this scheme:
- stop all threads;
- walk the heap ONLY to mark all objects as dead;
- then perform the algorithm based on the thread stacks (and CPU registers),
marking the live objects as not-dead (see below);
- resume all threads;
- walk the heap to delete all objects that are still marked dead.
There are different schemes (e.g. for better real-time behavior, not really a Windows thing),
for better performance (with generations, implemented in MS .NET), etc. Some are completely
different (e.g. based on reference counts, which is very hard to get right
in cyclic situations). The last step (delete) can be delegated to another (low-prio)
thread.
--------------------


regards,
George
GeneralRe: root in managed heap Pin
Luc Pattyn20-Apr-08 22:42
sitebuilderLuc Pattyn20-Apr-08 22:42 
GeneralRe: root in managed heap Pin
George_George20-Apr-08 23:46
George_George20-Apr-08 23:46 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 0:32
sitebuilderLuc Pattyn21-Apr-08 0:32 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 1:08
George_George21-Apr-08 1:08 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 1:23
sitebuilderLuc Pattyn21-Apr-08 1:23 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 2:04
George_George21-Apr-08 2:04 
GeneralRe: root in managed heap Pin
Luc Pattyn21-Apr-08 4:00
sitebuilderLuc Pattyn21-Apr-08 4:00 
GeneralRe: root in managed heap Pin
George_George21-Apr-08 4:16
George_George21-Apr-08 4:16 
GeneralFileStream.Read(); Pin
Ian Uy19-Apr-08 18:33
Ian Uy19-Apr-08 18:33 
GeneralRe: FileStream.Read(); Pin
Zoltan Balazs20-Apr-08 0:11
Zoltan Balazs20-Apr-08 0:11 
GeneralRe: FileStream.Read(); Pin
Ian Uy20-Apr-08 1:14
Ian Uy20-Apr-08 1:14 
GeneralComboBox not properly adding items Pin
Jordanwb19-Apr-08 14:10
Jordanwb19-Apr-08 14:10 
GeneralRe: ComboBox not properly adding items Pin
Luc Pattyn19-Apr-08 15:12
sitebuilderLuc Pattyn19-Apr-08 15:12 
GeneralRe: ComboBox not properly adding items Pin
Jordanwb19-Apr-08 15:53
Jordanwb19-Apr-08 15:53 
GeneralRe: ComboBox not properly adding items Pin
Luc Pattyn19-Apr-08 16:09
sitebuilderLuc Pattyn19-Apr-08 16:09 
GeneralRe: ComboBox not properly adding items Pin
Jordanwb19-Apr-08 16:27
Jordanwb19-Apr-08 16:27 
GeneralRe: ComboBox not properly adding items Pin
Luc Pattyn19-Apr-08 22:59
sitebuilderLuc Pattyn19-Apr-08 22:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.