[fpc-pascal] number of cpu cores

JoshyFun joshyfun at gmail.com
Sat Dec 13 18:36:58 CET 2008


Hello Mattias,

Saturday, December 13, 2008, 5:17:31 PM, you wrote:

MG> At the moment I have the attached function.
MG> It returns only 4 on a 2 x quad core Mac.
MG> Maybe someone can test under windows?

Windows XP running P3000 hyperthreading returns 2 cores (as expected)
but using FPC 2.2.2 the line:

Mask := 1 shl i;

must be changed by

Mask := DWORD(1) shl i;

or it raises a runtime 201 error when i = 31.

-- 
Best regards,
 JoshyFun




More information about the fpc-pascal mailing list