Correct - the two pointers are just a macro-level check that may produce a false-positive, while IsHeapPointer() produces definitive anwsers.
IsObjRefValid() is also a helper function which may return a false-positive. It is only called within _ASSERTE() macros, so it is debug-only code. It is used to catch "bad" pointers that cannot possibly be pointing into the GC heaps. I believe you could just hard-code g_lowest_address to 0 and g_highest_address to 0xffffffff and the SSCLI would continue to function correctly. Barry This posting is provided "AS IS" with no warranties, and confers no rights. -----Original Message----- From: Archana Ravindar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 18, 2002 10:13 PM To: [EMAIL PROTECTED] Subject: Re: [DOTNET-ROTOR] gc heap structure for rotor > Barry Bond wrote: > > > For example, take a look at GCHeap::IsHeapPointer() in > > sscli/src/clr/src/vm/gcsmp.cpp. You can see the range-check that > > the pointer is between g_lowest_address and g_highest_address, and > > only if it is, IsHeapPointer() calls gcheap::find_segment to > > determine which (if > > any) GC heap segment contains the pointer. that means to say, the parameters are for checking at a macro level and IsHeapPointer() is a more detailed check? Is it ok, if an address is validated to be a legal GC heap addr (but since there might be gaps inbetween it is actually does not belong to any of the spaces) this situation might occur since threads.h defines a function IsObjRefValid that doesnt call IsHeapPointer() and uses only the lowest and highest addresses to decide. > thank you, > archana