Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reindex dbf give insufficient memory error
Message
From
29/01/1999 06:01:02
 
 
To
29/01/1999 04:24:39
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00181699
Message ID:
00181708
Views:
7
>Hi,
>
>Could someone please kindly advise me on how to solve the problem of my application running Win95, vfp 5 written application which after maybe 1 week will give me error of insufficient memory.
>My application just reindex the index files every night. Other had advise me to increase RAM memory and win95 swap file. My PC is already using 32M of RAM.

What version of Win95 is being used? There were a number of patches released for Win95, many fo which addressed a number of memory bleeds (memory that when released is not recovered by the operating system, so that the available memory pool shrinks until Windows is restarted. I'd start by checking Microsoft's site to see what patches are available for the version you're running.

If this is a memory bleed, and you can't figure out what is causing it (things other than the operating system can cause bleeds; I've seen too many things like ActiveX controls leaking off memory to be sure that it's an operating system problem), you may want to periodically close down your program and restart Windows to clean up the memory environment as a workaround. You can use a couple of different approaches, the best being to set up your program to be automatically restarted by Windows (a shortcut in the Start menu's Programs/StartUp folder or registry entry under the Run or RunServices key are the preferred methods), and then force your program to restart by closing all files and issuing the ExitWindows() API call as below:

DECLARE ExitWindowsEx IN WIN32API INTEGER uFlags, INTEGER dwReserved
ExitWindowsEx(2,0)

This will force Windows to restart after a reboot. You'll need to make sure that the PC either does not require a login, or that you've modified the registry to do AutoLogin (the easiest way to do this is using the TweakUI addon, part of the Microsoft Power Toys. The Network tab will allow you to define a login ID and password that will be used automatically on restart.)

To really track down memory leaks, you'll need some third party software to help track where the memory loss occurs. I use Purify and BoundsChecker (they're both commercial products) to help track down memory leaks with C and VB applications, and while they won't help point to VFP source code as the problem, will detect and report where the losses occur at a system level.

I have not seen as many problems with the more recent Win9x releases (OSR 2 v2.5 has been pretty clean, as has Win98, at least regarding memory leaks), so reinstalling a more recent operating system may help. If you decide upgrade, I'd really recommend a completely fresh installatiuon if at all possible.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform