0
Static Memory Leak Detector  (For C language) <ul><li>Dalbhide Bipin </li></ul><ul><li>Joshi Ashwin </li></ul><ul><li>That...
Agenda <ul><li>Memory Leaks </li></ul><ul><li>Memory Leak Scenarios </li></ul><ul><li>Causes of Memory Leaks </li></ul><ul...
Memory Leaks ?  <ul><li>“ Unintentional” memory consumption </li></ul><ul><li>Memory  is not lost “physically” </li></ul><...
Memory leak scenarios   <ul><li>Cases where leaks are serious :- </li></ul><ul><li>1.where program is left running, and co...
Causes…
 
Scope <ul><li>Parsing C and generating symbol tables </li></ul><ul><li>Tracing and validating memory allocations and deall...
Block schematic ( modules)
 
Symbol table :-
 
Advantages :- <ul><li>Memory leaks detected at “compile time” </li></ul><ul><li>Saves valuable time ( debugging ) </li></u...
Challenges  <ul><li>Parsing “C” language  </li></ul><ul><li>Plugging this tool into existing “C” compiler </li></ul>
References  <ul><li>Principles of Compilers  - Aho / Ulmann </li></ul><ul><li>LEX YACC  - O’ Reilly </li></ul>
Questions
Upcoming SlideShare
Loading in...5
×

Static Memory Leak Detector

2,385

Published on

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,385
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
66
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Static Memory Leak Detector"

  1. 1. Static Memory Leak Detector (For C language) <ul><li>Dalbhide Bipin </li></ul><ul><li>Joshi Ashwin </li></ul><ul><li>Thatte Aditya </li></ul><ul><li>Mentor Mentor </li></ul><ul><li>Prof. Sase Mr.Umesh Nachan </li></ul><ul><li>KPIT Infosystems </li></ul>
  2. 2. Agenda <ul><li>Memory Leaks </li></ul><ul><li>Memory Leak Scenarios </li></ul><ul><li>Causes of Memory Leaks </li></ul><ul><li>Scope </li></ul><ul><li>Components / Modules </li></ul><ul><li>Code Snippet </li></ul><ul><li>Advantage of SMLD </li></ul>
  3. 3. Memory Leaks ? <ul><li>“ Unintentional” memory consumption </li></ul><ul><li>Memory is not lost “physically” </li></ul><ul><li>Symptoms include “reduced performance” , “failure” </li></ul>
  4. 4. Memory leak scenarios <ul><li>Cases where leaks are serious :- </li></ul><ul><li>1.where program is left running, and consumes more memory over time ( eg . Daemons , servers ) </li></ul><ul><li>2.where new memory is allocated frequently ( intentional) </li></ul><ul><li>3.where memory is very limited e.g. in an embedded system </li></ul><ul><li>4. where running on operating systems (such as AmigaOS ) where memory may not be automatically released on termination </li></ul><ul><li>Existing tools :- </li></ul><ul><li>mtrace, dmalloc, memwatch all detect memory leaks at run time. </li></ul>
  5. 5. Causes…
  6. 7. Scope <ul><li>Parsing C and generating symbol tables </li></ul><ul><li>Tracing and validating memory allocations and deallocations </li></ul><ul><li>(malloc (), free () ) </li></ul><ul><li>Generate report of memory leaks.( warnings , line by line analysis ) </li></ul>
  7. 8. Block schematic ( modules)
  8. 10. Symbol table :-
  9. 12. Advantages :- <ul><li>Memory leaks detected at “compile time” </li></ul><ul><li>Saves valuable time ( debugging ) </li></ul><ul><li>Helps in saving precious memory </li></ul><ul><li>Enhances performance </li></ul>
  10. 13. Challenges <ul><li>Parsing “C” language </li></ul><ul><li>Plugging this tool into existing “C” compiler </li></ul>
  11. 14. References <ul><li>Principles of Compilers - Aho / Ulmann </li></ul><ul><li>LEX YACC - O’ Reilly </li></ul>
  12. 15. Questions
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×