This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Problem with malloc on PA
- To: libc-alpha at sources dot redhat dot com
- Subject: Problem with malloc on PA
- From: willy at ldl dot fc dot hp dot com (Matthew Wilcox)
- Date: Wed, 25 Apr 2001 15:29:18 -0600
The PA-RISC architecture requires a lock to be 16-byte aligned. So we
add __attribute__((aligned (16))) to our lock type and that aligns it
to a 16-byte offset within the struct. But if the struct isn't 16-byte
aligned, this loses.
malloc() currently returns pointers which are 8-byte aligned. Would it
be possible to change it so that they're 16-byte aligned? I took a quick
look at the code, and I saw MALLOC_ALIGN_MASK, but I'm not sure exactly
what effects simply changing this would have. I suspect I would want
to change MALLOC_ALIGNMENT as well, but not SIZE_SZ?
help greatly appreciated.