On Wed, Sep 02, 2009 at 06:20:17PM -0300, Felipe Monteiro de Carvalho wrote:
> 
> Is anyone using a profiler in Mac OS X? I am trying to detect if there
> are memory leaks.
> 
> gprof doesn't seam to work and valgrind doesn't seams usable from
> their readme, so I tryed "Sampler" from the Developers dir, but the
> application runs and after it nothing appears in the tables.

Why not just use unit heaptrc?

        <http://www.freepascal.org/docs-html/rtl/heaptrc/>

Quoted from that page:

        The HEAPTRC unit can be used to debug your memory
        allocation/deallocation. It keeps track of the calls to
        getmem/freemem, and, implicitly, of New/Dispose statements.

        When the program exits, or when you request it explicitly. It
        displays the total memory used, and then dumps a list of blocks
        that were allocated but not freed. It also displays where the
        memory was allocated.

        If there are any inconsistencies, such as memory blocks being
        allocated or freed twice, or a memory block that is released
        but with wrong size, this will be displayed also.

        The information that is stored/displayed can be customized using
        some constants.

Works very well.

        Tom
-- 
E-MAIL: T.Verhoeff @ TUE.NL     | Dept. of Math. & Comp. Science
PHONE:  +31 40 247 41 25        | Technische Universiteit Eindhoven
FAX:    +31 40 247 54 04        | PO Box 513, NL-5600 MB Eindhoven
http://www.win.tue.nl/~wstomv/  | The Netherlands
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to