Revised CPUID/cache info - for review
Don
nospam at nospam.com.au
Wed Sep 17 01:44:10 PDT 2008
The attached code is a revision of my cache detection code, and also
serves as a replacement for std.cpuid.
With the 'toString' function removed, it should also be suitable for
Tango, as it has no dependencies and generates no heap activity.
It fixes several problems with std.cpuid. Most importantly, it works for
non-Intel/non-AMD X86 processors (yes, they do exist), and has a
reasonable degree of future-proofing.
I've removed some bad-practice functions (eg, you should NEVER test if
the vendor is Intel) and replaced them with more appropriate ones.
I've included stubs for PowerPC and Sparc, and most of the logic should
also work with Itanium.
But I don't have much free time, and the code is rather messy.
Please confirm that it works on your system. If anyone has the time to
tidy it up, that would be most appreciated.
-Don
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cache.d
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080917/9739d4f2/attachment.ksh>
More information about the Digitalmars-d
mailing list