This documentation makes no mention of any limits on the maxArrayLength parameter. Whilst the fact that this parameter cannot be less than or equal to zero is (probably) self-evident, the source code reveals a further undocumented limit:
Our bucketing algorithm has a min length of 2^4 and a max length of 2^30. Constrain the actual max used to those values.
This limitation should be included in the documentation to avoid confusion, as seen in this Reddit post.
ArrayPool<T>.Create(int maxArrayLength, int maxArraysPerBucket)
This documentation makes no mention of any limits on the
maxArrayLength
parameter. Whilst the fact that this parameter cannot be less than or equal to zero is (probably) self-evident, the source code reveals a further undocumented limit:This limitation should be included in the documentation to avoid confusion, as seen in this Reddit post.