[fpc-pascal] Is such memory statistics possible?

Max Vlasov max.vlasov at gmail.com
Mon Aug 22 09:02:38 CEST 2011


On Sun, Aug 21, 2011 at 3:06 PM, Ludo Brands <ludo.brands at free.fr> wrote:

> **
> Attached a patch for the following:
> - ported to win64
> - added a Depth parameter to PMMCollectStat (default 15). When the lcl is
> build with debug line info, the output from PMMCollectStat is cluthered with
> LCL functions such as message loop/handling functions. Depth is the maximum
> stack "backtrace" used to create the list.
>
>
>
These are useful additions, thanks. I suppose the limit automatically solves
the problem of first winners whose are not usable in real life.

I tried to use it with Lazarus (with opening 150 files afterwards) and the
results were bad in terms of the speed, 30 minutes just to start and a
couple hours to work (1.7 Ghz Celeron), obviously something like hash table
is needed. Also showing the number of memory requests for particular
function overall can be also useful, it could add more sense to some
puzzling entries.

As for lazarus results, some entries are still unexplained to me (the first
~300 are in the attachment)

[ 19,832,531 ]  TMAINIDE__DOOPENEDITORFILE
[ 19,801,582 ]  TWIN32WIDGETSET__SETFOREGROUNDWINDOW
the code inside is only Windows.SetForegroundWindow(HWnd), but maybe windows
forces sending message to the tab and this forces the tab (synedit) to make
postponed operations. It's the only explanation I have currently
...
[ 19,749,554 ]  GETWIN32WINDOWINFO
...no explanation
[ 19,686,289 ]  CLEANANDEXPANDFILENAME
...no explanation
[ 14,367,684 ]  FILEGETATTRUTF8
...no explanation

Possibly those were false positives i.e. some numbers on the stack that
falls into usable range, but actually is something else.

Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110822/c6304f5f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: laz_report2011_08_20.txt.zip
Type: application/zip
Size: 4787 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20110822/c6304f5f/attachment.zip>


More information about the fpc-pascal mailing list