HR Geeks

libsheap: Sheap Helps Examine Allocated Pointers

by enferex on Jul.15, 2009, under 757labs, tools

libsheap is a simple shared library to aid runtime heap analysis of an application. This library wraps malloc and free calls. The allocated data returned by the memory allocator is output as well as the amount of CPU cycles between calls to the true, underlying malloc implementation. If glibc’s malloc, ptmalloc2, is used the actual size, including the header malloc attaches to each returned chunk is reported. The size of a returned chunk is typically more than that of what the user requests, as the extra size can help reduce fragmentation.

Special thanks to Google and stackoverflow.com where I learned about wrapping routines in the GNU/Linux system. Much of the wrapping code was paraphrased from Checker’s answer to a post over at stackoverflow.com Thanks Checkers!

This project is released under the GNU LGPLv3 license. So take to your shears!

-Matt (enferex)

:, , , ,

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!