From: Marco C. <ma...@in...> - 2004-07-29 17:14:11
|
> > > An idea would be to > > try to check how much memory inside the pool is actually allocated and > > deallocated everytime the STL data structures are created and > > destroyed. But I do not know how to do this. Could you help me? > > It'd be better to just export GLIBCPP_FORCE_NEW=1 in your environment > (assuming gcc 3.2.2 or later) before running. For more info (or if you > have an earlier version of gcc), see FAQ 4.3 (which can be found at > http://valgrind.kde.org/faq.html) I tried this with the brief code posted and now it happens that the first passage in the loop is the fastest with respect to all the others. Which is exactly what happens with my extended code, but not what I want. I would like that there be no difference between the first passage and all the othres. I run valgrind without memory pool and now there is no memory leackage at all in both codes (the reduced posted and the extended I use). Which is then the reason because the first passage is different in performance with respect to the others? Thanks, Marco |