Author Topic: memory leak detector for codeblocks  (Read 17484 times)

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
memory leak detector for codeblocks
« on: June 27, 2011, 07:07:38 am »
I need a memory leak detector for my simple programs. Can you tell me any tool which can tell me where memory leak is occurring in code or just tell that is this program causing memory leak or not.
It will better if that is freeware tool.

Offline eranif

  • Regular
  • ***
  • Posts: 256
Re: memory leak detector for codeblocks
« Reply #1 on: June 27, 2011, 07:44:58 am »
Your post is lacking some basic information, like: Which OS?

If you are under Linux I would recommend running your application under valgrind ( I think that C::B has a plugin for it )
If you are under Windows, well.. I can't help you there
 
Eran

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: memory leak detector for codeblocks
« Reply #2 on: June 27, 2011, 08:08:40 am »
I am using windows 7. I want to use Linux but my system not support that.
tell me guys if you know any such thing for windows.

Offline vikash

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: memory leak detector for codeblocks
« Reply #3 on: June 27, 2011, 08:14:54 pm »
win 7 and Linux systems should be compatible with it, my computer to install this on two systems!
I have tried UBUNTU 10.04 (not run in GUI mode run in terminal only) i try opensuse 11.3 it run in GUI but after a minute of start it hanged and all the input devices keyboard mouse stop working. I try linux mint it has similar problem like that of UBUNTU . this is due to graphic card there is no graphic card in my PC.
after all that's why i stop trying Linux. stop posting on Linux but tell me something about my question.
If there is no such thing then code::blocks team should add this in their next release.(it's just advice)
« Last Edit: June 27, 2011, 08:18:40 pm by vikash »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: memory leak detector for codeblocks
« Reply #4 on: June 27, 2011, 08:28:45 pm »
If there is no such thing then code::blocks team should add this in their next release.(it's just advice)

If you know a good and free memory leak detector, someone can surely create a plugin to call it (if it has a btach mode available, otherwise, you can create an entry in the "Tools [ + ] "-menu.

So feel free to post a link to a website where someone can download such a tool, or even better create a plugin for it.
I don't know such a memoryleak detector (but I did not really do a deep search for it, I feel mor familiar with linux).
« Last Edit: June 28, 2011, 11:11:52 am by jens »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: memory leak detector for codeblocks
« Reply #5 on: June 28, 2011, 07:45:05 am »
I don't know such a memoryleak detector (but I did not really do a deep search for it, I feel mor familiar with linux).
There are some for windows I know (like PCLint), but they are all commercial, so a plugin is not feasible or would be very restricted to those owning a license.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: memory leak detector for codeblocks
« Reply #6 on: June 28, 2011, 11:12:53 am »
I don't know such a memoryleak detector (but I did not really do a deep search for it, I feel mor familiar with linux).
There are some for windows I know (like PCLint), but they are all commercial, so a plugin is not feasible or would be very restricted to those owning a license.

If you know a good and free memory leak detector, someone can surely create a plugin to call it (if it has a btach mode available, otherwise, you can create an entry in the "Tools [ + ] "-menu.

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: memory leak detector for codeblocks
« Reply #7 on: July 01, 2011, 04:07:44 am »
hmm not an external tool but i use it in a game engine im working on and it's pretty good at spotting leaks.

http://hem.passagen.se/blizzar/mss/

to use it include mms.h somewhere global and link your app with libmss. now when ever you run your app a log will be created, and if theres any leaks a warning will appear in that log telling you in what function the leak occured (with line numbers and all).

the format of the log can be controlled by a cfg file also called mss.cfg

Offline Manolo

  • Multiple posting newcomer
  • *
  • Posts: 47
Re: memory leak detector for codeblocks
« Reply #8 on: July 01, 2011, 09:49:03 am »
My favorite is MSS, even if un-maintained!

Another one (also open source) is Nvwa:
http://sourceforge.net/projects/nvwa/

Regards,
Manolo