In many cases, an "out of memory" message is misleading, since your whole system really did not run out of memory. Instead, certain areas of memory (Microsoft calls "heaps") used by Windows have run low on space.
Windows maintains an area of memory for operating system resources. The maximum size of this area is 128K, in two 64K areas. Windows 95/98 uses this area of memory to store fonts, bitmaps, drop-down menu lists and other on-screen information used by each application.
When any program begins running, it uses up some space in the "system resources" area in memory. But, as you exit, some programs do not give back system resources they were temporarily using. Eventually the system will crash as it runs out of memory. The crash happens sometimes if you start and close many programs, even the same ones, without a periodic reboot. This is what Microsoft calls a resource leak or memory leak.
When you tell your system to exit a program, the program is supposed to give back the resources (memory) it was using. But, because programs are written by humans, mistakes can happen and the program may not give back all to the operating system. This failing to "give back" is the "memory leak," eventually leading to a message that your computer is low on resources. Memory leaks can also be caused by programs that automatically load every time you boot your Windows system. In Windows 95/98 you can see the list of active programs via the usual Ctrl-Alt-Del sequence. The Windows Startup folder contains programs that launch every time your system boots. In Windows 98, set the folder contents with MSCONFIG. In Windows 95, click the right mouse button on the Task Bar, click Properties, click Start Menu Programs, click Advanced and look for the Startup folder in the left pane.
The system resources problem is something you might have to live with until the misbehaving application is found. If you are sure a certain application is causing the problem, be sure to contact the software vendor.
You can keep track of your system resources via the handy tool at Start >> Programs >> Accessories >> System Tools >> Resource Meter. If you do not have a copy, you can download it at UtilMind Solutions. The resource meter adds the "fuel gauge" to your Windows task bar, to help you keep track of your system's resources. As the bar graph gauge turns from green to yellow, then the dreaded red, you know you have a problem! But you need to remember that the resource meter also consumes what you are trying to conserve: system resources.
The best preventive maintenance is to periodically reboot your Windows system.
No conspiracy, no need to buy memory, unless you only have 4M of RAM. Buying memory does not fix the "system resources" problem, because its size is fixed at 128K, no matter how much physical memory is installed.
Here are some interesting links.