|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Is memprof only caring about unfreed memory?Hi,
I'm trying to use memprof to get some stats on which functions allocate how much memory etc. The problem I'm having is that I can't get any profile at all for my program. It's being executed just fine, but I can't get memprof to generate a profile. That situation is reproducable with a program like this: int main() { void *p = malloc(1024); free (p); } Once I remove the free() call and introduce a leak, memprof gives me a profile. So it does seem as if memprof only keeps track of leaked memory. Is it supposed to work that way, or did I stumble upon a bug? FWIW, I'm using SVN trunk w/ binutils 2.17. Thanks, Tilman -- A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? _______________________________________________ memprof-list mailing list memprof-list@... http://mail.gnome.org/mailman/listinfo/memprof-list |
|
|
|
|
|
Re: Is memprof only caring about unfreed memory?> Okay, so memprof just doesn't provide the feature that I need:
> For this silly example, I'd like it to tell me that main() allocated > 1024 bytes in total. If you're running on Linux, you might want to look at valgrind. If you run: valgrind --tool=massif your_prog then it generates a .txt and a postscript .ps describing memory use over the life of the program. Not sure if it gives the exact detail you're after, but it sounds closer. regards, jb _______________________________________________ memprof-list mailing list memprof-list@... http://mail.gnome.org/mailman/listinfo/memprof-list |
| Free embeddable forum powered by Nabble | Forum Help |