Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My ever expandind exe
Message
De
21/09/2001 10:38:39
 
 
À
21/09/2001 07:59:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00558779
Message ID:
00559251
Vues:
24
>
>I would be interested in seeing the article. I've no clue about setting the buffers and the advantage of doing so. Here's my email: mchugh@gebo-indust.com
>
I posted this code earlier, but I'll do it again here. It's useful for setting a general buffer strategy for any machine where you don't have the time to manually adjust each buffer setting for every machine.
*  Program...........: MEMADJUST.PRG
*  Author............: James M. Weil
*  Project...........: TSM50
*  Created...........: 01/05/01  12:24:32
*  Copyright.........: (c) InvestLink, 2001
*) Description.......: Adjusts forground and background memory
*  Calling Samples...:
*  Parameter List....:
*  Major change list.:
Local lcOrigFore, lcTotMem, lnRealMem, lcMem

Clear

lcOrigFore = SYS(3050,1)
lcTotMem=SYS(1001) && Total available memory to VFP, including VM
lnRealMem=VAL(lcTotMem)/4 && Get the physical memory from the pool
lcMem=SYS(3050,2) && default background memory!
If VAL(lcMem) >; 10000000 && The default background should work fine
     =SYS(3050,1,VAL(lcMem))
Else
     =SYS(3050,1,lnRealMem/4) && Reduce the physical memory pool by 4
     =SYS(3050,2,lnRealMem/4)
Endif

lcOrigFore          = ALLTRIM(STR(INT(VAL(lcOrigFore)/1000000)))  && Original
lcForground      = ALLTRIM(STR(INT(VAL(SYS(3050,1))/1000000))) && foreground
lcBackground    = ALLTRIM(STR(INT(VAL(SYS(3050,2))/1000000))) && background

? "Original Foreground Memory: " + lcOrigFore + " megs"
? "Total Available Memory: " + ALLT(STR(lnRealMem/1000000)) + " megs"
? "Forground memory: " + lcForground + " megs"
? "Background memory: " + lcBackground  + " megs"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform