This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: xz -9 : Cannot allocate memory


On Aug 30 09:26, Achim Gratz wrote:
> Achim Gratz <Stromeko <at> nexgo.de> writes:
> > > 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.
> > 
> > OK, if it is still reproducible tomorrow I'll have a look.
> 
> I'm not sure I'm looking at the right place, but these seem to be the
> relevant differences between the non-working and the working version
> (initial heap set to 1MiB) memory maps (I've cut the lines with different
> thread ID etc.).
> 
> --- map_0x0.txt 2013-08-30 11:14:33.717797000 +0200
> +++ map_0x1.txt 2013-08-30 11:12:29.171669000 +0200
> @@ -1,40 +1,41 @@
> [...]
> -002F0000-00314000 rw-p 00000000 0000:0000 0                   [win heap 0
> default grow]
> -00314000-003F0000 ===p 00024000 0000:0000 0                   [win heap 0
> default grow]
> +00300000-00324000 rw-p 00000000 0000:0000 0                   [win heap 0
> default grow]
> +00324000-00400000 ===p 00024000 0000:0000 0                   [win heap 0
> default grow]
> [...]
>  20000000-20090000 rw-p 00000000 0000:0000 0                   [heap]
> -20090000-38000000 ===p 00090000 0000:0000 0                   [heap]
> +20090000-20400000 ===p 00090000 0000:0000 0                   [heap]
> +34C80000-58CD0000 rw-p 00000000 0000:0000 0
>  58CD0000-58CD1000 r--p 00000000 76D4:F5BA 2533274790634491   
> /usr/bin/cyglzma-5.dll
>  58CD1000-58CE8000 r-xp 00001000 76D4:F5BA 2533274790634491   
> /usr/bin/cyglzma-5.dll

Yes, looks normal and expected from what you observed.  mmap commits
memory top-down and that was apparently the first free slot big enough
to fullfil the request.  The default heap size is 384 Megs and then
there's apparently not enough space anywhere.  Keep in mind that a
request of 674Mib is a third of the available VM on 32 bit machines.
So, drop the heapsize and go with it, or use the -M option.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpB0hM8z47n9.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]