Re: [Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-13 Thread Matt Turner
On Tue, Nov 13, 2018 at 9:43 AM Emil Velikov wrote: > > Hi Matt, > > On Mon, 12 Nov 2018 at 21:26, Matt Turner wrote: > > > > Prior to this patch sizeof(linear_header) was 20 bytes in a > > non-debug build on 32-bit platforms. We do some pointer arithmetic to > > calculate the next available

Re: [Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-13 Thread Emil Velikov
Hi Matt, On Mon, 12 Nov 2018 at 21:26, Matt Turner wrote: > > Prior to this patch sizeof(linear_header) was 20 bytes in a > non-debug build on 32-bit platforms. We do some pointer arithmetic to > calculate the next available location with > >ptr = (linear_size_chunk *)((char *)[1] +

Re: [Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-13 Thread Gustaw Smolarczyk
Wt., 13 lis 2018, 06:03: Matt Turner napisaƂ(a): > On Mon, Nov 12, 2018 at 3:07 PM Eric Anholt wrote: > > > > Matt Turner writes: > > > > > Prior to this patch sizeof(linear_header) was 20 bytes in a > > > non-debug build on 32-bit platforms. We do some pointer arithmetic to > > > calculate

Re: [Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-12 Thread Matt Turner
On Mon, Nov 12, 2018 at 3:07 PM Eric Anholt wrote: > > Matt Turner writes: > > > Prior to this patch sizeof(linear_header) was 20 bytes in a > > non-debug build on 32-bit platforms. We do some pointer arithmetic to > > calculate the next available location with > > > >ptr =

Re: [Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-12 Thread Eric Anholt
Matt Turner writes: > Prior to this patch sizeof(linear_header) was 20 bytes in a > non-debug build on 32-bit platforms. We do some pointer arithmetic to > calculate the next available location with > >ptr = (linear_size_chunk *)((char *)[1] + latest->offset); > > in linear_alloc_child().

[Mesa-dev] [PATCH 2/2] util/ralloc: Make sizeof(linear_header) a multiple of 8

2018-11-12 Thread Matt Turner
Prior to this patch sizeof(linear_header) was 20 bytes in a non-debug build on 32-bit platforms. We do some pointer arithmetic to calculate the next available location with ptr = (linear_size_chunk *)((char *)[1] + latest->offset); in linear_alloc_child(). The [1] adds 20 bytes, so an