[rrd-developers] portable structs ... more testes

Erik de Mare erik at oezie.org
Tue Jun 26 08:40:17 CEST 2007


output in alpha with tru64:

maree at sou003> cc -o tobi2 tobi2.c 
maree at sou003> ./tobi2
struct test non-aligned:
 30 31 32 00   88 88 88 88  
 15 cd 5b 07   88 88 88 88  
 81 ee 46 95   5e 43 26 5b  
 15 cd 5b 07   88 88 88 88  
 81 ee 46 95   5e 43 26 5b  
 15 cd 5b 07   00 00 00 00  
 01 00 00 00   88 88 88 88  


struct test aligned:
 30 31 32 00   88 88 88 88  
 15 cd 5b 07   15 cd 5b 07  
 81 ee 46 95   5e 43 26 5b  
 81 ee 46 95   5e 43 26 5b  
 15 cd 5b 07   00 00 00 00  
 01 00 00 00   88 88 88 88  


On Tue, 26 Jun 2007 08:24:24 +0200 (CEST), Tobias Oetiker <tobi at oetiker.ch> wrote:
> Hi RRDdevelopers,
> 
> I have done some more portability tests. this time with struct
> alignement.
> 
> have a look at
> 
> http://oss.oetiker.ch/rrdtool-trac/wiki/PortableRrdFormat
> 
> so it seems that if the structs are layed out properly the memory
> layout is the same at least on intel/linux and sparc/solaris
> architectures.
> 
> additional input from other architectures is highly appreciated.
> 
> cheers
> tobi
> 
> 
> --
> Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
> http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
> 
> _______________________________________________
> rrd-developers mailing list
> rrd-developers at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers



More information about the rrd-developers mailing list