Thread: Effective tool for run-time errors and memory leaks detection

  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    13

    Smile Effective tool for run-time errors and memory leaks detection

    Hi!

    Created application is working toooo slow, looks like there are a lot of memory leaks, because the app does not use huge resources, and have no many variables. So, please, can you advice some effective tool for run-time errors and memory leaks detection in Visual Studio C++?

    Thank you!

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229
    Google for "profilers".

    For leak detection, Linux has valgrind. Not sure what's on the Windows side.

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    13
    I guess Deleaker is good on the Windows. I was adviced recently.

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Might I also suggest the use of smart pointers in the future to avoid memory leaks?
    Handy stuff. They're available in TR1 and Boost.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Running slow is generally NOT an indication of memory leaks. As I understand it, when you say "not using many resources", does that not mean "little memory"?

    A profiler is the tool to find out WHERE the program is spending time. Intel's VTune and AMD's CodeAnalyst are tools that help you find out where the time is spent.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    May 2009
    Posts
    13
    So how much this tools may cost? Or it's free?

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,229

  8. #8
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by Elysia View Post
    Might I also suggest the use of smart pointers in the future to avoid memory leaks?
    Handy stuff. They're available in TR1 and Boost.
    +1

    It's really hard to leak memory in C++ if you use standard containers and RAII.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. memory leaks
    By TehOne in forum C Programming
    Replies: 4
    Last Post: 10-10-2008, 09:33 PM
  2. Memory leaks problem in C -- Help please
    By Amely in forum C Programming
    Replies: 14
    Last Post: 05-21-2008, 11:16 AM
  3. Question regarding Memory Leak
    By clegs in forum C++ Programming
    Replies: 29
    Last Post: 12-07-2007, 01:57 AM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. GlobalReAlloc and Memory Errors HELP!!!!!!!!!!!!!!!!!
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 05-01-2002, 11:36 AM

Tags for this Thread