[fpc-devel] Re: systemh.inc InterLockedIncrement64 (var Target: int64)

Hans-Peter Diettrich DrDiettrich1 at aol.com
Wed Oct 27 23:14:50 CEST 2010


Andrew Brunner schrieb:
> I have a 64bit cpu here running 32bit Windows 7.  I was compiling my
> project under Windows 7 to do some debugging when I came across the
> problem when trying to lock increment int64 variables for transactions
> and bytecounts (general counter purposes).

Why must such general counters ever be 64 bit?

With one such event per second the progam must run for 8 hours, in order 
to overflow an 16 bit counter. With 32 bits this will happen only after 
20000 days, or about 60 years.

DoDi




More information about the fpc-devel mailing list