On 2020-12-26 Vitaly Chikunov wrote: > This wasn't working, because `memlimit_compress` initialized with > zero, thus memory limit is never lowered for 32-bit address space, > causing `Cannot allocate memory' error (in `lzma_outq_init()'). For > example, when `-T0' is used on 32 CPUs with compression level higher > than `-6'.
Zero means disabling the limiter. That is the default. The patch would change this and enable a memory usage limit by default on 32-bit platforms. If you want to enable a limiter by default, you may use the environment variables XZ_DEFAULTS or XZ_OPT (see the man page). The whole memory usage limiting feature is a bit controversial and I'm hesitant to enable anything by default (although with threaded decompression there may need to be some default *soft* limit). Your suggestion is reasonable but someone else may prefer that xz gives a hard error if too high settings are specified instead of xz trying to outsmart the user and change the settings automatically. Perhaps that sounds silly but I don't have energy for endless arguments where both sides are kind of right but both wishes cannot be fulfilled at the same time. I cannot make everyone happy. -- Lasse Collin | IRC: Larhzu @ IRCnet & Freenode