private static byte GetOrderForPageCount(uint pages) { return((byte)KMath.Log2OfPowerOf2(KMath.CeilToPowerOfTwo(pages))); }