Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread MB Software Solutions, LLC
Add this code to prevent it from going over 2GB: *** mjb 06/09/2011 - added lnMax to prevent Vista and 7 from erroring lnMax = 1024**3*2-1 IF lnAvailableMem lnMax THEN lnAvailableMem = lnMax ENDIF *? lnAvailableMem SYS(3050, 1, lnAvailableMem) SYS(3050, 2, (lnAvailableMem/2) ) RETURN

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Paul McNett
On 6/9/11 11:02 AM, MB Software Solutions, LLC wrote: lnMax = 1024**3*2-1 IF lnAvailableMem lnMax THEN lnAvailableMem = lnMax ENDIF How's about: lnAvailableMem = max(1024**3*2-1, m.lnAvailableMem) Paul ___ Post Messages to:

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Stephen Russell
On Thu, Jun 9, 2011 at 1:21 PM, Paul McNett p...@ulmcnett.com wrote: On 6/9/11 11:02 AM, MB Software Solutions, LLC wrote: lnMax = 1024**3*2-1 IF lnAvailableMem  lnMax THEN       lnAvailableMem = lnMax ENDIF How's about: lnAvailableMem = max(1024**3*2-1, m.lnAvailableMem)

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Alan Bourke
Why would you want to be futzing with this in the first place ? On Thu, 09 Jun 2011 13:32 -0500, Stephen Russell srussell...@gmail.com wrote: On Thu, Jun 9, 2011 at 1:21 PM, Paul McNett p...@ulmcnett.com wrote: On 6/9/11 11:02 AM, MB Software Solutions, LLC wrote: lnMax = 1024**3*2-1 IF

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread MB Software Solutions, LLC
On 6/9/2011 2:32 PM, Stephen Russell wrote: On Thu, Jun 9, 2011 at 1:21 PM, Paul McNettp...@ulmcnett.com wrote: On 6/9/11 11:02 AM, MB Software Solutions, LLC wrote: lnMax = 1024**3*2-1 IF lnAvailableMemlnMax THEN lnAvailableMem = lnMax ENDIF How's about: lnAvailableMem =

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Ed Leafe
On Jun 9, 2011, at 2:02 PM, MB Software Solutions, LLC wrote: lnMax = 1024**3*2-1 Since this code is meant to be called frequently, it is better to set the actual value than force it to be recalculated every time, then add a comment for the derivation of the number. -- Ed Leafe

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Stephen Russell
On Thu, Jun 9, 2011 at 1:51 PM, MB Software Solutions, LLC mbsoftwaresoluti...@mbsoftwaresolutions.com wrote: On 6/9/2011 2:32 PM, Stephen Russell wrote: On Thu, Jun 9, 2011 at 1:21 PM, Paul McNettp...@ulmcnett.com  wrote: On 6/9/11 11:02 AM, MB Software Solutions, LLC wrote: lnMax =

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Ed Leafe
On Jun 9, 2011, at 3:01 PM, Stephen Russell wrote: Back to my initial question. Will VFP act better if you double it's ram from 500 meg to 1 gig on a machine that packs a lot of ram to begin with? The purpose of SetMemory is to limit VFP to actual physical RAM, not Virtual Memory.

RE: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Rick Schummer
Add this code to prevent it from going over 2GB: Sure you need an upper limit, but this should be for low memory machines, not heavy duty workstations. Mac Rubel proved many years ago (and written up in FoxPro Advisor Magazine) through extensive testing that using more memory is not better.

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread Paul McNett
On 6/9/11 11:32 AM, Stephen Russell wrote: How's about: lnAvailableMem = max(1024**3*2-1, m.lnAvailableMem) --- How about min and not max? Very good! (Just seeing if you were awake, yeah that's it!) Paul ___ Post

Re: Tip/code for fixing SetMemory issue on Vista/Win7 boxes where memory 2GB

2011-06-09 Thread MB Software Solutions, LLC
On 6/9/2011 3:18 PM, Rick Schummer wrote: Add this code to prevent it from going over 2GB: Sure you need an upper limit, but this should be for low memory machines, not heavy duty workstations. Mac Rubel proved many years ago (and written up in FoxPro Advisor Magazine) through extensive