Am 11.09.2017 11:14 schrieb "Ryan Joseph" <r...@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
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to