The only way to see in the current implementation whether the given object is pinned is by scanning all GC roots. The GC_CALL_PINNED flag is going to be set in the callback for objects that are pinned.
The handle table is not the only part of the code that can pin objects: the callback from the JIT and from EE Frames can cause GC_CALL_PINNED to be set as well (look for GC_CALL_PINNED in FJIT_eetwain.cpp and frames.cpp). Note that the handle creation itself is not going to cause the pin bit to be set on the target object immediately in the Rotor GC. The pin bit on the target object is set only to pass information between GC phases while the GC is in progress. It is set in one GC phase and cleared in the later phase. -Jan This posting is provided "AS IS" with no warranties, and confers no rights. -----Original Message----- From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL PROTECTED] On Behalf Of Archana Sent: Thursday, February 05, 2004 5:54 AM To: [EMAIL PROTECTED] Subject: [DOTNET-ROTOR] about Pinning objects Hi, Is there someway to find out that - 'a certain object X is no longer pinned' ? For instance in the test program sscli/tests/gc/methodical/pinning/pinningother/pinnedcollect.exe, a handle(handle1) is created to pin 'arr'. this causes the pin bit to be set for object arr. But the rotor GC mechanism sees to it that it becomes a part of the non-moving area and removes the pin bit. the problem is that the collector which i am interfacing with rotor is a copying one. and i have to ensure that the GC knows when an object is no longer pinned so that it can take further action. In the test program, Theres a call to handle1.Free(). Can this call be used to communicate this information? or is there someother way it can be done? -- Thanks, Archana =================================== This list is hosted by DevelopMentor(r) http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorŪ http://www.develop.com NEW! ASP.NET courses you may be interested in: 2 Days of ASP.NET, 29 Sept 2003, in Redmond http://www.develop.com/courses/2daspdotnet Guerrilla ASP.NET, 13 Oct 2003, in Boston http://www.develop.com/courses/gaspdotnet View archives and manage your subscription(s) at http://discuss.develop.com