54 #if SIZEOF_VOID_P == 8
64 return (n & (n - 1)) == 0;
76 return n & (modul - 1);
84 return (a + b - 1) / b;
static bool is_power_of_two(size_t n)
static size_t fast_modulo(size_t n, size_t modul)
fast computation of n % m.
#define EXPENSIVE_ASSERT(EXPR)
An assertion that performs computations too expensive even for a normal debug build.
int get_variable_message_length(const char *fmt, va_list ap)
Additional assertion macros.
static size_t next_power_of_two(size_t n)
find the smallest power of two >= n
static size_t divide_rounding_up(size_t a, size_t b)
Perform unsigned integer division.