Skip to content
Bruce Mitchener edited this page Jul 23, 2013 · 3 revisions

CPU count

We could use a method for determining the number of CPUs / cores available on a system. This would be a bit of C wrapped in Dylan.

For Windows, this is pretty much:

````c SYSTEM_INFO info; GetSystemInfo(&info);

return info.dwNumberOfProcessors;

And for Linux and Mac OS X:

``c return sysconf(_SC_NPROCESSORS_ONLN); ``

Something else is likely needed for FreeBSD.

Clone this wiki locally