This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX
- From: Ulrich Drepper <drepper at redhat dot com>
- To: Steve Munroe <sjmunroe at us dot ibm dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 11 Mar 2004 09:08:50 -0800
- Subject: Re: [PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX
- Organization: Red Hat, Inc.
- References: <OFBD3FF4E7.09B63726-ON86256E54.005D062C-86256E54.005DB6A5@us.ibm.com>
Steve Munroe wrote:
> Would it be acceptable to extent malloc.c to allow MALLOC_ALIGNMENT to be
> changes at runtime via mallopt? Then for power we can detect VMX in
> dl_hwcap and change the alignment only on the hardware that requires it!
No. You have to use posix_memalign or do alignment explicitly in the
allocated block. It causes all kinds of headache if we start magically
supporting broken apps which use malloc incorrectly this way. Programs
must use the right interfaces.
--
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â