Mail Archives: djgpp/1997/02/13/22:54:59
John Beppu wrote:
>
> question 1 Is it safe to assume that memory allocated with
> malloc() will be aligned on at least a 4 byte
> boundary. (using djgpp)
Yes, as long as the standard compilation switches are used. Take a look
at the gcc docs for more information; or you could just get the library
sources (v2/djlsr201.zip) and peek into 'malloc.c'. :)
> question 2 Is it safe to assume the above will be true of
> ports of gcc to other platforms?
Probably, but it's best to test it to make sure.
> question 3 ...and what about other non-gcc compilers?
No, you can't depend on this.
May I ask what it is that you are doing that depends on memory
alignment?
--
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>++ W++ N++ o+>++ K? w(---)
O- M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+(++) tv+() b+++ DI++ D++ G>++
e(*)>++++ h!() !r !y+()
------END GEEK CODE BLOCK------
- Raw text -