[fpc-pascal] Profiller for Mac OS X
Jonas Maebe
jonas.maebe at elis.ugent.be
Wed Sep 2 23:45:22 CEST 2009
On 02 Sep 2009, at 23:20, Felipe Monteiro de Carvalho wrote:
> Is anyone using a profiler in Mac OS X? I am trying to detect if there
> are memory leaks.
Profilers don't detect memory leaks. Profilers detect which code is
executed (a lot) by the program.
> gprof doesn't seam to work
gprof cannot detect memory leaks. gprof is also not supported on Mac
OS X/i386 (it does work on PowerPC, PowerPC64 and x86_64 though; it's
hard on i386 for implementation reasons). The next release of FPC will
properly given an error if you try to enable grpof profiling
information (-gp) on a platform that does not support it, instead of
silently do nothing.
> and valgrind doesn't seams usable from
> their readme,
The latest release of Valgrind works on Mac OS X/i386, but only under
10.5 (because due to its nature, it has to be completely syscall-based).
> so I tryed "Sampler" from the Developers dir, but the
> application runs and after it nothing appears in the tables.
Sampler can only display how the call stack varies during the run time
of the application.
As you discovered, ObjectAlloc is a tool you can use to detect memory
leaks.
A good way to find out development related things about Mac OS X is
googling with site:developer.apple.com, e.g. http://www.google.com/search?q=site%3Adeveloper.apple.com+memory+leaks
The first result is http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ManagingMemory/Articles/FindingLeaks.html
. Not all of it may be applicable to 10.4, but a lot of it still is.
Jonas
More information about the fpc-pascal
mailing list