From: Richard Henderson <rth@twiddle.net>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
Juergen Doelle <jdoelle@de.ibm.com>,
linux-kernel@vger.kernel.org
Subject: Re: Pls apply this spinlock patch to the kernel
Date: Sat, 3 Nov 2001 13:01:56 -0800 [thread overview]
Message-ID: <20011103130156.D5984@twiddle.net> (raw)
In-Reply-To: <20011103115556.A5984@twiddle.net> <Pine.LNX.4.33.0111031215490.2026-100000@penguin.transmeta.com>
In-Reply-To: <Pine.LNX.4.33.0111031215490.2026-100000@penguin.transmeta.com>; from torvalds@transmeta.com on Sat, Nov 03, 2001 at 12:20:53PM -0800
On Sat, Nov 03, 2001 at 12:20:53PM -0800, Linus Torvalds wrote:
> If you have a 4-byte entry that is aligned to 128 bytes, you have 124
> bytes of stuff that the linker _will_ fill up with other things.
If you put the alignment on the type, not the variable, e.g.
typedef int aligned_int __attribute__((aligned(128)));
aligned_int foo;
then sizeof(foo) == 128, and the linker sees a 128-byte object,
not a 4 byte object with 128 byte alignment.
It's a subtle difference between alignment of types and alignment
of variables, but it makes sense if you think about it.
r~
next prev parent reply other threads:[~2001-11-03 21:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-29 16:22 Pls apply this spinlock patch to the kernel Juergen Doelle
2001-10-29 17:13 ` Linus Torvalds
2001-10-29 17:22 ` Alan Cox
2001-10-29 17:32 ` Linus Torvalds
2001-11-03 19:55 ` Richard Henderson
2001-11-03 20:20 ` Linus Torvalds
2001-11-03 21:01 ` Richard Henderson [this message]
2001-11-04 0:43 ` Linus Torvalds
2001-10-30 13:14 ` Anton Blanchard
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=20011103130156.D5984@twiddle.net \
--to=rth@twiddle.net \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jdoelle@de.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox