[Lazarus] Number of CPU threads

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Feb 24 23:44:34 CET 2011


On Thu, 24 Feb 2011 22:27:31 +0100
Kjow <antispammoni at gmail.com> wrote:

> Hi all!
> 
> Is it possible to determine the number of CPU threads available on an
> OS (Win, Linux, OSX: so cross platform way) with Lazarus/FPC? (e.g. A
> dual core = 2 threads, a Core i7 = 8 threads, etc)

See the package mtprocs unit mtpcpu for a simple heuristic:
http://wiki.lazarus.freepascal.org/Parallel_procedures#Getting_MTProcs

Mattias






More information about the Lazarus mailing list