Ensures that a user-provided block allocation size matches all requirements.
426037 {
426038 if (!IsPowerOfTwo(block_alloc_size)) {
426039 throw InvalidInputException("the block size must be a power of two, got %llu", block_alloc_size);
426040 }
426042 throw InvalidInputException(
426043 "the block size must be greater or equal than the minimum block size of %llu, got %llu",
426045 }
426047 throw InvalidInputException(
426048 "the block size must be lesser or equal than the maximum block size of %llu, got %llu",
426050 }
426051 auto max_value = NumericCast<idx_t>(NumericLimits<int32_t>().Maximum());
426052 if (block_alloc_size > max_value) {
426053 throw InvalidInputException(
426054 "the block size must not be greater than the maximum 32-bit signed integer value of %llu, got %llu",
426055 max_value, block_alloc_size);
426056 }
426057}
static constexpr idx_t MAX_BLOCK_ALLOC_SIZE
The maximum block allocation size. This is the maximum size currently supported by duckdb.
Definition duckdb.hpp:9714
static constexpr idx_t MIN_BLOCK_ALLOC_SIZE
The minimum block allocation size. This is the minimum size we test in our nightly tests.
Definition duckdb.hpp:9712