X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-8.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_PGP_SIGNED,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SARE_SUB_OBFU_Z,TW_BL X-Spam-Check-By: sourceware.org Message-ID: <50A48C01.4000901@users.sourceforge.net> Date: Thu, 15 Nov 2012 14:30:25 +0800 From: JonY User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.12) Gecko/20080213 Thunderbird/2.0.0.12 Mnenhy/0.7.5.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: xz -9 : Cannot allocate memory References: <50A41697 DOT 3080406 AT tiscali DOT co DOT uk> <50A47226 DOT 2080506 AT gmail DOT com> <50A47F84 DOT 8050400 AT lysator DOT liu DOT se> In-Reply-To: <50A47F84.8050400@lysator.liu.se> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig8AE67D259111760BAF8BD1E5" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig8AE67D259111760BAF8BD1E5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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=3D1024 /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. >=20 > xz is notorious for its big up-front allocations, at least with some of > the more aggressive options in effect. >=20 The -9 option works for me without modifying Cygwin heap. --------------enig8AE67D259111760BAF8BD1E5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (MingW32) iEYEARECAAYFAlCkjAYACgkQp56AKe10wHd86ACghfTrQq/qWSzQS0/hbMf6Y5sG cUEAnjebGc4Xze6Mu8rxy8qr2yeVEyGo =oyDR -----END PGP SIGNATURE----- --------------enig8AE67D259111760BAF8BD1E5--