Mail Archives: djgpp/1997/02/16/16:20:28
On 13 Feb 1997 20:54:09 GMT beppu AT rigel DOT oac DOT uci DOT edu (John Beppu) writes:
>
> question 1 Is it safe to assume that memory allocated with
> malloc() will be aligned on at least a 4 byte
> boundary. (using djgpp)
If I had to guess, I'd say yes - but guessing is dangerous. It's easy to
check the lower 2 bits to find out, though.
>
> question 2 Is it safe to assume the above will be true of
> ports of gcc to other platforms?
Other platforms would (presumably) have different penalties for different
alignments, so imposing the Intel alignment on them makes no sense.
>
> question 3 ...and what about other non-gcc compilers?
As in, Borland or MS? I wouldn't assume anything about them.
...Chambers
- Raw text -