This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: xz -9 : Cannot allocate memory
On 2012-11-15 05:40, marco atzeri wrote:
> On 11/14/2012 11:09 PM, David Stacey wrote:
>> I am trying to use 'xz -9' to compress a file, but the programme exits
>> with the error message 'Cannot allocate memory'. Here's what I tried:
>>
>>
>> $ echo Hello World > compress_me.txt
>>
>> $ xz -9 compress_me.txt
>> xz: compress_me.txt: Cannot allocate memory
>>
>> $ xz --version
>> xz (XZ Utils) 5.0.2
>> liblzma 5.0.2
>>
>>
>> Having read http://cygwin.com/cygwin-ug-net/setup-maxmem.html I tried
>> the following:
>>
>>
>> $ peflags --cygwin-heap /usr/bin/xz.exe
>> /usr/bin/xz.exe: initial Cygwin heap size: 0 (0x0) MB
>>
>> $ peflags --cygwin-heap=1024 /usr/bin/xz.exe
>> /usr/bin/xz.exe: initial Cygwin heap size: 1024 (0x400) MB
>>
>> $ xz -9 compress_me.txt
>>
>>
>> And this worked. Is this the correct way to fix the problem? If so,
>> please could we increment the heap size for xz in a post install script?
>
> a lot of programs have "Cygwin heap size: 0 (0x0) MB"
> but they work anyway
>
> so the root cause is somewhere else.
xz is notorious for its big up-front allocations, at least with some of
the more aggressive options in effect.
Cheers,
Peter
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple