Global Sources
EE Times-India
 
EE Times-India > EDA/IP
 
 
EDA/IP  

More on Memory Leaks

Posted: 03 Apr 2002     Print Version  Bookmark and Share

Keywords:memory leaks  detecting memory leaks  memory allocator 

More on Memory Leaks We use an array to keep a record of each block of allocated memory. When the block is freed, we remove that record from our array. After each iteration of the main loop, we print a summary of the number of allocated blocks. Ideally, we would sort these blocks by type, but calls to malloc() and free() do not contain any type information. The best indication available is the size of the allocations, so that's what we'll record. We also need to store the address of the block allocated, so that we can locate and remove the record for that block when free is called. View the PDF document for more information.



Comment on "More on Memory Leaks"
Comments:  
*  You can enter [0] more charecters.
*Verify code:
 
 
Webinars

Seminars

Visit Asia Webinars to learn about the latest in technology and get practical design tips.

 

Go to top             Connect on Facebook      Follow us on Twitter      Follow us on Orkut

 
Back to Top