English
Source / code snippets

occupied Prog Ram how much Workingsetsize

 

Jac
de
Lad
Gibts a API with the itself rausfinden can, how much RAM my Prog uses ()vaguely so, How the Taskmanager the indicating)?

Jac
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/13/08  
 



Know so did i gladly!
 
02/13/08  
 




Sebastian
König
under NT-based system can itself Perhaps herewith something begin:
CompileMarkSeparation
 $H windows.ph
Cls
declare hToken&
~OpenProcessToken(~GetCurrentProcess(),~TOKEN_ADJUST_PRIVILEGES,Addr(hToken&))

if hToken& <> 0

    declare priv#
    dim priv#,16

    if External(ADVAPI32.DLL,LookupPrivilegeValueA,,SeDebugPrivilege,priv#+4) <> 0

        long priv#,0 = 1
        long priv#,12 = ~SE_PRIVILEGE_ENABLED
        External(ADVAPI32.DLL,AdjustTokenPrivileges,hToken&,0,priv#,SizeOf(priv#),0,0)

    endif

    dispose priv#
    ~CloseHandle(hToken&)

endif

declare id&
print ID (current =, ~GetCurrentProcessId();):,
input id&
declare hProcess&
let hProcess& = ~OpenProcess(~PROCESS_ALL_ACCESS,0,id&)

ifnot hProcess&

    print Prozess konnte nicht geöffnet werden :-(
    print Taste zum Beenden!
    WaitKey
    end

endif

print Handle:,hProcess&
print -------------------
declare pMem#,size&
dim pMem#,44
External(NTDLL.DLL,ZwQueryInformationProcess,hProcess&,3,pMem#,44,Addr(size&))
print PeakVirtualSize:,long(pMem#,0)  1024,KB
print VirtualSize:,long(pMem#,4)  1024,KB
dispose pMem#
~CloseHandle(hProcess&)
color 0,15
print
print
print Taste zum Beenden!
WaitKey
./../Function-References/XProfan/end/'>end

what there is determined, is though The Size the kompletten virtual Speicherbereichs, whom one Process occupied...

HTH

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
02/13/08  
 




Jac
de
Lad
no, this is something other...
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/13/08  
 




Sebastian
König
Hah, but almost! Ergänz times the spending around the row

print WorkingSetSize:,long(pMem#,16) 1024,KB

After my Tests is the exactly the worth, the in task-Manger displayed becomes...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
02/13/08  
 




Jac
de
Lad
I see, coole thing, thanks.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/13/08  
 




Jac
de
Lad
but ne allgemeingültige function not? I mean for all WIndows-versions.
 
Profan² 2.6 bis XProfan 11.1+XPSE+XPIA+XPRR (und irgendwann XIDE)
Core2Duo E8500/T2250, 8192/1024 MB, Radeon HD4850/Radeon XPress 1250, Vista64/XP
02/13/08  
 




Sebastian
König
Jac
but ne allgemeingültige function not? I mean for all WIndows-versions.


Yes, is How said only for NT-based systems. for Win9x/ME there Perhaps another Possibility... but who using the already yet?

and another remark: If it only around the own Process goes, can itself AdjustTokenPrivileges-part well save. The might with eingeschränkten Benutzerkonten too schief weg...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
02/13/08  
 




Thomas
Zielinski
Sebastian king
Yes, is How said only for NT-based systems. for Win9x/ME there Perhaps another Possibility... but who using the already yet?


The MMJ uses the everything yet each friday in the week
 
XProfan X4; Win10 x64
Der Kuchen ist eine lüge!
02/13/08  
 



@Thomas: the would then means 1:0,0000000025 ?
 
02/13/08  
 




Thomas
Zielinski
If I the jetz with the me to verfügungung stehenden Statistiken integrally Unwissentschaftlich roughly Überschlage could the with one bissl Happiness voices.
 
XProfan X4; Win10 x64
Der Kuchen ist eine lüge!
02/13/08  
 



it is correct too then if you it without available stehende Statistiken completely scientific spare of Happiness exakt ermittelst.
 
02/13/08  
 




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

42.083 Views

Untitledvor 0 min.

Themeninformationen



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