This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
16-byte-aligned malloc()?
- From: Rick Mann <rmann at latencyzero dot com>
- To: newlib at sourceware dot org
- Date: Thu, 6 Sep 2007 18:18:12 -0700
- Subject: 16-byte-aligned malloc()?
Hi. To make some of the hardware on the PXA320 happy, I need to
allocate buffers on 16 byte boundaries (lower four bits of address
should be zero. Does anyone have any suggestions on the best way to
accomplish this?
In certain cases, I could probably have the linker script create
sections (for example, I need to put a couple of frame buffers in
external memory; I think the linker script is expressive enough to
let me define a couple symbols with those addresses, and give me the
added benefit of preventing BSS data from encroaching into those, but
that's really a question for the GCC list).
In other cases, I need to declare static structures or malloc() space
for them. They are much smaller (16 bytes), but still need to be 16
byte-aligned.
Will I need to modify malloc() to do this?
TIA,
--
Rick