the right way of using go_through_object

Archana <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.rotor
Message-ID <Pine.LNX.4.44.0307241054030.14162-100000@purana.csa.iisc.ernet.in>
Hi,
 When i tried to insert code to do scavenging using the go_through_object
macro, i am running into an infinite loop, can you please point out
where i am going wrong,
[ for the time being i am looking at only the minor collection]

To avoid looping endlessly when i removed the lines 17-23 i get a
corrupted object ref which i presume is due to some object not being copied.

1.for each root {
2. if(root!=NULL and root contains pointers) {
3.  go_through_object (method_table (root), root, size(root), xx,
4.                              {
5.                               relocateChild(xx);
6.                              }
7.  );
8. }
9.}
10.relocateChild(obj) {
11. if(generation(*obj)==0) {//consider only young objects
12.  if(*obj is valid) {
13.   if(*obj.relocated address == NULL) {
14.    copy_object_simple(obj)
15.   }
17.   if(*obj && contain_pointers(*obj)) {
18.     go_through_object(method_table(*obj),*obj,size(*obj),xx,
19.     {
20.        relocateChild(xx);
21.     }
22.     );
23.   }
24.  }
25. }
26.} //end relocateChild

Thanks and Regards
archana
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.