This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]