emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs-26 threads problem [win64]


From: Eli Zaretskii
Subject: Re: Emacs-26 threads problem [win64]
Date: Sun, 15 Oct 2017 19:30:16 +0300

> From: Andreas Schwab <address@hidden>
> Cc: Paul Eggert <address@hidden>,  address@hidden,  address@hidden
> Date: Sun, 15 Oct 2017 17:39:38 +0200
> 
> > OOC, when a program does
> >
> >   struct foo *ptr = malloc (sizeof struct foo);
> >
> > how is the alignment of the resulting pointer arranged to be "the
> > maximum of the struct members"? 
> 
> RTFM:
> 
>        The malloc() and calloc() functions return a pointer to  the  allocated
>        memory,  which  is  suitably  aligned for any built-in type.

I did, and thus my question: is GCC correct assuming movaps can be
used on a member of an arbitrary struct, if allocating that struct is
not guaranteed to produce the alignment expected by that instruction,
unless the program used aligned_alloc?

Sorry, this sounds like I'm right back to my first question, but
Paul's response seemed to indicate that the required alignment is
guaranteed, and you now seem to say it isn't.  I'm probably missing
something.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]