-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello Ian,
Does anyone else see problems like this?
I think Jim Healy saw growth in memory quite a while back.
If you are suspecting that the memory consumption is due to C++ code (ie Carpet other then you can try the attached memory tracer [there is a main() function at the end to show how to use it] to tag all calls to new/delete to the code). For Carpet I suspect that you may also want to change the malloc() call in mem<T>'s constructor (in CarpetLib/src/mem.cc) and mempool (same file) to eg new char[blah] or something similar so that they are also tracked.
The tracking is not thread safe at this point, you could likely add a pthread mutex though if you need that (I'd just add them around the new/delete implementations if I can get away with it).
Tracking is done by calling MemTagger::TagStack::PushTag("foo") which will tag all memory allocation until the next PushTag as coming from "foo". You can use PopTag("foo") to remove the current one and use the previous one (same as the hierarchical timers). I way to tag a fraction of the Cactus code would be to have the timers push and pop the tags.
Yours, Roland
- -- My email is as private as my paper mail. I therefore support encrypting and signing email messages. Get my PGP key from http://keys.gnupg.net.