Re: There is *NO* abi stability in -head

From: David Chisnall <theraven_at_FreeBSD.org>
Date: Tue, 24 Oct 2017 09:18:50 +0100
On 23 Oct 2017, at 21:35, Mateusz Guzik <mjguzik_at_gmail.com> wrote:
> 
> Instead, the same can be reshuffled:
> struct crap2 {
>        int i1;
>        int i2;
>        void *p1;
>        void *p2;
> };
> 
> With offsets:
> 
> 0x1000 i1
> 0x1004 i2
> 0x1008 p1
> 0x1010 p2
> 
> 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
Received on Tue Oct 24 2017 - 06:19:06 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:13 UTC