On Fri, Mar 22, 2013 at 3:27 AM, Richard Biener <rguent...@suse.de> wrote:
>
> I think the wrong-code fix is orthogonal to code improvements
> which will also trigger on the GIMPLE level (and where they
> will have a bigger impact).

I agree.  I think the patch to calls is fine unless Jakub objects.


> We can for example, in config/linux.h do
>
> #if OPTION_GLIBC
> #undef MALLOC_ABI_ALIGNMENT
> #define MALLOC_ABI_ALIGNMENT (2 * sizeof (void *))
> #endif
>
> if that's what glibc really guarantees (does it maybe have a
> feature macro for this?)

The code in glibc seems to be in malloc.c only.  The most conservative
version seems to be

#define INTERNAL_SIZE_T size_t
#define SIZE_SZ                (sizeof(INTERNAL_SIZE_T))
#  define MALLOC_ALIGNMENT       (2 * SIZE_SZ)

In GCC terms this would be 2 * int_size_in_bytes (size_type_node).

Ian

Reply via email to