* 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"<\pre>.·*´¨)
.·`TCH
(..·*
010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"