4

I am new to memory leaks and memory profiling. Kindly can anyone help me out in finding the answers of the below mentioned questions

When to check a memory leak, during coding phase or testing phase? Who is responsible for identification of memory leaks, Developer or Tester? What is the best time to identify a memory leak?
Who is responsible to run a memory profiler like ANTS (Developer or tester) ?

2 Answers 2

5

It's best to look for and identify all issues as early as possible. The QAs can pick this stuff up, but by then in a sense it's too late.

You should (as a developer) look to identify and mitigate such issues as early as possible and design for them, rather than patch post-development.

It's an oft-stated maxim that to fix each bug/issue in a successive stage of development costs 10x what it does in the earlier stage (different figures are quoted sometimes but the magnitude remains the same), and as such resolving or avoiding issues as early as possible is the most desirable (cost-effective) outcome.

3
  • We have a web application(already developed) and we are facing memory leaks issues at client side. we are discussing on how to best implement memory profiler to identify memory leaks at this stage. so at this stage should the QA take it up and identify the issues, and for the long term(later releases) developer will have to look into this during development and QA should only cross verify via Memroy profiler?
    – JHaider
    Commented May 28, 2013 at 9:43
  • Off topic but the oft-stated maxim might not actually be true - read The Leprechauns of S/w engineering... Commented May 28, 2013 at 14:21
  • I agree, this is typically the job of the developer, however it sometimes is directed by me due to some performance/stress testing that I have been doing and noticed memory spikes or memory leaks.
    – Sam Woods
    Commented May 28, 2013 at 18:28
1

It's the team's responsibility. period.

Now check what is the situation in your team and choose the best solution for you, as long as the task is done.

Memory leaks can be identified at different stages using different tools, depending on your product and environment. Some questions and ideas to lead you-

  • Skill set: what is the testers/developer ratio in your team ? what skills do they have finding memory leaks i.e. can your testers code and can your developer's test?

  • Resources: in some cases, like Linux applications, there are free easy to usage solutions while in other cases like system on a chip finding memory leaks can require dedicated equipment and software.

  • Effort: detecting memory leaks can be as easy as running static analysis tools, be more complex if runtime memory leak detection tools are used or can be very complex and time-consuming if you are testing a low rate embedded device.

  • Risk: are using well-proven code being used for short periods of time or are you sending custom software to a 10-year mission to Mars with a slow communication link?

  • Test in production: can you monitor your product in production to find real problems before they become catastrophic ? can you mimic real usage in a test environment so you don't need to test in production?

An interim summary and advice-

Finding memory leaks is not a one-time effort, it should be done in different stages of development and testing to find different types of problems optionally by different people

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.