Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory won't release
Message
From
29/01/2009 23:14:36
 
 
To
28/01/2009 11:40:58
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows Server 2003
Network:
Windows 2003 Server
Miscellaneous
Thread ID:
01377732
Message ID:
01378360
Views:
21
>Hello All,
>
>I'm trying to understand how to optimize an VFP application. I have a program that appends approximately 250k records into a free table, does some basic processing and then writes the records out to a flat file via the "copy to sdf" command, closes the table then another series of programs run all within the same instance of VFP.
>
>When I watch the VFP6.EXE via the Task Manager and the program I describe above runs, it's memory usage climbs to the max that I've set with the sys(3050) command, which is about 512MB. The problem I see is that the memory never releases even when the table closes and that particular program closes. I've tried to use the FLUSH and sys(1104) commands but those don't seem to make any difference.
>
>I cannot close the VFP instance nor can I use the CLOSE ALL or CLEAR ALL commands. Anyone have any ideas or is this just an issue with VFP6?

Bruce you could run this code after your above code. It will reduce your memory to a bare minimum. Check in the task Manager and you will see that it actually works.
Declare Integer SetProcessWorkingSetSize In kernel32 As SetProcessWorkingSetSize  ;
	Integer hProcess , ;
	Integer dwMinimumWorkingSetSize , ;
	Integer dwMaximumWorkingSetSize
Declare Integer GetCurrentProcess In kernel32 As GetCurrentProcess
nProc = GetCurrentProcess()
bb = SetProcessWorkingSetSize(nProc,-1,-1)
Cheers

Bernard
Previous
Reply
Map
View

Click here to load this message in the networking platform