[Users] Process memory growth

Roland Haas roland.haas at physics.gatech.edu
Fri May 16 17:33:07 CDT 2014

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.


- -- 
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.
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: MemTagger.cpp
Type: text/x-c++src
Size: 8726 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20140516/2338c533/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MemTagger.cpp.sig
Type: application/pgp-signature
Size: 72 bytes
Desc: not available
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20140516/2338c533/attachment-0001.bin 

More information about the Users mailing list