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

Re: [Xen-devel] [RFC PATCH V2 1/8] xen/mem_event: Cleanup of mem_event structures



On Fri, Jan 23, 2015 at 10:00 AM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
> (re-adding xen-devel)
>
>>>> On 22.01.15 at 17:54, <tamas.lengyel@xxxxxxxxxxxx> wrote:
>> On Thu, Jan 22, 2015 at 5:34 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>>>>> On 22.01.15 at 17:23, <tamas.lengyel@xxxxxxxxxxxx> wrote:
>>>> Wouldn't making the
>>>> struct packed just take care of it automatically?
>>>
>>> How would you envision to do that without using compiler
>>> extensions?
>>
>> My understanding of making the struct packed is that there is simply
>> no alignment and padding. Thus, it would look the same on 32-bit and
>> 64-bit as the size of each member is explicitly the same on each
>> architecture. Am I missing something here?
>
> But isn't that exactly what I suggested by adding explicit padding?
> If not, please give an example.
>
> Jan

Ack, I was thinking of using  __attribute__((packed)) but I see your
point now that that's a gcc extensions. So we are going to have to do
it by hand as you said.

Tamas

_______________________________________________
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®.