Tuesday, November 25, 2014

MEMORY LEAK

MEMORY LEAK

A memory leak is like a virtual oil leak in your computer. It slowly drains the available memory, reducing the amount of free memory the system can use. Most memory leaks are caused by aprogram that unintentionally uses up increasing amounts of memory while it is running. This is typically a gradual process that gets worse as the program remains open. If the leak is bad enough, it can cause the program to crash or even make the whole computer freeze.
The most common reason programs have memory leaks is due to a programming error where unused memory is not allocated back to the system. This means the amount of RAM the program uses is always growing. Therefore, the program is constantly "leaking" memory. A memory leak may also be caused by a program that requests new memory too frequently, instead of using available memory. This means each time more memory is requested, the program takes up additional RAM instead of using memory that has already been made available to the program.
Fortunately, memory leaks are not as messy as oil leaks and can be more easily fixed. Software development applications often include debuggers that can check programs for memory leaks. Once the source of the leak is found, the programmer can modify the code so that the program uses memory more efficiently. If you are using a program that has a memory leak, you can temporarily fix the problem by simply quitting the program and opening it again. Once the program has been quit, the memory is automatically allocated back to the system. Of course, if the leak continues to be a problem, the best solution is to let the developer know about the issue so it can be fixed.

No comments:

Post a Comment