English
Forum

Completed: the display the Speichergrösse...

 
Hello all...
Frank Abbing has with the Representation of the Speichergrössen-indicated from my Untertool system-Information Problems. with some Values shows his system one MInuszeichen to whom Values and the values are wrong !
here have I the code (vereinfacht) included and hope on Tipps. On my system go The values namely correct displayed. in the Thread What is really... are a couple Screenshots the help made get.
CompileMarkSeparation
DECLARE sp%,ze%,steig%
sp%=10:ze%=20:steig%=30
DECLARE Memorystatus#
DECLARE speicher$,physik$,freiP$,auslg$,ausF$,virtuell$,virtuellF$,I%
------------------------------------------------------------------------------------------

PROC SPEICHER_ANZEIGE

    USEFONT COURIER NEW,18,0,0,0,0
    Def Globalmemorystatus(1) !KERNEL32,GlobalMemoryStatus
    Decimals 2
    Dim Memorystatus#,32
    Long Memorystatus#,0=32
    Globalmemorystatus(Memorystatus#)
    -----------------------------------------------------------------------------------------
    speicher$=Str$(Long(Memorystatus#,4))
    I%=LEN(speicher$)
    case LT(I%,9):speicher$=MKSTR$( ,9-I%)+speicher$
    DrawText sp%,ze%, 1.  Speicher in Gebrauch:               +speicher$+ %
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    physik$=Str$(((Long(Memorystatus#,8)/1024)/1024))
    I%=LEN(physik$)
    case LT(I%,12):physik$=MKSTR$( ,12-I%)+physik$
    DrawText sp%,ze%, 2.  Physikalischer Speicher gesamt:     +physik$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    freiP$=Str$(((Long(Memorystatus#,12)/1024)/1024))
    I%=LEN(freiP$)
    case LT(I%,12):freiP$=MKSTR$( ,12-I%)+freiP$
    DrawText sp%,ze%, 3.  Freier physikalischer Speicher:     +freiP$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    auslg$=Str$(((Long(Memorystatus#,16)/1024)/1024))
    I%=LEN(auslg$)
    case LT(I%,12):auslg$=MKSTR$( ,12-I%)+auslg$
    DrawText sp%,ze%, 4.  Größe der Auslagerungsdatei:        +auslg$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    ausF$=Str$(((Long(Memorystatus#,20)/1024)/1024))
    I%=LEN(ausF$)
    case LT(I%,12):ausF$=MKSTR$( ,12-I%)+ausF$
    DrawText sp%,ze%, 5.  Frei in der Auslagerungsdatei:      +ausF$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    virtuell$=Str$(((Long(Memorystatus#,24)/1024)/1024))
    I%=LEN(virtuell$)
    case LT(I%,12):virtuell$=MKSTR$( ,12-I%)+virtuell$
    DrawText sp%,ze%, 6.  Gesamter virtueller Speicher:       +virtuell$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    virtuellF$=Str$(((Long(Memorystatus#,28)/1024)/1024))
    I%=LEN(virtuellF$)
    case LT(I%,12):virtuellF$=MKSTR$( ,12-I%)+virtuellF$
    DrawText sp%,ze%, 7.  Freier virtueller Speicher:         +virtuellF$+ MB
    -----------------------------------------------------------------------------------------
    Dispose Memorystatus#

ENDPROC

####################################################
CLS
speicher_anzeige
Waitinput
s4 href='./../../Function-References/XProfan/end/'>end

thanks in the ahead for Help
greeting
horst
 
09/19/07  
 




RGH
Hi,

there XProfan only vorzeichenbehaftete Longints knows, The To maximum concise over 2 Mia. weg, can of your program no Speichergrößen over 2 GB showing.

The worth, whom You with Size the Auslagerungsdatei angibst, is evident the most zugesicherte memory, means Physikalischer memory + Auslagerungsdatei (Size of the committed memory limit). with Systemen with 1024 MB RAM totals this but in the rule More as 2 GB.

Solution: If the MB-worth negative is, add simply 4096 moreover and the Result is correct. On these point can values up to 4 GB showing .... and More creates too The from you relative API not.

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
09/19/07  
 



@Roland
thanks for speedy Help.
then I will dochmal my memory arm (yet 512). thereafter can I Yes then with of/ one IF...ENDIF - Loop too whom drop solve
greeting
horst
 
09/19/07  
 




RGH
an Loop need not. with the function OhneVorzeichen(Wert&) goes it komfortabler:
CompileMarkSeparation
DECLARE sp%,ze%,steig%
sp%=10:ze%=20:steig%=30
DECLARE Memorystatus#
DECLARE speicher$,physik$,freiP$,auslg$,ausF$,virtuell$,virtuellF$,I%
------------------------------------------------------------------------------------------

PROC OhneVorzeichen

    Parameters Wert&
    Return If(Wert& < 0, Int(Wert& + 4096), Wert&)

ENDPROC

PROC SPEICHER_ANZEIGE

    USEFONT COURIER NEW,18,0,0,0,0
    Def Globalmemorystatus(1) !KERNEL32,GlobalMemoryStatus
    Decimals 2
    Dim Memorystatus#,32
    Long Memorystatus#,0=32
    Globalmemorystatus(Memorystatus#)
    -----------------------------------------------------------------------------------------
    speicher$=Str$(Long(Memorystatus#,4))
    I%=LEN(speicher$)
    case LT(I%,9):speicher$=MKSTR$( ,9-I%)+speicher$
    DrawText sp%,ze%, 1.  Speicher in Gebrauch:               +speicher$+ %
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    physik$=Str$(OhneVorzeichen((Long(Memorystatus#,8)/1024)/1024))
    I%=LEN(physik$)
    case LT(I%,12):physik$=MKSTR$( ,12-I%)+physik$
    DrawText sp%,ze%, 2.  Physikalischer Speicher gesamt:     +physik$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    freiP$=Str$(OhneVorzeichen((Long(Memorystatus#,12)/1024)/1024))
    I%=LEN(freiP$)
    case LT(I%,12):freiP$=MKSTR$( ,12-I%)+freiP$
    DrawText sp%,ze%, 3.  Freier physikalischer Speicher:     +freiP$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    auslg$=Str$(OhneVorzeichen((Long(Memorystatus#,16)/1024)/1024))
    I%=LEN(auslg$)
    case LT(I%,12):auslg$=MKSTR$( ,12-I%)+auslg$
    DrawText sp%,ze%, 4.  Maximal zugesicherter Speicher:     +auslg$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    ausF$=Str$(OhneVorzeichen((Long(Memorystatus#,20)/1024)/1024))
    I%=LEN(ausF$)
    case LT(I%,12):ausF$=MKSTR$( ,12-I%)+ausF$
    DrawText sp%,ze%, 5.  Freier zugesicherter Speicher:      +ausF$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    virtuell$=Str$(OhneVorzeichen((Long(Memorystatus#,24)/1024)/1024))
    I%=LEN(virtuell$)
    case LT(I%,12):virtuell$=MKSTR$( ,12-I%)+virtuell$
    DrawText sp%,ze%, 6.  Gesamter virtueller Speicher:       +virtuell$+ MB
    Add ze%,steig%
    -----------------------------------------------------------------------------------------
    virtuellF$=Str$(OhneVorzeichen((Long(Memorystatus#,28)/1024)/1024))
    I%=LEN(virtuellF$)
    case LT(I%,12):virtuellF$=MKSTR$( ,12-I%)+virtuellF$
    DrawText sp%,ze%, 7.  Freier virtueller Speicher:         +virtuellF$+ MB
    -----------------------------------------------------------------------------------------
    Dispose Memorystatus#

ENDPROC

####################################################
CLS
speicher_anzeige
Waitinput<
class=s4 href='./../../Function-References/XProfan/end/'>end

Greeting
Roland
 
Intel Duo E8400 3,0 GHz / 4 GB RAM / 1000 GB HDD - ATI Radeon HD 4770 512 MB - Windows 7 Home Premium 32Bit - XProfan X4
09/19/07  
 



@Roland

...or so
greeting
horst
 
09/19/07  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

407 Views

Untitledvor 0 min.
mein01/17/11

Themeninformationen

this Topic has 2 subscriber:

unbekannt (3x)
RGH (2x)


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