* 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"