Fix unintended high memory usage
This commit is contained in:
1 parent
e56865641e
commit
cef5a5611a
2 files changed
+36
-1
No files matched your search
@@ -152,7 +152,11 @@ void ZSTD_ldm_adjustParameters(ldmParams_t* params,
|
||||
}
|
||||
}
|
||||
if (params->hashLog == 0) {
|
||||
params->hashLog = BOUNDED(ZSTD_HASHLOG_MIN, params->windowLog - params->hashRateLog, ZSTD_HASHLOG_MAX);
|
||||
if (params->windowLog <= params->hashRateLog) {
|
||||
params->hashLog = ZSTD_HASHLOG_MIN;
|
||||
} else {
|
||||
params->hashLog = BOUNDED(ZSTD_HASHLOG_MIN, params->windowLog - params->hashRateLog, ZSTD_HASHLOG_MAX);
|
||||
}
|
||||
}
|
||||
if (params->minMatchLength == 0) {
|
||||
params->minMatchLength = LDM_MIN_MATCH_LENGTH;
|
||||
|
||||
Reference in new issue
Block a user