Merge pull request #948 from terrelln/mb

[fileio] Fix window size MB calculation
This commit is contained in:
Yann Collet 2017-12-13 12:17:05 -08:00 committed by GitHub
commit aa81aac2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1149,7 +1149,7 @@ static void FIO_zstdErrorHelp(dRess_t* ress, size_t ret, char const* srcFileName
if (ret == 0) {
U32 const windowSize = (U32)header.windowSize;
U32 const windowLog = BIT_highbit32(windowSize) + ((windowSize & (windowSize - 1)) != 0);
U32 const windowMB = (windowSize >> 20) + (windowSize & ((1 MB) - 1));
U32 const windowMB = (windowSize >> 20) + ((windowSize & ((1 MB) - 1)) != 0);
assert(header.windowSize <= (U64)((U32)-1));
assert(g_memLimit > 0);
DISPLAYLEVEL(1, "%s : Window size larger than maximum : %llu > %u\n",