PSApi -> Speicher-Information



  • Hi,

    ich bin auf der Suche nach einer Möglichkeit unter Windows herauszufinden, wieviel Arbeitsspeicher das aktuelle Programm einnimmt.

    So wie ich das sehe bin ich da mit der PSApi gut bedient.

    Ich habe ein Beispiel "Collecting Memory Usage Information For a Process" unter http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/collecting_memory_usage_information_for_a_process.asp gefunde. Es stellt sich nun die Frage, welche Zahl für mich relevant is; angeboten wird:

    cb
    Size of the structure, in bytes.

    PageFaultCount
    Number of page faults.

    PeakWorkingSetSize
    Peak working set size, in bytes.

    WorkingSetSize
    Current working set size, in bytes.

    QuotaPeakPagedPoolUsage
    Peak paged pool usage, in bytes.

    QuotaPagedPoolUsage
    Current paged pool usage, in bytes.

    QuotaPeakNonPagedPoolUsage
    Peak nonpaged pool usage, in bytes.

    QuotaNonPagedPoolUsage
    Current nonpaged pool usage, in bytes.

    PagefileUsage
    Current space allocated for the pagefile, in bytes. Those pages may or may not be in memory.

    PeakPagefileUsage
    Peak space allocated for the pagefile, in bytes.

    Was macht da Sinn?

    Gruss, K.B.



  • Nimm "PagefileUsage" (auch "Private bytes" genannt).
    Das ist zumindest der Speicher, der meistens "Leaked"...

    Du nimmst aber schon GetProcessMemoryInfo, oder?



  • Vielen Dank für den Hinweis.
    Gruss, K.B.


Anmelden zum Antworten