Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-07-2007, 09:12 AM   #1
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.

Old 08-07-2007, 09:55 AM   #2
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
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.
Old 08-07-2007, 06:19 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,198

Rep: Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310Reputation: 2310
Try googling garbage collection routines as well
Old 08-07-2007, 07:15 PM   #5
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
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.


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 07:30 AM.

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