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