On Tue 2008-02-12 20:18:41 UTC-0000, John Matthews ([EMAIL PROTECTED]) wrote:
> Hi- thanks for your reply. Sorry, I don't think I made myself clear-
> what I'm worried about is for example:
>
> typedef struct
> {
> char c;
> } Atype;
>
> Say sizeof(Atype) == 1. Then:
>
> Atype *ptr = malloc(10 * sizeof *ptr);
>
> This allocates 10 bytes. But is it possible that the compiler pads
> consecutive Atype structures such that:
>
> (ptrdiff_t)&ptr[1] - (ptrdiff_t)&ptr[0] > 1 ?
No. It would break things.
