• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: correct way to find if 32bits is an object pointer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: correct way to find if 32bits is an object pointer?


  • Subject: Re: correct way to find if 32bits is an object pointer?
  • From: Ondra Cada <email@hidden>
  • Date: Tue, 19 Feb 2002 15:05:09 +0100

Lance,

>>>>>> Lance Bland (LB) wrote at Tue, 19 Feb 2002 08:43:05 -0500:
LB> before I look into a hack ... does anyone know the correct way to find
LB> if an arbitrary 32bit pattern (int) is an obj-c instance pointer

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.).

LB> in the current executable image?

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.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
2K Development: email@hidden http://www.2kdevelopment.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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.

  • Follow-Ups:
    • Re: correct way to find if 32bits is an object pointer?
      • From: Lance Bland <email@hidden>
References: 
 >correct way to find if 32bits is an object pointer? (From: Lance Bland <email@hidden>)

  • Prev by Date: correct way to find if 32bits is an object pointer?
  • Next by Date: Re: correct way to find if 32bits is an object pointer?
  • Previous by thread: correct way to find if 32bits is an object pointer?
  • Next by thread: Re: correct way to find if 32bits is an object pointer?
  • Index(es):
    • Date
    • Thread