On Tue, 2012-04-03 at 22:40 +0200, ольга крыжановская wrote: > Philippe, libast provides both malloc replacement and a complex > allocation system based on io streams, e.g.sort of stdio with > disciplines on steroids where even string buffers, or lists and trees > of (nested) string buffers, can be a io stream or memory buffer. > > Is it really wise to modify valgrind just to intercept the custom > malloc/calloc/memalign/free implementation? It sounds like an over > kill and might be problematic because we would have to wait until each > Linux vendor has updated to the new valgrind version. If valgrind is not informed that libast has malloc/free/... replacements, then many/most valgrind tools are less functional (e.g. memcheck will not detect leaks).
So, if your application is using the malloc/free/... of libast rather than the "standard" malloc/free, I think it is a good idea to have the replacements done. Now, I do not understand why you would have to wait until each Linux vendor has updated to the new valgrind version. Just do the changes, and have your valgrind compiled in a corner :). (in addition, I am not sure a libast replacement patch for Valgrind would be committed). For what concerns the complex allocation system: if this system is doing a direct usage of libast malloc/free/..., then the replacements above will be good enough. If this complex allocation system is malloc-ing or mmap-ing a big block, and then does its own "small blocks" from these big blocks, then you have to add Valgrind mempool client requests in the libast code to have Valgrind understanding this complex allocation system. Philippe ------------------------------------------------------------------------------ Better than sec? Nothing is better than sec when it comes to monitoring Big Data applications. Try Boundary one-second resolution app monitoring today. Free. http://p.sf.net/sfu/Boundary-dev2dev _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users