obstack default alignment

Andreas Schwab schwab@suse.de
Tue Aug 10 07:34:00 GMT 2004


Benno <benjl@cse.unsw.edu.au> writes:

> I would have thought it made sense to set the default alignment in the same
> way as malloc(). However failing shouldn't the code actually implement the
> docs and set the alignment to 4, rather than calculating?

It is never an error to return more alignment than what is garanteed.
After all, an 8 byte aligned object is also 4 byte aligned.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Libc-alpha mailing list