Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jul 2002 12:45:52 +0100
From:      "Peter Edwards" <pmedwards@eircom.net>
To:        tlambert2@mindspring.com
Cc:        luigi@freebsd.org, mike@freebsd.org, current@freebsd.org
Subject:   Re: different packing of structs in kernel vs. userland ?
Message-ID:  <20020715114553.5B18A43E6E@mx1.FreeBSD.org>

next in thread | raw e-mail | index | archive | help
Hi,

> He's making the valid point that for:
>
>         struct foo *fee;
>
> It's possible that:
>
>         sizeof(struct foo) != (((char *)&fee[1]) - ((char *)&fee[0]))

Wouldn't that mean

.. struct X *xarr = malloc(sizeof (struct X) * arrayLen);

wouldn't produce a useable array of struct X of length arrayLen?
That can't be right.

-- 
Peter Edwards.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020715114553.5B18A43E6E>