Mail Archives: djgpp/1997/02/14/00:49:37
From: | Ian D Romanick <idr AT cs DOT pdx DOT edu>
|
Message-Id: | <199702140543.VAA24227@sirius.cs.pdx.edu>
|
Subject: | Re: [Q] malloc() and assumptions about alignment
|
To: | fighteer AT cs DOT com
|
Date: | Thu, 13 Feb 1997 21:43:24 -0800 (PST)
|
Cc: | djgpp AT delorie DOT com
|
In-Reply-To: | <3303E687.2AF7@cs.com> from "John M. Aldrich" at Feb 13, 97 08:13:59 pm
|
MIME-Version: | 1.0
|
> > question 3 ...and what about other non-gcc compilers?
>
> No, you can't depend on this.
ANSI requires that any memory allocated with malloc() or calloc() be
aligned to the strictest alignment boundires required by the CPU. That
is, if integers must be at least word aligned but floats must be
paragraph aligned, memory from malloc() will be paragraph aligned.
--
I was actually quite pleased to see the Sonics win http://www.cs.pdx.edu/~idr
game four of the 1996 NBA Finals...until I saw the
USA Today headline that read, "Sweepless In Seattle."
- Raw text -