English
Source / code snippets

Getprocessmemoryinfo Processqueryinformation Process memory

 
again one tolles Codepiece of Andreas Miethe:
CompileMarkSeparation
'##############################################
'# Autor           : ampsoft (Andreas Miethe) #
'# Datum           : 11.02.2012               #
'# Thema           : Speicher                 #
'# XProfan-Version : 8                        #
'# ab Windows XP                              #
'##############################################
 $H Windows.ph
STRUCT PROCESS_MEMORY_COUNTERS =\
lCb&,\
lPageFaultCount&,\
lPeakWorkingSetSize&,\
lWorkingSetSize&,\
lQuotaPeakPagedPoolUsage&,\
lQuotaPagedPoolUsage&,\
lQuotaPeakNonPagedPoolUsage&,\
lQuotaNonPagedPoolUsage&,\
lPagefileUsage&,\
lPeakPagefileUsage&,\
lPrivat&
CLS

Proc GetInfo

    Declare PID&,hprocess&,PMC#
    PID& = External("kernel32.dll","GetCurrentProcessId")
    hProcess& = ~OpenProcess(~PROCESS_QUERY_INFORMATION | ~PROCESS_VM_READ,0,PID&)
    Dim PMC#,PROCESS_MEMORY_COUNTERS
    External("psapi.dll","GetProcessMemoryInfo",hProcess&,PMC#,Sizeof(PMC#))
    Print Format$("PageFaultCount                  : ###,## KB",(PMC#.lPageFaultCount&)/1024)
    Print
    Print Format$("Arbeitssatz (Speicher)          : ###,## KB",(PMC#.lWorkingSetSize&)/1024)
    Print Format$("Arbeitssatz (Speicher Peak)     : ###,## KB",(PMC#.lPeakWorkingSetSize&)/1024)
    Print
    Print Format$("PageFile                        : ###,## KB",(PMC#.lPageFileUsage&)/1024)
    Print Format$("PeakPagefile                    : ###,## KB",(PMC#.lPeakPageFileUsage&)/1024)
    Print Format$("QuotaPeakPagedPoolUsage         : ###,## KB",(PMC#.lQuotaPeakPagedPoolUsage&)/1024)
    Print Format$("QuotaPagedPoolUsage             : ###,## KB",(PMC#.lQuotaPagedPoolUsage&)/1024)
    Print Format$("QuotaPeakNonPagedPoolUsage      : ###,## KB",(PMC#.lQuotaPeakNonPagedPoolUsage&)/1024)
    Print Format$("QuotaNonPagedPoolUsage          : ###,## KB",(PMC#.lQuotaNonPagedPoolUsage&)/1024)
    Print Format$("Privat                          : ###,## KB",(PMC#.lPrivat&)/1024)
    ~Closehandle(hProcess&)
    Dispose PMC#

EndProc

Declare Ende&
GetInfo()
Ende& =0
SetTimer 500

WhileNot ende&

    WaitInput

    If %wmtimer

        Locate 0,0
        GetInfo()

    EndIf

EndWhile

Killtimer
=s4 href='./../../Function-References/XProfan/end/'>End
 
03/28/12  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.931 Views

Untitledvor 0 min.
RudiB.08/17/22
p.specht11/21/21
R.Schneider11/20/21
Uwe Lang11/20/21
More...

Themeninformationen

this Topic has 1 subscriber:

iF (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie