On 15/11/12 06:30, JonY wrote:
On 11/15/2012 13:37, Peter Rosin wrote:
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.
The -9 option works for me without modifying Cygwin heap.
Thank you all for your help. I have repeated the above test using
/usr/i686-pc-mingw32/sys-root/mingw/bin/xz -9 and this worked OK. This
is the same version of xz (5.0.2), but compiled up using mingw (and
therefore presumably not using cygwin1.dll).
If it helps in reproducing this problem, I am /still/ using Windows XP
Pro SP3.
Many thanks,
Dave.
--
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