This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does malloc tell us anything about alignment modulo k?


Geert Bosch wrote:
> We're having a lot of trouble with this for Ada as well.

 Definitely. And not only with malloc (see below).

> Probably there should be a separate MALLOC_ALIGNMENT definition
> in GCC.

 Probably.

 What would for sure help a whole lot is to have a precise description of what
 expectations are set regarding various alignment related configuration macros
 and what is supposed to happen (work/not-work/be-rejected) in extreme
 situations.

 Some bits are already documented. Some are not and raise questions IMHO.

 As a single instance, are there rules about how BIGGEST_ALIGNMENT and
 STACK_BOUNDARY should relate ? It seems not, according to the doc and to
 various actual target configurations.

 It then appears that some alignment requests (up to BIGGEST_ALIGNMENT)
 are not guaranteed to be honored for stack objects when STACK_BOUNDARY
 < BIGGEST_ALIGNMENT. Isn't that a problem ? It is a very typical one for
 Ada.



 
 





 









 
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]