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?

Attachment: pgpwhguroQJzN.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]