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

Andrew Brunner andrew.t.brunner at gmail.com
Wed Oct 27 22:52:03 CEST 2010


My SCS project which is a scalable unified collaboration and
communication server that uses counting for transactions and network
consumption across all implemented protocols.  Bytes, when aggregated
can clearly exceed the 2GB limitation within seconds.  Partial
transactions (PTX) can exceed over 30,000 per second and full
transactions (TX) are typically 50% of that... But these numbers need
to add up.  Meaning the aggregate TX count must be of some proportion
of the PTX otherwise they are bogus.

Int64 or QWord w/o locking or CAS is a serious issue for me.  I
absolutely need this feature or my transaction/byte counts will be off
per node per cluster and can lead to misinformation in the consumption
reports.

For the time being though I can restrict the scale on i386
architecture since I tried to re-map the methods in the system.inc
file to no avail.  It appears that FPC does not include the
Interlocked*64 methods inside the RTL.

On Wed, Oct 27, 2010 at 4:14 PM, Hans-Peter Diettrich
<DrDiettrich1 at aol.com> wrote:

> Why must such general counters ever be 64 bit?

Well, for starters overflow will occur easily without them.

> 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.

I honestly cannot think of one event per second in my projects with
the exception of timer triggered events in with a coarse granularity
setting.  Most of the 'bean' counting done in the cluster solution is
done for server management and reporting.

Still needing help...



More information about the fpc-devel mailing list