Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread Jens Alfke
On May 2, 2012, at 11:38 AM, David Hoerl wrote: > Valgrind monitors every malloc, and when the app/program quits tells you not > only what leaks you have, but the stack trace that got you to the allocation. > Absolutely amazing. I've used it with several open source libraries I support. Valgri

Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread Wim Lewis
On 2 May 2012, at 10:55 AM, Wade Tregaskis wrote: > Symbolication picks the first known symbol before the address in question. > It's the consequence of a tragic design flaw in debug info formats to date. > > It's more obvious when this goes wrong in Crash Reporter or Shark where you > can see

Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread David Hoerl
Look at Valgrind - it works on the Mac now. What you do is have a demo app or even a GUI that launches, runs, then quits. You enter your app and args as arguments to valgrind when you run it. Valgrind monitors every malloc, and when the app/program quits tells you not only what leaks you have,

Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread Wade Tregaskis
> Bytes Used# LeaksSymbol Name > 84.81 KB 100.0%48PQgetResult > 84.81 KB 100.0%48 pqParseInput3 > 80.00 KB 94.3%40 pqResultAlloc > 80.00 KB 94.3%40 malloc > 4.00 KB 4.7%4 pqAddTuple > 4.00 KB

Re: Instruments, how to fix leak in C Lib

2012-05-02 Thread Jean-Daniel Dupas
Le 2 mai 2012 à 09:59, Alexander Reichstadt a écrit : > Hi, > > through Instruments I found a memory leak outside my code in a pqlib, the > postgres client library. > > This is what Leaks prints out: > > Bytes Used# Leaks Symbol Name > 84.81 KB 100.0% 48 PQgetR

Instruments, how to fix leak in C Lib

2012-05-02 Thread Alexander Reichstadt
Hi, through Instruments I found a memory leak outside my code in a pqlib, the postgres client library. This is what Leaks prints out: Bytes Used # Leaks Symbol Name 84.81 KB 100.0% 48 PQgetResult 84.81 KB 100.0% 48 pqParseInput3 80.00 K