Re: [xz-devel] [RFC PATCH] liblzma: Test memory availability for lzma_stream_encoder_mt

2020-12-26 Thread Vitaly Chikunov
Lasse, On Sat, Dec 26, 2020 at 05:03:48PM +0200, Lasse Collin wrote: > On 2020-12-24 Vitaly Chikunov wrote: > > Add guard call to allocate the memory before calling get_thread to > > prevent memory failures (LZMA_MEM_ERROR). > > > > This would make simple `xz -T0' more robust on 32-bit

Re: [xz-devel] [PATCH] xz: Fix setting memory limit on 32-bit systems

2020-12-26 Thread Vitaly Chikunov
Lasse, On Sat, Dec 26, 2020 at 05:04:02PM +0200, Lasse Collin wrote: > 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

Re: [xz-devel] [PATCH] xz: Fix setting memory limit on 32-bit systems

2020-12-26 Thread Sebastian Andrzej Siewior
On 2020-12-26 09:33:04 [+0300], 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

Re: [xz-devel] [PATCH] xz: Fix setting memory limit on 32-bit systems

2020-12-26 Thread Lasse Collin
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

Re: [xz-devel] [RFC PATCH] liblzma: Test memory availability for lzma_stream_encoder_mt

2020-12-26 Thread Lasse Collin
Hello! On 2020-12-24 Vitaly Chikunov wrote: > Add guard call to allocate the memory before calling get_thread to > prevent memory failures (LZMA_MEM_ERROR). > > This would make simple `xz -T0' more robust on 32-bit architectures. > > Rationale: simple `-T0' is hard to use portably in scripts on