This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Problem with malloc on PA
- To: willy at ldl dot fc dot hp dot com (Matthew Wilcox)
- Subject: Re: Problem with malloc on PA
- From: Ulrich Drepper <drepper at redhat dot com>
- Date: 25 Apr 2001 15:38:26 -0700
- Cc: libc-alpha at sources dot redhat dot com
- References: <20010425152918.H1166@zumpano.fc.hp.com>
- Reply-To: drepper at cygnus dot com (Ulrich Drepper)
willy@ldl.fc.hp.com (Matthew Wilcox) writes:
> malloc() currently returns pointers which are 8-byte aligned. Would it
> be possible to change it so that they're 16-byte aligned?
Not in general, but for PA, yes.
> 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?
What type does gcc return __alignof__(type) == 16 for? We should be
able to define
#define MALLOC_ALIGNMENT MAX(SIZE_SZ + SIZE_SZ, __alignof__(type))
The rest should then fall into place.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------