[fpc-pascal] FPC + valgrind massif problems
Sven Barth
pascaldragon at googlemail.com
Fri May 11 08:48:01 CEST 2012
Am 11.05.2012 02:40, schrieb Michalis Kamburelis:
> 2. Is there any other reliable memory profiler for FPC? As you can swap
> memory manager in Pascal, and FPC can give you a backtrace, I suppose
> it's quite possible to just write a unit that works between your program
> and standard memory manager, and tracks memory usage this way. This will
> only measure memory use of Pascal code (external libs don't go through
> FPC memory manager), but that would be very fine for me --- I know
> (well, I'm 99% sure) that my Pascal code is the main memory eater here.
>
> I didn't find any (good and maintained) memory profiler mentioned on
> http://wiki.lazarus.freepascal.org/Profiling#Memory_Profiling . (I tried
> FpProfiler, but it depends on inserting instrumentation code into Pascal
> sources. That's actually a very nice idea, but it means it's closely
> tied to what fcl-passrc can handle. And current fcl-passrc still lacks a
> couple of features (reported). Also FpProfiler seems to use an older,
> local fcl-passrc version.)
You could try whether heaptrc is of any help for you (see here:
http://www.freepascal.org/docs-html/rtl/heaptrc/usage.html ). If not it
might at least provide a starting point if you should decide to write a
custom memory profiler. Otherwise I don't know of any FPC based memory
profilers.
Regards,
Sven
More information about the fpc-pascal
mailing list