[NSWI004] Note on is_power_of_two

Thomas Mol thomasfolkertmol at gmail.com
Tue Jan 5 00:42:37 CET 2021


Good night,

The trick used in the is_power_of_two inline looks nice, but it's not
actually valid. For example, 3 has no common bits with 3 - 1 (0b101
and 0b010).
Is there a particular reason our frame allocator should only allocate
powers of two anyway?

Best regards,
Thomas Folkert Mol


More information about the NSWI004 mailing list