XZ Utils
5.2.9
|
Detection of available hardware resources. More...
Functions | |
void | hardware_init (void) |
void | hardware_threads_set (uint32_t threadlimit) |
Set the maximum number of worker threads. More... | |
uint32_t | hardware_threads_get (void) |
Get the maximum number of worker threads. More... | |
void | hardware_memlimit_set (uint64_t new_memlimit, bool set_compress, bool set_decompress, bool is_percentage) |
uint64_t | hardware_memlimit_get (enum operation_mode mode) |
Get the current memory usage limit for compression or decompression. More... | |
void | hardware_memlimit_show (void) lzma_attribute((__noreturn__)) |
Display the amount of RAM and memory usage limits and exit. More... | |
Detection of available hardware resources.
void hardware_init | ( | void | ) |
Initialize some hardware-specific variables, which are needed by other hardware_* functions.
References hardware_memlimit_set(), lzma_physmem(), and total_ram.
void hardware_threads_set | ( | uint32_t | threadlimit | ) |
Set the maximum number of worker threads.
References lzma_cputhreads(), and threads_max.
uint32_t hardware_threads_get | ( | void | ) |
Get the maximum number of worker threads.
References threads_max.
void hardware_memlimit_set | ( | uint64_t | new_memlimit, |
bool | set_compress, | ||
bool | set_decompress, | ||
bool | is_percentage | ||
) |
Set the memory usage limit. There are separate limits for compression and decompression (the latter includes also –list), one or both can be set with a single call to this function. Zero indicates resetting the limit back to the defaults. The limit can also be set as a percentage of installed RAM; the percentage must be in the range [1, 100].
Referenced by hardware_init().
uint64_t hardware_memlimit_get | ( | enum operation_mode | mode | ) |
Get the current memory usage limit for compression or decompression.
Referenced by message_mem_needed().
void hardware_memlimit_show | ( | void | ) |
Display the amount of RAM and memory usage limits and exit.