view src/ln.h @ 277:5854cbf18c67

fix_switchuvm_impl
author anatofuz
date Sat, 08 Feb 2020 15:49:00 +0900
parents f9169495d476
children
line wrap: on
line source

static inline int ln(int sz) {
    int j = 1 << 6;
    for (int i = 6; i < 12; i++) {
        if (sz < j) return i;
        j <<= 1;
    }
    return 12;
}