Techware Labs Header

Forums have moved

See this announcement for more details, or just go directly there.

  #1  
Old 12-12-2004, 05:43 PM
bsmaff
 
Posts: n/a
Default 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.
Reply With Quote
  #2  
Old 12-13-2004, 04:07 PM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default

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.
Reply With Quote
  #3  
Old 12-14-2004, 07:14 AM
bsmaff
 
Posts: n/a
Default

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.
Reply With Quote
  #4  
Old 12-14-2004, 07:29 AM
zowow
 
Posts: n/a
Default 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
Reply With Quote
  #5  
Old 12-15-2004, 03:11 PM
vee_ess's Avatar
vee_ess vee_ess is offline
Super Moderator
 
Join Date: Aug 2001
Location: Phoenix, Arizona
Posts: 2,781
Send a message via ICQ to vee_ess Send a message via AIM to vee_ess Send a message via MSN to vee_ess Send a message via Yahoo to vee_ess
Default

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.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:01 PM. Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum style by ForumMonkeys.