|
From: | Wolfgang Lux |
Subject: | Re: NSProcessInfo -processorCount, -activeProcessorCount, -physicalMemory |
Date: | Fri, 14 Nov 2008 23:06:35 +0100 |
Richard Frith-Macdonald wrote:
Not sure, but for the sysctlbyname() case, don't you have to pass on &len as well? There must be a reason why you set up that variable, so most likely that system call is expecting it :-)Thanks... missed that ... I don't have a bsd system to test on, so I can't even be sure this stuff would build on bsd... we do need people to test this.
It works on FreeBSD. Darwin uses hw.activecpu not activecpu. I've taken the liberty to update in svn. In addition, I've replaced the long by an int which better matches the header files on both (though this will make a difference only on big-endian 64-bit machines :-).
Wolfgang
[Prev in Thread] | Current Thread | [Next in Thread] |