From owner-freebsd-current@freebsd.org Tue Oct 24 08:19:06 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58202E4464D for ; Tue, 24 Oct 2017 08:19:06 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (xvm-110-62.dc2.ghst.net [46.226.110.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "theravensnest.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E394375171 for ; Tue, 24 Oct 2017 08:19:05 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [192.168.1.65] (host86-138-54-151.range86-138.btcentralplus.com [86.138.54.151]) (authenticated bits=0) by theravensnest.org (8.15.2/8.15.2) with ESMTPSA id v9O8Iu9w076471 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 Oct 2017 08:18:56 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: d60e724c-75b0-4b63-9702-f4a9d2bf6793: Host host86-138-54-151.range86-138.btcentralplus.com [86.138.54.151] claimed to be [192.168.1.65] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: There is *NO* abi stability in -head From: David Chisnall In-Reply-To: Date: Tue, 24 Oct 2017 09:18:50 +0100 Cc: FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <07ED56CD-A7D5-44DE-B44A-C24BE9FC5488@FreeBSD.org> References: To: Mateusz Guzik X-Mailer: Apple Mail (2.3273) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 08:19:06 -0000 On 23 Oct 2017, at 21:35, Mateusz Guzik wrote: >=20 > Instead, the same can be reshuffled: > struct crap2 { > int i1; > int i2; > void *p1; > void *p2; > }; >=20 > With offsets: >=20 > 0x1000 i1 > 0x1004 i2 > 0x1008 p1 > 0x1010 p2 >=20 > This is only 24 bytes. 2 ints can be placed together and since they = add > up to 8 the p1 pointer gets the right alignment without extra padding. If you are making changes of this nature, please consider sorting in the = other order. When we start seeing 128-bit pointers (which, with = CHERI-like systems, may be sooner than you think) then this ordering = will give you lots of padding, whereas putting the pointers first will = not. David