Re: [RFC] Reorganizing structs to save space

2007-04-03 Thread Matt Mackall
On Tue, Apr 03, 2007 at 09:28:48AM -0300, Arnaldo Carvalho de Melo wrote: > module 16960 16848 112 That's huge. > struct module_ref ref[255]; /* 480 16320 */ Huh. That's this: struct module_ref { local_t count; } cacheline_aligned; T

[RFC] Reorganizing structs to save space

2007-04-03 Thread Arnaldo Carvalho de Melo
Hi, I implemented a struct reorganizer in pahole, one of the tools in the dwarves suite I've been working on, it does several things to reduce the size of structs: 1. demotes bitfields to a base type that is enough for the sum of the members. 2. combines bitfields by moving members 3. c