| Dec 12, 2006 @ 4:37 PM |
Virtual Memory |
|
warrior674


Posts: 4,972
|
Does anyone know how to fix virtual memory leaks and problems, or is it just best to upgrade.
|
|
 |
|
| Dec 12, 2006 @ 4:57 PM |
Virtual Memory |
|
encorrgbl

Posts: 1,390
|
If you've got a virtual memory issue, you can either expand the virtual memory you have on your system (by modifying the virtual memory setting in the operating system properties under performance), OR if you have a memory leak from one of your applications, you are probably right on the money about doing a patch or an update to that application.
Most times when you set your system up, the virtual memory size is set up by the operating system depending on how much RAM you've got.
If you have a leak going on, and you just recently added an application, I would check the support info for the app, and see if they have any updates out for it that might directly address that issue (it's a pretty sure bet you're not the only person running into the problem in most cases).
Increasing the virtual memory size on your computer isn't a bad thing, but it's something you'll manually have to do, and then remember to do if the problem you're running into isn't addressed.
Updating your operating system isn't a bad idea either, but if you're running an updated version of XP that doesn't have service pack 2 on it yet, then expect a long download time if you move to service pack 2, with minor changes to your system and the addition of the MS firewall automatically installed once you update the machine (Service pack 2 has been out for a while now though, so there are other updates after it that take care of other issues as well).
You could get more RAM for your computer too. It really depends on the specifics of the problem. (Which I'm sorta shooting at the problem with silver buckshot trying to hit it since I'm not sure exactly what's causing it.)
My two cents. Feel free to give back change
|
 |
|
| Dec 12, 2006 @ 7:47 PM |
Virtual Memory |
|
T_i_m

Posts: 809
|
Does anyone know how to fix virtual memory leaks and problems, or is it just best to upgrade. What operating system are you running? How much RAM do you have installed? What type of CPU do you have?
Some poorly written software will hog and lock memory. If you have such a program, get rid of it and find a better written replacement.
Use the Windows System Monitor to help detect an offending program.
Except for Windows 95, you are better off to let Windows manage the Virtual Memory. In Win98, the memory management was vastly improved. Except for cases where you have a huge amount of system RAM (like 512MB or more), Windows 98 (and later) will do a fine job with it's default configuration.
The single most important thing you can do to increase system performance is add more RAM, especially if you only have a small amount like 64MB. RAM is cheap. Even on a Win98 system, 128MB is the least I would recommend. I run Win98SE on an AMD K6-2 400Mhz CPU with 256MB of SDRAM. I know, it's old. But it still whips the llama's ass!
(=°_°=)
[Edited on 12/12/2006 8:03 PM]
|
|
 |
|
| Dec 13, 2006 @ 8:58 PM |
Virtual Memory |
|
warrior674


Posts: 4,972
|
Tim I have Win XP. I have 128MB RAM. Not sure about the CPU yet. I'll have to check. I'll keep you guys updated. thanks.
|
 |
|
| Dec 25, 2006 @ 10:17 PM |
Virtual Memory |
|
warrior674


Posts: 4,972
|
I found out what was causing the leak. My Spyware protection program. I will try to reinstall it. If that doesn't stop it, then I will just upgrade. Thanks
|
|
 |
|
| Dec 25, 2006 @ 10:23 PM |
Virtual Memory |
|
Nytech13

Posts: 26
|
I suggest you upgrade your system that will be vista ready
|
 |
|
| Dec 29, 2006 @ 7:27 PM |
Virtual Memory |
|
sealacamp

Posts: 3,151
|
Memory "leaks" are caused by not rebooting often enough. Once a program is turned on it uses some amount of RAM and when it is turned off some of that program may still be occupying some amount of RAM. As you turn on and off more programs then the amount of RAM that is used by residuals of programs continues to increase there by reducing the amount of usable RAM you have available. When you reboot this emptys your RAM completely thereby stopping any "leaks" in memory.
S
|
|
 |
|
| Dec 30, 2006 @ 4:03 AM |
Virtual Memory |
|
T_i_m

Posts: 809
|
Memory "leaks" are caused by not rebooting often enough. That is completely false and totally incorrect.
Read the following page for more information on memory leaks.
http://en.wikipedia.org/wiki/Memory_leak
|
 |
|
| Dec 30, 2006 @ 7:35 PM |
Virtual Memory |
|
sealacamp

Posts: 3,151
|
Three Common Causes of Memory Leaks in Managed Applications One of the joys of working with managed code is not having to worry (as much) about memory management and letting the Garbage Collector do it's job. There are situations, however, when applications need to take a more active role in memory management. At MEDC 2005, I spoke, during my debugging session, about three common causes of memory leaks in managed applications:
1. Holding references to managed objects 2. Failing to release unmanaged resources 3. Failing to dispose Drawing objects
http://blogs.msdn.com/davidklinems/archive/2005/11/16/493580.aspx
The three elements are held in RAM and if they are not released when the programs are shut down a reboot will force them to be ejected from RAM thereby eliminating the "leakage". Furthermore a professor where I go to school for computers corroborates this as the main cause of memory leaks. If you have a different take on the subject I suggest that you take it up with the powers that be since the majority of them say that rebooting is the easiest and best solution for this issue.
S
|
|
 |
|
| Dec 31, 2006 @ 7:51 AM |
Virtual Memory |
|
T_i_m

Posts: 809
|
Of course restarting a computer will purge the system RAM of its contents. To say that not rebooting often enough is the cause of memory leaks, is untrue.
Rebooting is not the easiest and best solution to memory leak problems but merely a quick fix. The cure is to get rid of the offending software responsible or, as in the case of Windows 95, add vcache parameters to the system.ini file to fix an operating system anomaly.
It is quite normal for some programs to use up a lot of available memory in normal operation. This is not a defect and the Windows memory management will reclaim the memory once such programs are closed or a request for RAM by another process occurs.
To restart a machine just to regain memory is unnecessary when using well crafted software. If a person wants to manually free some RAM without restarting, a simple VBScript as shown below will do nearly the same thing.
Save the following text in Notepad as FreeMem64MB.vbs
FreeMem = Space(64000000)
and when executed, 64 megabytes of RAM will have its contents paged to the swap file.
|
 |
|
| Dec 31, 2006 @ 4:56 PM |
Virtual Memory |
|
sealacamp

Posts: 3,151
|
I know several professors that teach computer courses that will disagrre with you tim. That is because windows does not always reclaim memory as it should and that many programs leave residuals in RAM as I previously stated. The only way to get them out completely and know that all of your memory is free is to reboot. That is also why microsoft recomends a reboot for your computer among other things. Rebooting is not the cause it is the remedy. If you don't do it then you can't completly empty your RAM.
As I stated you will have to take that up with the teachers and writers of software. I am reiterating what I have researched and been taught. Until I see some definitive proof from those in the profession I will follow their line for a memory leak prevention. REBOOT!!!
S
|
|
 |
|
| Jan 6, 2007 @ 12:01 AM |
Virtual Memory |
|
Captpappy

Posts: 28
|
Although not a professional, I have written some code in my time and discussed many issues with other programmers in forums around the Internet.
I tend to agree with sealacamp.
When running a program within Windows (ANY version) sometimes direct link libraries and other program support is loaded into memory. When the program is closed, IF THE PROGRAMMER IS SLOPPY AND DOESN'T INCLUDE HOUSE-KEEPING IN HIS CLOSING ROUTINES, some of these DLLs and support routines will remain in memory, protected by Windows.
This is noticed by increased hard drive activity and frequent freezing of further programs while Windows moves things back and forth between virtual memory (on your hard drive) and physical memory (RAM within your system)
In a system with limited RAM this can become so bad that EVERY operation is preceded by hard disk activity, making the use of the computer only feasible by the most patient of users!
Sealacamp is correct! Restart your computer to clear these dead remnants of local memory. You can find software that can do the same thing without a restart. ___________ EDIT Windows is a running program written in C++ and maintains a certain amount of memory used for variable storage. I'm not 100% certain but I think T_I_M's script file solution clears this variable storage area and NOT program memory!
... and Windows memory management will NOT ALWAYS clear these abandonded routines in memory. ___________
As encorrgbl points out; increase the amount of physical ram in your system. note: this last is not a fix but it will slow the appearance of the other symptoms. Try to determine what programs you use that leave these routines in memory after leaving the house. Then DON'T USE THEM (as T_I_M points out) until their authors realize they can't get away with "LAZY, SLOPPY CODING"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[Edited on 1/6/2007 1:19 AM]
|
 |
|
| Jan 6, 2007 @ 8:58 AM |
Virtual Memory |
|
T_i_m

Posts: 809
|
Of course rebooting a computer will clear the system RAM (and create a new swap file). My argument with sealacamp is with his statement. . .
Memory "leaks" are caused by not rebooting often enough. Memory leaks are not caused by a lack of rebooting.
Also, to say "I will follow their line for a memory leak prevention. REBOOT!!!" is misleading as well. Rebooting will not prevent a leak, only halt its progression.
I'm not 100% certain but I think Tim's script file solution clears this variable storage area and NOT program memory! Use Windows System Monitor and run your own tests. The amount of memory freed by the script can be changed. It will even reallocate locked memory. A person is far better off to have plenty of RAM installed in their system than to use that script or any of the so-called memory boost programs out there.
|
|
 |
|
| Jan 6, 2007 @ 4:20 PM |
Virtual Memory |
|
waterfire

Posts: 2,921
|
Memory leaks are ALWAYS the result of bad memory management; many programs forget to release handles, memory requests (all calls to the API are a memory request in one form or another.), etc. Hell even Windows will forget to release resources now and again, can you say updates:P
Warrior: I have no idea what OS you currently use but XP is (so far) Microsoft’s best OS, so yes upgrading will help if you are not currently using XP.
Hmm, what makes you think you have memory leaks???
[Edited on 1/6/2007 4:28 PM]
|
 |
|
|
|
|