[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Little help with blk ring



>>> On 23.05.12 at 01:43, Daniel Castro <evil.dani@xxxxxxxxx> wrote:
> On Tue, May 22, 2012 at 8:53 AM, James Harper <james.harper@xxxxxxxxxxxxxxxx> 
> wrote:
>> Is sizeof() what you expect it to be? That would cause the first request to 
> be (mostly) okay, but subsequent requests to be further and further out of 
> alignment.
> 
> Right on the spot!
> Here is the output of sizeof for the struct and for each member:
> SIZEOF ring_res:12 id:8 operation:1 status:2
> There is seems to be an alignment problem, them sum of members is 11,
> but the whole struct is 12, the question now is, how can I tackle this
> problem?

But sizeof is 12, as expected. There should be no place in your
code where you (directly or indirectly) sum up the individual
members' sizes.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.