[prev in list] [next in list] [prev in thread] [next in thread] 

List:       backhand-users
Subject:    Re: [m_b_users] Problems with Backhand on Compaq DS10L (alpha) w/
From:       Leonardo Herrera <lherrera () certifica ! com>
Date:       2003-07-03 16:47:39
[Download RAW message or body]

Theo E. Schlossnagle wrote:
> Yes... alpha has an 8 byte time_t.  intel has 4 bytes.  However, there 
> is an 8 byte padding in the structure... it must be an alignment issue.  
> I have a Linux Alpha box sitting around here somewhere, if you don't 
> puzzle it out before me, then I'll figure it out.
> 
> Essentially, what we sould do is make sure that all the internal 
> elements of that structure are aligned on an 8 byte boundary.  There is 
> some clever compiler directive to do that, but it escapes me now.

Ok, I played a bit with the code. I cloned the serverstat struct and 
added the __attribute__ ((__packed__)) directive. Unsurprisingly, the 
results on the intel machine did not changed. In the alpha machine, 
sizeof(serverstat) decreased from 112 bytes (unaligned) to 108 bytes 
(aligned.) It's needed to deal with the extra 4 bytes from time_t?

Anyways, I'm going to try with just this change.

Regards,
-- 
Leonardo Herrera
mailto:lherrera@certifica.com


_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic