mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Brandon Philips <brandon@ifup.org>
To: Daniel Drake <dsd@gentoo.org>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Documentation about unaligned memory access
Date: Wed, 5 Dec 2007 21:07:34 -0800	[thread overview]
Message-ID: <20071206050734.GA27132@ifup.org> (raw)
In-Reply-To: <20071203161101.A63469D4ED7@zog.reactivated.net>

On 16:11 Mon 03 Dec 2007, Daniel Drake wrote:
> Here's a document I wrote after figuring out what unaligned memory access
> is all about. I've tried to cover the information I was looking for when
> trying to learn about this, without producing a hopelessly detailed/complex
> spew. I hope it is useful to others.
> 
> Signed-off-by: Daniel Drake <dsd@gentoo.org>
> 
> ---
<snip>
> +These macros work work for memory accesses of any length (not just 32 bits as

Remove a "work" here.

> +in the examples above). Be aware that when compared to standard access of
> +aligned memory, using these macros to access unaligned memory can be costly in
> +terms of performance.
> +
> +If use of such macros is not convenient, another option is to use memcpy(),
> +where the source or destination (or both) are of type u8* or unsigned char*.
> +Due to the byte-wise nature of this operation, unaligned accesses are avoided.

Cheers,

	Brandon

      reply	other threads:[~2007-12-06  5:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-03 16:11 Daniel Drake
2007-12-06  5:07 ` Brandon Philips [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=20071206050734.GA27132@ifup.org \
    --to=brandon@ifup.org \
    --cc=akpm@linux-foundation.org \
    --cc=dsd@gentoo.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®