Re: correct way to find if 32bits is an object pointer?
Re: correct way to find if 32bits is an object pointer?
- Subject: Re: correct way to find if 32bits is an object pointer?
- From: Lance Bland <email@hidden>
- Date: Tue, 19 Feb 2002 09:27:20 -0500
Ondra-
thanks for replying!
On Tuesday, February 19, 2002, at 09:05 AM, Ondra Cada wrote:
AFAIK, this is quite difficult. If you do need that, you have to first
check
whether the address itself is valid (see vm_region()), and if so, check
its
contents ("manually", ie. check whether the isa value is valid itself,
whether is has proper contents like the class name, etc.).
That is what I want, and what I was planning to do. It sounds pretty
complete to me. I don't see any pitfalls besides the unlikely situation
where a string matching a class name would just happen to be at the
right location in memory. What is the chance of that? :-) I just want to
make sure not to raise an exception when I do the checking.
Pardon? If you wanted to know whether the instance was created by the
"current executable image" code (instead of some library code), you are
out
of luck: this information is nowhere stored.
I didn't mean that. I meant something like your first description. I'm
looking for a function that does all of it otherwise I'll have to do a
"hack", exactly as you described.
Of course, I also want to make sure to eliminate any unlikely event like
the class string situation, but I don't know if that is possible - or if
there is a prescribed way of doing it that is designed to work and is
"official".
thanks-
-lance
_______________________________________________
Lance Bland
System Administrator at VVI
mailto:email@hidden
http://www.vvi.com
Realtime, bulk and web data reporting and visualization
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.