|
From: Maria G. <mar...@ya...> - 2006-04-27 14:41:26
|
My program allocates large amounts of memory. I am trying to use valgrind to determine how much memory is being allocated in various parts of the code, so I can know where to focus optimization efforts, so I am running with "--tool=memcheck --show-reachable=yes --leak-check=yes". Its showing big hunks of memory allocated, but the stack traces its giving for where they are being allocated dont make any sense. Initially, valgrind was showing most of the memory being allocated in an external shared object that was loaded, but never actually used in the code path for my test. I modified the code and the build, removing that library from the link line, and I see the exact same number and size of memory allocations, now pointing to another external shared object that I know is not at fault. Has anyone seen this before? Any tips on how to get this working? Maria L. Gullickson http://www.geocities.com/marialgullickson __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: Julian S. <js...@ac...> - 2006-04-27 21:16:51
|
If you are really looking to find out who allocated what where when, you'd be better off making friends with --tool=massif. Looking at the leak reports from memcheck can be confusing. > the code path for my test. I modified the code and the build, removing > that library from the link line, and I see the exact same number and > size of memory allocations, now pointing to another external shared > object that I know is not at fault. I think you'd have to post some of the details of the leak reports for us to make any progress with this. J |