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

Sergei Gorelkin sergei_gorelkin at mail.ru
Tue Apr 29 13:02:44 CEST 2014


On 29.04.2014 14:37, Tomas Hajny wrote:

>>> 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?
>
Time measurement appears to be correct. Strace shows that reallocation happens using mremap 
syscalls, which apparently rearranges pages within address space without actual moving the data. 
This indeed can be done with almost zero overhead, but is hardly portable.

Regards,
Sergei




More information about the fpc-devel mailing list