Techwarelabs Community

Techwarelabs Community (https://www.techwarelabs.com/community/index.php)
-   Operating Systems (https://www.techwarelabs.com/community/forumdisplay.php?f=17)
-   -   Concept of Memory Leakage. (https://www.techwarelabs.com/community/showthread.php?t=10371)

bsmaff 12-12-2004 05:43 PM

Concept of Memory Leakage.
 
I really need some help as I really cant find any information and dont know what to do.

But here is the question:
Provide an explanation of the concept of memory leakage. Give examples from Windows, MacOS and Linux as to how this occurs both in operating system management and application execution.

vee_ess 12-13-2004 04:07 PM

Memory leakage occurs when a program endlessly consumes more and more RAM. It occurs because of a logical error in a program which enters into a loop that cannot or might not be exited. Spyware can sometimes be a good example of this. Software of this type repeatedly opens new instances of itself and other programs, to prevent you from shutting them down, but possibly killing any usability of your system by using all the resources to recursively keep itself open.

In the Linux 2.4 and 2.6 kernels, there has been a problem identified with memory leakage. Memory used by child processes sometimes are not freed. This means that a program may call another program, but when it is done with the other program, it doesn't clear the memory used by the other program. So, if the parent program calls the child program repeatedly, that child program may be taking up that many times as much memory.

I can't tell you off hand any details about memory leakage occuring in Mac OS. It does happen though. There have been several problems with the PICT files and memory leaks. As I said though, I do not know the details.

bsmaff 12-14-2004 07:14 AM

Thankyou very much vee_ess, i have done me such a good favour by telling me all the information needed.

I cant thank you enough mate, thanks.

zowow 12-14-2004 07:29 AM

same thing
 
just been looking over the forum and this topic and i have a similar problem. I need to research and find out what methodologies actually prevent memory leakage. Does anyone have any info on this, or recommend any good sites? - Can only seem to find pages of complicated C++ code
many thanks.
btw - nice site :) :)

vee_ess 12-15-2004 03:11 PM

The only way I know of to reduce possibility of memory leakage is to just look over your code vigorously. Logic errors are hard to systematically eliminate.


EDIT: You can always use wrappers to a degree. It just helps memory management and helps prevent you from making the errors that cause memory to not be freed up.


All times are GMT -5. The time now is 09:46 AM.

Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.