From: Oscar Levi <elf@netcom.com>
Subject: Dealing with unaligned accesses
Date: 1998/12/03 [thread overview]
Message-ID: <36673795.6C675A97@netcom.com> (raw)
I'm working on eliminating some unaligned accesses in smail. It happens
to be the case that the misalignment is due to a pointer, stored in a
structure, that is not being accessed on a 64 bit boundary. My question
is how to cope with this kind of problem.
The message from the kernel says that address 2017fbec is where the
access occurs. The data item at that address is an eight byte pointer.
The first byte of the structure is at address 2017fbd4. This means that
moving the pointer to the top of the structure won't help. In fact, the
structure is an even number of 64 bits in length.
When I look at the code, I see that this block is allocated by malloc.
I would expect malloc to return 64 bit aligned memory. Humph.
Does anyone know the correct solution to this kind of problem?
next reply other threads:[~1998-12-03 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-03 5:00 Oscar Levi [this message]
1998-12-09 5:00 ` Dealing with unaligned accesses David Hagood
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox