Hi,

On Tuesday 16 January 2007 01:31, Mike Wittman wrote:
> I don't have any experimental data on performance at this point, and I
> don't know that this would be a significant bottleneck.  I'm just
> interested to see if anyone has previously considered this approach in
> the event that it does become an issue for me.  What I do know is that
> during osg::Referenced creation the CRITICAL_SECTION structure requires
> separate heap allocation of about 56 bytes of memory on 32 bit Windows
> and about 80 bytes on 64 bit Windows, including an allocation of a
> kernel handle, and requires deletion of the same at destruction.  An
> atomic count would incur no extra allocation or deletion.
And at least on MSVC and gcc >= 4.1 there are compiler builtin functions to do 
atomic counts.
With that knowledge the compiler can probably even optimize successive 
ref/unref pairs away under some circumstances ...

   Greetings

          Mathias

-- 
Dr. Mathias Fröhlich, science + computing ag, Software Solutions
Hagellocher Weg 71-75, D-72070 Tuebingen, Germany
Phone: +49 7071 9457-268, Fax: +49 7071 9457-511
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to