Merge pull request #2178 from bimbashrestha/quick-fix
Change --patch-from limit from 4gb to 2gb
This commit is contained in:
commit
c96151a25d
@ -771,9 +771,10 @@ static void FIO_adjustMemLimitForPatchFromMode(FIO_prefs_t* const prefs,
|
||||
unsigned long long const maxSrcFileSize)
|
||||
{
|
||||
unsigned long long maxSize = MAX(prefs->memLimit, MAX(dictSize, maxSrcFileSize));
|
||||
unsigned const maxWindowSize = (1U << ZSTD_WINDOWLOG_MAX);
|
||||
assert(maxSize != UTIL_FILESIZE_UNKNOWN);
|
||||
if (maxSize > UINT_MAX)
|
||||
EXM_THROW(42, "Can't handle files larger than %u GB\n", UINT_MAX/(1 GB) + 1);
|
||||
if (maxSize > maxWindowSize)
|
||||
EXM_THROW(42, "Can't handle files larger than %u GB\n", maxWindowSize/(1 GB));
|
||||
FIO_setMemLimit(prefs, (unsigned)maxSize);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user