Hi,

On Thu, Dec 4, 2008 at 3:25 PM, Csaba Halász <[EMAIL PROTECTED]> wrote:

> On Thu, Dec 4, 2008 at 3:58 AM, Yon Uriarte <[EMAIL PROTECTED]> wrote:
> >
> >  One big contributor to size is SGAtomic. On windows it's 32 bytes for a
> 4
> > byte counter. That makes SGReferenced 32 bytes, too, for an 8 bytes
> payload.
> > After reading the docs on InterlockedIncrement (they say a 4 byte align
> is
> > necessary) I tried recompiling with SGAtomic aligned on 4 bytes, but i
> got
> > some quite obscure crashes inside ntsomething.dll called from malloc.
> Anyone
> > knows why we need to align to 32 bytes (x86's cache line) and not 4 bytes
> as
> > suggested by the docs?
>
> Somebody has recently switched some threading stuff over to OSG's
> classes, I wonder if we should throw out SGAtomic, SGReferenced, and
> SGSharedPtr in favor of OSG's implementation. Coincidentally,
> OpenThreads::Atomic doesn't have that align, it simply has a "volatile
> long" and presumably it works fine.
>
> --
> Csaba/Jester
>

Excellent idea. With the patch and some other changes it saves 100MB over
terrain, less over ocean.
That's just after the scenery has finished loading, should be more over
time.

greetings,
 yon

Attachment: referenced.patch
Description: Binary data

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to