From owner-freebsd-hackers Sat Sep 15 11: 3:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 0AAD237B403; Sat, 15 Sep 2001 11:03:53 -0700 (PDT) Received: (from obrien@localhost) by dragon.nuxi.com (8.11.6/8.11.1) id f8FI3bL53737; Sat, 15 Sep 2001 11:03:37 -0700 (PDT) (envelope-from obrien) Date: Sat, 15 Sep 2001 11:03:37 -0700 From: "David O'Brien" To: Yar Tikhiy Cc: Mike Smith , hackers@freebsd.org, msmith@mass.dis.org Subject: Re: Driver structures & alignment Message-ID: <20010915110337.B53569@dragon.nuxi.com> Reply-To: hackers@freebsd.org References: <200109132309.f8DN9vX03967@mass.dis.org> <20010914122344.A38530@snark.rinet.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010914122344.A38530@snark.rinet.ru>; from yar@freebsd.org on Fri, Sep 14, 2001 at 12:23:44PM +0400 X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Sep 14, 2001 at 12:23:44PM +0400, Yar Tikhiy wrote: > E.g., will the following structure: > struct foo { > }; > contain alignment holes in any architecture/compiler? It is best to order this from largest to smallest size if you are worried about alignment holes, etc. int64_t d; /* 8-byte boundary */ int32_t c; /* 4-byte boundary */ int32_t f; /* 4-byte boundary */ int16_t a; int16_t b; int8_t e[4]; -- -- David (obrien@FreeBSD.org) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message