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: ld: fatal error - cmalloc would have returned NULL

On Mar 11 15:13, Corinna Vinschen wrote:
> On Mar 11 14:53, Rainer Emrich wrote:
> > I have to be more clear. I increased the heap_chunk_in_mb to 1792 using:
> > regtool -i set /HKLM/Software/Cygwin/heap_chunk_in_mb 1792
> But that's the size of the application heap, not the size of the
> cygheap.  The cygheap is used by a couple of internal datastructures
> of the cygwin DLL itself, while the application heap is used for malloc.
> So you raised the size of the application heap, probably not to 1792
> Megs, but the next lower allocation possible (cygwin decrements the size
> in 1MB steps until the allocation succeeds.
> That's weird.  malloc uses mmap, but only for allocations beyond 128K.

Actually mmap is only used if you try to malloc >= 256K.

> Since ld only allocates 64K chunks, it doesn't look like mmap is called
> from malloc.  OTOH, if raising the heap size helps, how do the
> zillions of mmap calls into this picture?!?


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

Problem reports:
Unsubscribe info:

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