Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Limiting a VFP app usable memory
Message
De
29/01/2004 06:58:37
 
 
À
29/01/2004 06:15:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00871717
Message ID:
00871722
Vues:
16
>Hi,
>
>I'm wanting to limit the total memory used by a VFP app to a certain amount, let's say 64Mb.
That might be quite detrimental to perf.
At LEAST do it in a way depending on the actual
installed RAM and the curent memory situation.

>Now the question: there is a way to effectively limit the total amount of memory used?
As I could understand SYS(3050) won't do it.

SYS 3050 works splendid for selects and so on.

If you are NT-based, you can trim back the memory
(minimize the apps window) or call
DECLARE INTEGER GetCurrentProcess IN kernel32 
Declare INTEGER SetProcessWorkingSetSize IN kernel32  ;
   INTEGER hProcess, INTEGER lpMinimumWorkingSetSize, INTEGER lpMaximumWorkingSetSize 
= SetProcessWorkingSetSize(GetCurrentProcess(), 128*1024*1024, 128*1024*1024)
But Windows will do it's own thing further on...

AFAIK in Server 2003 there is a lockable SetProcessWorkingSetSize[Ex??],
read a bit in MSDN...

HTH

thomas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform