Re: Determine if other process is running 32 or 64 bits
Re: Determine if other process is running 32 or 64 bits
- Subject: Re: Determine if other process is running 32 or 64 bits
- From: Greg Parker <email@hidden>
- Date: Wed, 16 Feb 2011 16:11:45 -0800
On Feb 16, 2011, at 3:59 PM, Jerry Krinock wrote:
> On 2011 Feb 16, at 12:05, Ken Thomases wrote:
>
>> If it's actually an application, and you can target 10.6, use -[NSRunningApplication executableArchitecture].
>
> Thanks, but need 10.5 support.
>
> I suppose I could spend hours searching all three of Apple's open-source sites:
>
> http://opensource.apple.com/
> http://www.apple.com/opensource/
> http://www.macosforge.org/
>
> to see if I could find the some code that fills in a kinfo_proc, but since the answer may in the end be "no", I'm going to forget this and use 'ps -ax -o flags' as I originally suggested. At least I have a proof-of-concept demo with that.
`top` knows about 64-bit processes and is available at opensource.apple.com. Try libtop_p_cputype() in libtop.c.
Be warned that top often does things that are not supported. You should call -[NSRunningApplication executableArchitecture] on 10.6+ and do whatever top does on 10.5 only.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden