0

I have a program whose use of memory grows by 6Mb every minute. I've ran valgrind on it and cannot find any leaks. So I suspect that it's some kind of realloc inside the graphic libraries I use (and of which I do not have the source). It's a 32 bit program, so it dumps core after it goes over 2Gb.

Is there some kind of option that will tell me something like: "Every time MyFunc is called, the memory grows by N bytes", and sort them out ?

Thanks

dargaud
  • 2,431
  • 2
  • 26
  • 39

1 Answers1

1

Wasted memory is not necessarily detectable as a leak. Fortunately Valgrind has many faces beside the familiar leak-finding one. Massif is your friend. Use it, take some detailed snapshots and look at places where most allocations happen.

n. m. could be an AI
  • 112,515
  • 14
  • 128
  • 243