http://www.iecc.com/gclist/GC-algorithms.html#Generational%20collection
I am not sure file you are looking at provides all the answers. What is happening here is card table(Writebarrier's target) is just used for remembering objects referenced from gen1/large object heap(little different way of using writebarrier). For gen0 it is copying collection using first fit (copy_phase)and for gen1 it is mark and sweep(starting with unmarked object to create free objects list). So we see if the pointer being assigned to another place is in young generation as this is the pointer which will get copied and relocated. Does that make sense? If the destination is in gen0 it will get anyway get copied, gen1 stuff will have the mark and sweep. The write barrier is only used for intra-generational pointers. Card table is aided by the brick table to find objects which have been modified. Card table is the one affected by the Jithelp.asm(WriteBarrierHelper) and gcee.cpp(ErectWriteBarrier). Check up gc_heap::garbage_collect, gc_heap::gc1, gc_heap::copy_phase, copy_through_cards_for_segments (how to use those two structures to find the object) Regards Govind -----Original Message----- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Saturday, January 01, 2005 6:34 PM To: DOTNET-ROTOR@DISCUSS.DEVELOP.COM Subject: about the write barrier Hi, (wrt Rotor v1.0) for a statement *dst=ref, the barrier code checks whether ref is in the young generation or not. however it is not clear whether it checks whether dst belongs to the old generation or not? since the code in gcee.cpp only checks whether dst is a valid heap reference. does that mean the barrier passes the test even if dst belongs to the young generation? Wishing all of you a very Happy new Year! --archana =================================== This list is hosted by DevelopMentor(r) http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com