[fpc-pascal] Is such memorystatisticspossible?
Ludo Brands
ludo.brands at free.fr
Mon Aug 22 14:08:00 CEST 2011
> Interesting suggestion, can you point to some code maybe in the lazarus
that does a similar job. Does GetLineInfo inside do something like this?
I'm currently experimenting with a variation of dump_stack in system.inc.
The first try skips a lot of the functions found by your initial
implementation. Still looking into that.
It was before and looking at how much cpu time spent, I will be probably
ready for the next measurement only after the hashing is implemented :). In
you question I see a guess, that the fewer the depth, the less likely false
positives get into view, right?
Right. Statistically, the smaller the stack you look at, the less falls
positives you get.
One reason for false positives is also that local variables aren't
initialised. Procedures declaring local variables like buf:array [0..1000]
of char; can cause a lot of false positives since the stack space used by
the array can contain return addresses of previously excuted functions. Here
the stack unwinding should help a lot, once it works.
Ludo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110822/cf310336/attachment.html>
More information about the fpc-pascal
mailing list