Jump to content

How to debug out of memory issues in Windows 9x/ME?


Kahenraz
 Share

Recommended Posts

Might be LDT resources. If you install Revolutions Pack, it'll tell you how much you've got left of these on the Ctrl-Alt-Del dialog. If they are low enough to give these error messages, I found that killing and restarting the explorer shell frees a significant amount of them, closing big apps such as Web browsers helps with this too.

Sometimes I also get not enough memory errors after massive repeated use of batch files or console. Not sure what kind of resources have leaked in this case and need to reboot when it occurs.

Link to comment
Share on other sites


Thank you for this tip. I found this related KB article.

https://www.betaarchive.com/wiki/index.php?title=Microsoft_KB_Archive/229670

The unofficial Windows 98 service packs provide gdi.dll and gdi32.dll, and this bug does not affect Windows ME. So it appears that I have already accounted for this. I'll see about finding an LDT resource counter and see what that looks like to rule it out entirely.

Link to comment
Share on other sites

This is what I estimate. The Windows OS is based upon DOS. The memory you are referring to is the first 64k which is essential for 98/ME for hardware base and for the virtual machine to map the extended memory. The virtual machine I am referring to is the one you see if using Sysmon.exe and memory selection for it. So it is important to get the hardware installation correct and also the hardware must be working/toggling from a high to low, low to high when required. The LLKD vxd as MrMat has said it is a driver implementation on starting up AIDA64. If you look closely at the words when it starts up it shows you where it is up to and I believe it will be up to accessing the PCI bus when the error occurs. AIDA64 is important though as to looking into the hardware installation so what can be done is to use the free AIDA32 vs 3.93 or free Everest Home Edition vs 2.20.405 as they will not error as easily and should work. You then look into device resources. Test your add-on hardware on different machines and if one has issues with it then the add-on hardware could be at fault. Use a combination of OSes to exercise your machines. It is no good though if hardware is not installing properly.

http://conradshome.com/win31/83435-6.php Read this for [386Enh]

This is a guide only and original Microsoft defaults are OK but in your case I would try.

[386Enh]
32BitDiskAccess=ON
ADIXctlLevel=1       ;http://www.oocities.org/fbighouse/mp3car/system.txt
AllXMSLocked=False
UniqueDOSPSP=True
device=*dynapage
device=*enable
device=*int13
DMABufferSize=500    ;must be increased in increments between boots not at once and choice will depend on amount of available RAM
EMMExclude=C000-CFFF    ;Nvidia installs this
EMMPageFrame=D000
EMMSize=61440
LocalLoadHigh=0
MaxBPs=64
MessageBackColor=4
MessageTextColor=0
MinSPs=16
MinTimeSlice=16
MinUnlockMem=16
PageBuffers=500     ;larger number is less of a restriction for memory mapper
PageOverCommit=8
Paging=on
PSPIncrement=16
ReservePageFrame=False
SysVMEMSLimit=-1
SysVMEMSLocked=Yes
WindowMemSize=-1
WindowUpdateTime=64
WinTimeSlice=6,18
woafont=dosapp.fon
XlatBufferSize=4

If using ATI card make sure you obey this. ATI2CQAG.DL_ from ATI 6.2 not to be used/renamed _ATI2CQAG.DL_ & use ATI vs 5.9 ATI2CQAG.DL_ 17/8/2005. Also this if you are using a PCI (not AGP and not PCIex) Nvidia card. https://msfn.org/board/topic/182113-nvidia-forceware-driver-7772-patch-for-512mb-vgas/?do=findComment&comment=1201584

Edited by Goodmaneuver
Looking at settings EMMPageFrame should have been outside of CFFF
Link to comment
Share on other sites

36 minutes ago, Goodmaneuver said:

If using ATI card make sure you obey this. ATI2CQAG.DL_ from ATI 6.2 not to be used/renamed _ATI2CQAG.DL_ & usie ATI vs 5.9 ATI2CQAG.DL_ 17/8/2005.

What's this about?

Link to comment
Share on other sites

3 hours ago, Kahenraz said:

ATI2CQAG.DL_ from ATI 6.2 not to be used/renamed _ATI2CQAG.DL_ & usie ATI vs 5.9 ATI2CQAG.DL_ 17/8/2005

ATI2CQAG.DL_ from ATI driver 6.2 does not work. You need to install the previous available ATI2CQAG.DL_ from ATI driver 5.9 when using ATI display driver 6.2.

The only time I have seen another virtual machine being created was when opening Everest/AIDA.

Edited by Goodmaneuver
Link to comment
Share on other sites

Posted (edited)

I've been trying to monitor different memory areas that are trackable by System Monitor, and I think I found something consistent. The memory that displays as "Locked non-cache pages" is a resource that is normally consumed when programs are run and freed when they are closed. I can see this by opening multiple instances of a command window or Notepad. But if I open and close a program enough times, like Notepad, this resource slowly begins to creep and is not freed. This looks a lot like either a memory leak, fragmentation, or both.

Is there anyone who can provide any more information?

Edit:

After further testing, if I continue to push the system and keep opening and closing Notepad, eventually the system will start to reporting that there isn't enough memory even for Win32 applications. It seems that the issue simply breaks DOS functionality much earlier. I can open one Notepad, but there isn't enough memory for a second one, despite there being almost 200MB of available physical memory, and the entire swap file.
 

At this point, the entire system starts to struggle under its own weight of doing nothing at all. Opening My Computer causes it to hang as it can't get the resources it wants, even though Explorer is already running. It's very bizarre.

 

20220807_225254_resize_30.thumb.jpg.4d03b8592ed81eb099a6264a3500d50a.jpg

Edited by Kahenraz
Link to comment
Share on other sites

Early on I used to use RAM Defrag (RAM def 2.6 XTreme) and had it set to auto defrag when RAM got to a set level or amount left; or you could try ClearMem. These 2 programs release memory but there could be memory write problems. Try under clocking the RAM in BIOS. If Everest or AIDA bench on RAM gets worse with upping RAM settings then you have gone too far taking consideration to both read and write speeds. Do not make settings marginal, under clock it good. Win32 SDK Tools has got test programs that includes clearmem.exe.

Link to comment
Share on other sites

Posted (edited)

I'm still leaning towards a memory leak. When I got the memory pressure to the point where I could only open one Notepad at a time, continually opening and closing programs and windows by hand continued to slowly consume whatever resources were left until things started to stop responding. I could perform some emergency frees by closing other applications running in the background, but continued opening and closing of Notepad consumed those resources as well.

I wonder if it's a bug in how the vcache is released.

20220808_171456_resize_66.thumb.jpg.4cd9d33bee97da88b8400c4bdb948aad.jpg

Edited by Kahenraz
Link to comment
Share on other sites

Your theory would be easy to test @Kahenraz, just set a low, same-sized Min/MaxFileCache of 1024, for example, and repeatedly test your applications.
https://msfn.org/board/topic/177106-running-vanilla-windows-98-in-2020-and-beyond/page/66/#comment-1221053

If your system has a BIOS, did you experiment with disabling BIOS cache options?
https://msfn.org/board/topic/177106-running-vanilla-windows-98-in-2020-and-beyond/page/62/#comment-1214425
Link to comment
Share on other sites

On 8/1/2022 at 12:55 AM, Kahenraz said:

Sometimes it takes a few minutes. Or an hour. Or eight hours. It's somewhat random

If it were software related I would think it would be less random than that. In the early days the machine's 'hardware or CPU MMU looked like it did not release the memory and RAM Defrag helped. Nowadays the new OSs can run out of RAM because the OS functioning never trying to write again to non writable sections. The problem with this is that this can be created from software. I did it myself with using monitor calibration MCW software. I did the color estimation several/many times trying to get the monitor more accurate. The OS did not cope for some reason totally righting off all of the free RAM (overrunning continuously before time to terminate was possible: (it looked like)). Another way the OSs got in trouble with changing color and text settings too many times before rebooting. This is not the same type of error as the MCW occurrence but states another away that the OSs got into trouble and indicates to me of a registry cache full/overflow perhaps.

Link to comment
Share on other sites

Perhaps the registry needs to run in a stack and not be fragmented? Thinking about it the MCW error could have been similar in a registry overflow to changing color text profiles but consequences were much more profound.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...