mirror of https://git.tukaani.org/xz.git
xz: Rename filter_memusages to encoder_memusages
(cherry picked from commit 4c0bdaf13d
)
This commit is contained in:
parent
9132ce3564
commit
c10b66fbf9
|
@ -446,7 +446,7 @@ coder_set_compression_settings(void)
|
||||||
// Memory usage for each encoder filter chain (default
|
// Memory usage for each encoder filter chain (default
|
||||||
// or --filtersX). The encoder options may need to be
|
// or --filtersX). The encoder options may need to be
|
||||||
// scaled down depending on the memory usage limit.
|
// scaled down depending on the memory usage limit.
|
||||||
uint64_t filter_memusages[ARRAY_SIZE(chains)];
|
uint64_t encoder_memusages[ARRAY_SIZE(chains)];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (opt_mode == MODE_COMPRESS) {
|
if (opt_mode == MODE_COMPRESS) {
|
||||||
|
@ -497,7 +497,7 @@ coder_set_compression_settings(void)
|
||||||
mt_options.block_size = block_size;
|
mt_options.block_size = block_size;
|
||||||
mt_options.check = check;
|
mt_options.check = check;
|
||||||
|
|
||||||
memory_usage = filters_memusage_max(filter_memusages,
|
memory_usage = filters_memusage_max(encoder_memusages,
|
||||||
&mt_options, true);
|
&mt_options, true);
|
||||||
if (memory_usage != UINT64_MAX)
|
if (memory_usage != UINT64_MAX)
|
||||||
message(V_DEBUG, _("Using up to %" PRIu32
|
message(V_DEBUG, _("Using up to %" PRIu32
|
||||||
|
@ -506,7 +506,7 @@ coder_set_compression_settings(void)
|
||||||
} else
|
} else
|
||||||
# endif
|
# endif
|
||||||
{
|
{
|
||||||
memory_usage = filters_memusage_max(filter_memusages,
|
memory_usage = filters_memusage_max(encoder_memusages,
|
||||||
NULL, true);
|
NULL, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -556,7 +556,7 @@ coder_set_compression_settings(void)
|
||||||
// Reduce the number of threads by one and check
|
// Reduce the number of threads by one and check
|
||||||
// the memory usage.
|
// the memory usage.
|
||||||
--mt_options.threads;
|
--mt_options.threads;
|
||||||
memory_usage = filters_memusage_max(filter_memusages,
|
memory_usage = filters_memusage_max(encoder_memusages,
|
||||||
&mt_options, true);
|
&mt_options, true);
|
||||||
if (memory_usage == UINT64_MAX)
|
if (memory_usage == UINT64_MAX)
|
||||||
message_bug();
|
message_bug();
|
||||||
|
@ -619,7 +619,7 @@ coder_set_compression_settings(void)
|
||||||
// the multithreaded mode but the output
|
// the multithreaded mode but the output
|
||||||
// is also different.
|
// is also different.
|
||||||
hardware_threads_set(1);
|
hardware_threads_set(1);
|
||||||
memory_usage = filters_memusage_max(filter_memusages,
|
memory_usage = filters_memusage_max(encoder_memusages,
|
||||||
NULL, true);
|
NULL, true);
|
||||||
message(V_WARNING, _("Switching to single-threaded mode "
|
message(V_WARNING, _("Switching to single-threaded mode "
|
||||||
"to not exceed the memory usage limit of %s MiB"),
|
"to not exceed the memory usage limit of %s MiB"),
|
||||||
|
@ -682,7 +682,7 @@ coder_set_compression_settings(void)
|
||||||
if ((chains[i][j].id == LZMA_FILTER_LZMA2
|
if ((chains[i][j].id == LZMA_FILTER_LZMA2
|
||||||
|| chains[i][j].id
|
|| chains[i][j].id
|
||||||
== LZMA_FILTER_LZMA1)
|
== LZMA_FILTER_LZMA1)
|
||||||
&& filter_memusages[i]
|
&& encoder_memusages[i]
|
||||||
> memory_limit) {
|
> memory_limit) {
|
||||||
count++;
|
count++;
|
||||||
r->filters = chains[i];
|
r->filters = chains[i];
|
||||||
|
|
Loading…
Reference in New Issue