On 11/27/24 09:46, Richard Henderson wrote:
On 11/26/24 18:15, Pierrick Bouvier wrote:
Except for saving memory in *very* specific case (a structure allocated tens of 
millions
times for example), I hardly see a benefit vs using integer types.

Even then, 'uint32_t flags' can be just as easy to use as unsigned foo:1, 
bar:1, etc:1.
Plus you get knowledge of the actual structure layout, which is presumably 
important
*because* it's allocated millions of times.


r~


Do we have a specific API (or set of macros) in QEMU to help with this?
If yes, maybe I could mention it in the doc ("we recommend using X instead of bitfields").

Reply via email to