LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 08-07-2007, 09:12 AM   #1
mailsrinu28
LQ Newbie
 
Registered: Nov 2005
Posts: 6

Rep: Reputation: 0
Smile Memory leaks


Hi friends,
Can any one help to answer the below question

"How many kinds of memory leaks are present?

if they are present what are they?"

help out in this.

thanks in advance.

dsp
 
Old 08-07-2007, 09:55 AM   #2
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
What do you mean "kinds" and "present", present where? And arnt memory leaks just unfreed memory?

If you have trouble finding them, simply use a profiler such as valgrind to help find what memory is not being freed.
 
Old 08-07-2007, 11:26 AM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Memory leaks are considered such because all reference to them is lost. That means that nothing holds a pointer to allocated memory. Essentially, if you knew how many leaks there were and where they were they wouldn't be leaks. Some programs are built to detect them in other programs, though. Those detection programs are generally only suitable for development testing.
ta0kira
 
Old 08-07-2007, 06:19 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
Try googling garbage collection routines as well
 
Old 08-07-2007, 07:15 PM   #5
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: LFS-Version SVN-20091202, Arch 2009.08
Posts: 1,488

Rep: Reputation: 67
This sounds like a test question or a homework question that was attached to a pice of code your supposed to be debugging manualy or something.


Depending on the language there can be diffrent types of leeks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to check for memory leaks Four Programming 4 11-18-2006 11:41 PM
OpenSource for memory leaks ? thelonius Programming 1 12-23-2005 01:30 PM
frustrating memory leaks xushi Slackware 18 08-10-2005 06:13 AM
how to detect memory leaks abirami Linux - Networking 2 11-08-2004 05:35 AM
Memory Leaks? stampede96 Linux - Software 3 02-20-2003 12:52 PM


All times are GMT -5. The time now is 06:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration