Am 31.08.2017 um 04:00 schrieb zhoucm1: > > > On 2017å¹´08æ??30æ?¥ 21:48, Christian König wrote: >> [SNIP] >> + while (start != end) { >> + /* This intentionally wraps around if no bit is set */ >> + frag = min(ffs(start), fls64(end - start)) - 1; >> + if (frag >= max_frag) >> + break; > Seem we can simplify more, frag = min(frag, max_frag) instead of > break, this way, one while will solve all loop. It's not so easy, but still an interesting idea. Need to change the handling a bit, but going to give that a try in the v4. Christian.