A memory leak is particularly unintentional (i will say unethical!!) memory consumption by a computer program where the program fails to release memory when no longer needed.
Since memory is not physically lost from the computer. Rather, memory is allocated to a program, and that program subsequently loses the ability to access it due to program logic flaws.
In short your program fails to address the memory location when it comes to access it during the processing.
2007-08-01 00:12:19
·
answer #1
·
answered by Viren 1
·
0⤊
0⤋
Programs use memory. They store data, data structures, and operating instructions in it. Where do they get it? Usually, they ask for it from the operating system. When they finish their execution and the manipulation of their data, if they are well-behaved programs which terminate normally, they give it back so the Operating System can give it to the next program.
Some programs are not well-behaved. This is usually because they are badly thought out. They might, for example, allocate the memory for specific data structures, and not destroy them when they are finished with them. This can lead to them not giving the memory back when they are finished. Some programs crash. This can also lead to flotsam and jetsam in the OS which the OS no longer has direct access to because it is waiting for the program to finish with them. An OS which will take care of this automatically risks accidentally destroying or corrupting the data of programs which are still functioning normally. While some measures may be in place to collect and recycle garbage memory, they never relieve us ONE WHIT of our responsibility to take care that all the memory allocated to our processes is properly disposed of at the end. When that memory is not you have a memory leak. Too many memory leaks and even a well-behaved program will crash. So don't do it.
2007-07-31 09:47:28
·
answer #2
·
answered by jplatt39 7
·
1⤊
0⤋
A bug in a program that prevents it from freeing up memory that it no longer needs. As a result, the program grabs more and more memory until it finally crashes because there is no more memory left.
Also (esp. at CMU) called core leak
2007-07-31 06:25:17
·
answer #3
·
answered by prasy 3
·
1⤊
0⤋
This
2007-07-31 06:25:55
·
answer #4
·
answered by AnalProgrammer 7
·
0⤊
1⤋
Search on internet.I'm sure you find it
2007-07-31 06:38:39
·
answer #5
·
answered by kamran_dotnet 4
·
0⤊
1⤋