[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Byte alignment



On Thu, 4 Jul 2002, Lars H. wrote:

> Nu kan man komme om meget ved at have lidt viden når struct's skrives. Ved 
> at bytte på enkelte værdier vil det give det samme vil jeg mene. 
> 
> Hvis du f.eks. i en struct har 4 stk. UInt32 og 4 stk. UInt32 er det værste 
> du kan gør dette.

Ahem... 32/8 :-)

Anyway, det kommer jo også an på ting som cachelinier, men generelt har du 
ret.

> 
> Altså byt om, og vær glad. 
> Kender ingen compiler eller precompiler der kan lave denne ombytning. Men 
> har heller ikke checket op de seneste versioner.

Det ville medføre mange kompatibilitetsproblemer - tænk på at du så ikke 
ville kunne regne med layoutet i headerfiler.

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
Microsoft's stance in this brouhaha is, of course, hypocritical to the
point of being nauseating. 
    -     Eric S. Raymond on MS's demand that AOL use open protocols for IM



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *