[PATCH] PPC32 Linuxthreads Chance MALLOC_ALIGNMENT for VMX

Ulrich Drepper drepper@redhat.com
Thu Mar 11 17:08:00 GMT 2004


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 ❖



More information about the Libc-alpha mailing list