+
+ if (quantum <= 1)
+ flags &= ~(POOL_QALIGN | POOL_QALIGN_P2);
+ else if (flags & POOL_QALIGN) {
+ if (size % quantum)
+ size += quantum - size % quantum;
+ /* If quantum is a power of 2, we'll avoid using modulus. */
+ if (!(quantum & (quantum - 1)))
+ flags |= POOL_QALIGN_P2;
+ }
+
+ pool->size = size;
+ pool->quantum = quantum;