All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: shared memory between 32bit & 64bit applications
Date: Tue, 04 May 2004 02:04:11 +0000	[thread overview]
Message-ID: <6869.1083636251@kao2.melbourne.sgi.com> (raw)
In-Reply-To: <20040503132511.GJ2281@parcelfarce.linux.theplanet.co.uk>

On Mon, 3 May 2004 14:25:11 +0100, 
Matthew Wilcox <willy@debian.org> wrote:
>Nope.  You're being bitten by different struct padding rules.
>
>#include <stdio.h>
>
>struct foo {
>        int req;
>        long long id;
>        int abc;
>};
>
>int main(void) { return printf("%d\n", sizeof(struct foo)); }
>
>On ia64, this prints 24; on i386 it prints 16.
>
>You could declare it __attribute__((packed)) or you could reorder the
>elements in the struct to put the largest elements first.

Or compile i386 code with -malign-double which will align i386 long
long values on 8 byte boundaries, the same as ia64.


      parent reply	other threads:[~2004-05-04  2:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-03 13:25 shared memory between 32bit & 64bit applications Matthew Wilcox
2004-05-03 13:28 ` ARADHYA, CHINMAYA TM (STSD)
2004-05-03 15:07 ` Grant Grundler
2004-05-04  2:04 ` Keith Owens [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6869.1083636251@kao2.melbourne.sgi.com \
    --to=kaos@ocs.com.au \
    --cc=linux-ia64@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.