Re: Lock-free reference counting
- From: Stephen Howe <sjhoweATdialDOTpipexDOTcom>
- Date: Mon, 01 Dec 2008 13:48:06 +0000
On Fri, 28 Nov 2008 20:52:25 +0000, Jon Harrop <jon@xxxxxxxxxxxxxxxxx>
Stephen Howe <sjhoweATdialDOTpipexDOTcom> wrote:
On Tue, 25 Nov 2008 01:02:41 +0000, Jon Harrop <jon@xxxxxxxxxxxxxxxxx>
Juha Nieminen wrote:
Jon Harrop wrote:
Yes, of course. The cost is in repeatedly incrementing and decrementing
counts during the lifetime of the reference-counted value. Nothing to
do with initializing it.
Oh, so now it does *not* have anything to do with touching random
locations in memory, unlike you claimed earlier. Now it's only related
to the increments and decrements of the counter.
Which are scattered across memory.
That depends on whether the counters are intrusive or extrusive.
If they are instrusive, then that is not so.
If you're saying that the counter is alongside the value itself then that is
incorrect because reference counts get bumped even when the value itself is
You said, "Which are scattered across memory."
I am pointing out that the counters are _NOT_ scattered in memory if
the reference counters are instrusive, the reference counters are
adjacent in memory to the object they count.
Your statemet is likely to be true for extrusive counters.
As to your last statement, that is only true if the object is passed
by value, it is not true if passed by reference or as a pointer, the
reference counts are _NEVER_ bumped.
You seem to remarkably cavaliar with your statements, they are not
- Prev by Date: Linux Sockets UDP and fragmentation
- Next by Date: Re: Linux Sockets UDP and fragmentation
- Previous by thread: Linux Sockets UDP and fragmentation
- Next by thread: Re: Lock-free reference counting