Saturday, February 15, 2014

Approaches to deal with Memory Leaks


Memory leaks can be dealt in three approaches:


  • Avoid/Mitigate before they manifest
    • Code review
    • Static Analysis helps in detecting memory leaks even before tests are run.

All memory leaks can't be avoided proactively. Static analysis and code reviews can't be comprehensive due to diminishing returns rule. So, memory leaks creep into the code during initial stages of development as well as in later stages.

This creates the need to detect memory leaks as well as gracefully deal with the memory hogs resulting from unchecked memory leaks. 

  
  • Gracefully handle memory hogs resulting from unchecked memory leaksIf a memory leak is neither avoided through static analysis nor dealt with proactively with leak detection tools, memory leaks would eventually lead to memory hogs.
In such a case, the memory hog debugging techniques I discussed in my earlier posts would be handy to track down such unchecked memory leaks: 
        Memory Hog Debugging: Check system level memory accounting in linux 
        Memory Hog debugging: Check kernel memory accounting in linux 
        Memory Hog debugging: Check user space memory accounting in linux 
                OOM (Out of Memory) Killer in Linux 


Hope this helps.

1 comment:

Adele said...

Hi

Just a quick final last chance reminder to remind you to check out the video below...

==> How to Force the Universe to Manifest Your Dream Life

Also, at the end of the video you'll be given the opportunity to get a copy of the Manifestation Miracle system, which I highly recommend.

This system virtually puts the law of attraction on autopilot allowing you to use the Destiny Tuning Principle (which is explained in the video) to 'Tune' your destiny, into one of prosperity, happiness, love and more.

Watch this video and make sure you join Manifestation Miracle:

==> Number 1 secret to manifest your dream life

Many people don't realize there is a great big hole in the law of attraction which might be sabotaging your manifestation efforts.

Many people around the world are living their dream lives and you can be one of them, once you discover this missing ingredient.

Follow this link to discover the missing ingredient and manifest abundance, wealth, health, love and more...

==> Click here to discover this secret

I only ask that you use this secret with good intentions and an abundant mindset.

Kind regards,

Enjoy and have a great day!

UA-48797665-1