LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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-24-2009, 09:27 AM   #1
kbarani
Member
 
Registered: Dec 2008
Posts: 41

Rep: Reputation: 15
How to fix this memory leak


Hi all,
In my c++ application in the fedora core2 operating system , i am try to finding the memory leaks in my application through valgrind , the valgrind giving the following report , how to fix the leak , please give me the guideline


==16260== 136 bytes in 2 blocks are possibly lost in loss record 66 of 81
==16260== at 0x1B9053FD: calloc (vg_replace_malloc.c:176)
==16260== by 0x1B8F1E38: _dl_allocate_tls_storage (in /lib/ld-2.3.3.so)
==16260== by 0x1B8F26A8: __GI__dl_allocate_tls (in /lib/ld-2.3.3.so)
==16260== by 0x1BD13550: pthread_create (vg_libpthread.c:1155)
==16260==


Regards,
Barani
 
Old 08-25-2009, 09:04 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by kbarani View Post
Hi all,
In my c++ application in the fedora core2 operating system , i am try to finding the memory leaks in my application through valgrind , the valgrind giving the following report , how to fix the leak , please give me the guideline


==16260== 136 bytes in 2 blocks are possibly lost in loss record 66 of 81
==16260== at 0x1B9053FD: calloc (vg_replace_malloc.c:176)
==16260== by 0x1B8F1E38: _dl_allocate_tls_storage (in /lib/ld-2.3.3.so)
==16260== by 0x1B8F26A8: __GI__dl_allocate_tls (in /lib/ld-2.3.3.so)
==16260== by 0x1BD13550: pthread_create (vg_libpthread.c:1155)
==16260==


Regards,
Barani
Check Google, and read the valgrind docs.

http://valgrind.org/docs/manual/faq.html
http://www.linuxprogrammingblog.com/...g-memory-leaks

You can adjust what valgrind sees and how it displays it.
 
Old 08-26-2009, 06:21 AM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Moved: This thread is more suitable in <Programming> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
  


Reply



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
[SOLVED] Memory leak: How risky not to free allocated memory. kaz2100 Linux - General 1 12-24-2008 12:00 AM
Memory Leak mendiratta Linux - General 2 12-10-2008 06:45 AM
Inactive memory issue, Freebsd (memory leak?) JasperB *BSD 7 08-12-2008 03:19 AM
Need to fix xmms plugin "memory leak" c.d.e Programming 15 06-01-2008 03:17 AM
Memory Leak when using memory debugging C program on SuSE SLES8 babalina Linux - Distributions 0 10-06-2003 09:39 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration