Delphi-PRAXiS
Seite 3 von 4     123 4      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Level 2 Cache (https://www.delphipraxis.net/20423-level-2-cache.html)

Muetze1 21. Apr 2004 09:31

Re: Level 2 Cache
 
Moin!

Mir ging es nur um die Anzahl der Stellen daher die 1000, aber es wirklich völlig egal, da keine Werte zwischen 1000 und 1024 auftreten werden. Aber egal, ich habe es geändert...

MfG
Muetze1

Razor 10. Jun 2008 14:23

Re: Level 2 Cache
 
Delphi-Quellcode:
 Function CacheInfo(CacheID : Byte): Word;
    Begin
      Case CacheID Of
        $39, $3B,
        $41, $79 : Result := 128;

        $3C, $42,
        $7A, $82 : Result := 256;

        $43, $7B,
        $83, $86 : Result := 512;

        $44, $7C,
        $84, $87 : Result := 1024;

        $85, $45 : Result := 2048;

        $49: Result:=4096;
      Else
        Result := 0;
      End;
    End;
now it will detect even my cpu's cache :zwinker:

Muetze1 11. Jun 2008 17:42

Re: Level 2 Cache
 
Zitat:

Zitat von Razor
now it will detect even my cpu's cache :zwinker:

Nice, but who has your CPU? Why do you not do the whole job? Egoist... :wall:

Here the complete updated sub statement:
Delphi-Quellcode:
 Function CacheInfo(CacheID : Byte): Word;
    Begin
      Case CacheID Of
        $39, $3B,
        $41, $79 : Result := 128;

        $3A     : result := 192;

        $3C, $42,
        $7A, $82 : Result := 256;

        $3d     : result := 384;

        $3E, $43,
        $7B, $7f,
        $83, $86 : Result := 512;

        $44, $78,
        $7C,
        $84, $87 : Result := 1024;

        $85, $45,
        $7d     : Result := 2048;

        $49      : Result := 4096;

        $4e     : result := 6144;
      Else
        Result := 0;
      End;
    End;

Razor 12. Jun 2008 11:38

Re: Level 2 Cache
 
Sorry Muetze :| but i was only testing for my cpu,forgot to update it although i have lots of info about cache.My cpu is Intel Core 2 Q6600.

Do you have something similar for Level3 or 1?

Muetze1 12. Jun 2008 12:11

Re: Level 2 Cache
 
Zitat:

Zitat von Razor
Do you have something similar for Level3 or 1?

Zitat:

Zitat von Razor
although i have lots of info about cache.

I know you got the documentation from intel, so do it. It is similar to the existing code...

Razor 12. Jun 2008 12:12

Re: Level 2 Cache
 
If i have time ill do it.No promise.

DevidEspenschied 12. Jun 2008 12:46

Re: Level 2 Cache
 
We here in germany say: "Wer lesen kann, ist klar im Vorteil".

Simply have a look at Intels document #241618 (here). Table 3-7 on page 29 displays all Intel cache descriptors.

Weazy 12. Jun 2008 13:08

Re: Level 2 Cache
 
Wie wärs mit WMI? Wenn du den L2 Cache willst (Data und Instruction Memory) brauchst du viellecht eh noch mehr system informationen wie z.B L2 Cache Geschindigkeit, L1 Cache, CPU allgmein,... Mit WMI kann man schon ein recht umfangreiches System informationstool bauen :-D

DevidEspenschied 12. Jun 2008 13:14

Re: Level 2 Cache
 
Because this thread is written in english language, I'll answer in english too:

WMI would be another way, but via the CPUID instruction you have the direct access to the CPU. WMI gets some details from Windows, but that in a more general way. One advantage of the CPUID instruction is that you have special functions e.g. for the Intel Core2 processors or AMD Phenom processors, which aren't detectable in detail via WMI.

WMI and the CPUID instructrion are both very good documented. There is no disadvantage here.

To create a general information tool, WMI could be the first choice. But for a specific tool (and I believe he does develop such one) you need to access the CPU directly. Or do you believe that programs like CPU-Z, HWInfo32 or Everest detect their CPU data based upon WMI ? I don't think so.

Muetze1 12. Jun 2008 13:15

Re: Level 2 Cache
 
Zitat:

Zitat von Weazy
Wie wärs mit WMI? Wenn du den L2 Cache willst (Data und Instruction Memory) brauchst du viellecht eh noch mehr system informationen wie z.B L2 Cache Geschindigkeit, L1 Cache, CPU allgmein,... Mit WMI kann man schon ein recht umfangreiches System informationstool bauen :-D

1. L2 Cache hat keine Instruction/Data Aufteilung. Dies hat nur der L1 Cache
2. Wozu ein vorhandenes System komplett umstellen, vor allem da alle CPUs entsprechend diese Informationen im Ring 3 liefern?
3. Mich kotzen diese allgemeinen Threads an, wo mit dem Schlagwort WMI alle Antworten erschlagen werden. Das WMI System ist nicht wirklich aussagekräftig bzw. genau, da dort viele Informationen aus anderen Quellen gesammelt sind, welche von manchen Herstellern mehr und vielerorts auch minder nur mit Daten befüttert werden.

Meine persönliche Meinung: Geht mir weg mit dem WMI Mist. Entweder ich begebe mich in die Abhängigkeit der Gutwilligkeit der Hersteller oder anderer Leute oder ich ermittle mir die Daten selbst - und genau das ist hier nicht das Problem.

Ich kann eine Tür aufschliessen mit einem Schlüssel - genausogut kann ich die Scheibe der Tür mit einem Stein einwerfen oder die Tür auftreten - zur Not anzünden - rein kommen tue ich auch ohne Schlüssel - klar. Also ich bevorzuge den Schlüssel (CPUID) und ihr könnt von mir aus kokeln, treten und werfen mit dem WMI.


Alle Zeitangaben in WEZ +1. Es ist jetzt 21:57 Uhr.
Seite 3 von 4     123 4      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz