|
From: ольга к. <olg...@gm...> - 2012-04-03 20:40:45
|
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. Olga 2012/4/3 Philippe Waroquiers <phi...@sk...>: > On Tue, 2012-04-03 at 22:06 +0200, ольга крыжановская wrote: >> How do I use custom memory allocators with valgrind? We'd like to use >> the memory allocators from AT&T libast but also like to use valgrind >> for (automated) error checking. Is there any howto document how to do >> this? >> >> Olga > > http://www.valgrind.org/docs/manual/mc-manual.html#mc-manual.mempools > describes what Valgrind provides for "real" custom allocators. > > Now, if libast provides a set of malloc/free/... compatible functions, > then you should rather modify Valgrind to intercept these replacement. > See bug https://bugs.kde.org/show_bug.cgi?id=219156 > for a patch implementing replacements for tcmalloc library. > > Philippe > > -- , _ _ , { \/`o;====- Olga Kryzhanovska -====;o`\/ } .----'-/`-/ olg...@gm... \-`\-'----. `'-..-| / http://twitter.com/fleyta \ |-..-'` /\/\ Solaris/BSD//C/C++ programmer /\/\ `--` `--` |