[fpc-pascal] Inclocked/declocked
Sven Barth
pascaldragon at googlemail.com
Mon Sep 11 11:20:20 CEST 2017
Am 11.09.2017 11:14 schrieb "Ryan Joseph" <ryan at thealchemistguild.com>:
>
> I was time profiling some code and saw these 2 functions taking up large
amounts of time. They’re coming from dynamic arrays and SetLength I believe
but I was curious what they are exactly because I don’t believe I’ve seen
them before. Is this normal for resizing dynamic arrays or are they doing
something else I would be interested in?
>
> SYSTEM_$$_INCLOCKED$INT64
> SYSTEM_$$_DECLOCKED$INT64$$BOOLEAN
They're used for the reference counter of the array (or string or
interface). The reference counter changes each time you assign an array or
pass it to a by-value parameter or if you change a value (cause the
compiler/RTL needs to make sure that the reference to the array is unique
then).
Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170911/704ebabb/attachment.html>
More information about the fpc-pascal
mailing list