[fpc-devel] Need heap manager -gv explanation [tests]

Tomas Hajny XHajT03 at hajny.biz
Tue Apr 29 12:37:33 CEST 2014

On Tue, April 29, 2014 12:12, Petr Kristan wrote:
> On Tue, Apr 29, 2014 at 11:49:20AM +0200, Tomas Hajny wrote:
>> On Tue, April 29, 2014 10:30, Petr Kristan wrote:
>>  .
>>  .
>> > I use "inteligent" block increasing. I can optimize program, but why
>> > is
>> > fpc heap manager to slow?
>> Well, results of your test program on my machine (physical machine, MS
>> Win
>> 7 32-bit) show something different:
>> Sum 4431ms
>> (compiled without cmem / without valgrind)
>> Sum 5008ms
>> (compiled with -gv; as expected, adding CMem to the uses clause and
>> compiling without -gv gives basically the same result).
> Are you sure that -gv in windows has any effect?
> I think, that valgrind can be used only in unix systems. Isn't -gv
> option silently ignored in windows?

Use of CMem instead of the internal FPC heap manager is triggered for -gv
regardless of the target platform. In addition, the results for source
compiled with CMem added explicitly to the uses clause (without using -gv)
are also the same.

>> Tests performed with trunk compiler based on SVN from about 10 days ago.
>> Results for 2.6.4 are more or less the same.
> Approve, I tested in 2.6. too.
>> I don't know the reason of your difference, but no time necessary at all
>> (0 ms) for the valgrind variant looks very suspicious to me.
> But compiling by kylix compiler, i get the same results as by fpc with
> -gv option in linux.
> This is the reason why I start to hunt where is my program to slow if
> compiled by fpc against kylix.

Can't it be somehow related to the method used for measuring the time
under Linux? Is the result shown inside consistent to the overall time
necessary for the program run?


More information about the fpc-devel mailing list