On Tuesday, December 13, 2011 09:04:09 pm janjust wrote: > Hey group, > I'm wondering if it's possible to intercept the malloc calls without > having to call valgrind's malloc wrapper. > The reason being is that I'm noticing the wrapper allocating chunks in > different sizes than say glibc's malloc. For practical purposes I would > only like to record the return address of the malloc call and the block's > size. I hope this makes sense. > Thoughts?
You can probably do that, in the sense that the framework provides the necessary infrastructure. The basic thing you will need to do is change the malloc replacement functions into wrapper functions; see the section on function wrapping and interception in the user documentation. It may take quite a lot of work to do that, though. >From a practical point of view, if you do something like this there is a significant risk that you will reduce memcheck's ability to detect errors. So the best advice is, imo, don't mess with it. J ------------------------------------------------------------------------------ Learn Windows Azure Live! Tuesday, Dec 13, 2011 Microsoft is holding a special Learn Windows Azure training event for developers. It will provide a great way to learn Windows Azure and what it provides. You can attend the event by watching it streamed LIVE online. Learn more at http://p.sf.net/sfu/ms-windowsazure _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users