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

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to