These lines use _arrayPow, which looks like it was supposed to be the log-base-2 of the block size, but it's never actually set except inline, so if you try to use a smaller block size then there will be some values that can only be written to (never read from).
For example:
var arr = new MemoryArray<int>(17, 16);
arr[15] = 1;
Console.WriteLine(arr[15]); // writes 1
arr[16] = 2;
Console.WriteLine(arr[16]); // throws
These lines use
_arrayPow
, which looks like it was supposed to be the log-base-2 of the block size, but it's never actually set except inline, so if you try to use a smaller block size then there will be some values that can only be written to (never read from).For example: