Raise artificial 4G limit for MaxScanSize #945
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allows MaxScanSize (only) to be set higher than 4GB on 32-bit systems or using suffixes. (On 64-bit it can already be set beyond 32-bit limits by not using suffixes.) Intended as a fix for #809
Introduces a new Suffix "G" to specify gibibytes for all size options. This isn't terribly useful because there only 1G, 2G and 3G really work, and even "4G" triggers the "too high" message... but it is more consistent.
This code makes 3 assumptions:
strtoll
) and featuers (long long
)unsigned long int
downstream, so they can actually be 64-bit on 64-bit systems.That last one may not be true, but if it isn't fulfilled then we can already cause breakage with something like
MaxFileSize=10000000000
(nominally 10GB).Not sure how to test this. It builds on AMD64, but I don't have equipment to test this on i386 or more obscure architectures (esp. ILP64 ones)...