xz -9 : Cannot allocate memory

Charles Wilson cygwin@cwilson.fastmail.fm
Thu Aug 29 15:33:00 GMT 2013


On 8/29/2013 11:11 AM, Corinna Vinschen wrote:
> On Aug 29 14:34, Achim Gratz wrote:
>> Achim Gratz <Stromeko <at> NexGo.DE> writes:
>>> With the initial heap size set to 1MB, the same allocations for mmap work
>>> just fine.  The mmap length used by xz is the same for files of all sizes.
>>
>> The large mmap is for the scratchpad memory of xz, which can be limited via
>> the -M option.  Currently it fails when this gets larger than 616MiB
>> (standard for -9 is 674Mib).
>
> I'm not exactly surprised.  You're on a 32 bit machine, so you only have
> 2 Gigs VM.  Probably some DLLs are in the way.  Load xz under GDB, break
> on "cygwin_exit", run it, and when it hits the breakpoint, observer the
> memory layout, either in GDB, or by cat'ing /proc/<xz's pid>/maps.
> Observing the memory layout helps a lot to understand why there's some
> memory problem, especially if the application tries to get a big buffer
> space in a single chunk.

So...this is NOTABUG, right?  If you don't understand the options and 
their implications, and end up (as with -9) trying to allocate a giant 
hunk of memory unsupported by the memory model (e.g. 2GB VM), it fails. 
  I think that's preferable to falling back to -8 or -7 or something.

--
Chuck



--
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



More information about the Cygwin mailing list