This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: ld: fatal error - cmalloc would have returned NULL
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 11 Mar 2011 14:14:40 +0100
- Subject: Re: ld: fatal error - cmalloc would have returned NULL
- References: <4D7A0E10.3000808@emrich-ebersheim.de>
- Reply-to: cygwin at cygwin dot com
On Mar 11 12:57, Rainer Emrich wrote:
> On Mar 1 18:39, Corinna Vinschen wrote:
> > And then ld crashes, because, apparently, it neglects to check the
> > return value of mmap.
>
> Yes it's a fault to not check the return value of mmap, but that wouldn't help
> here either.
>
> So, the solution for me was to increase the cygheap size. The maximum seems to
> be 1792 MBytes. This solves the issue for boostrapping gcc with libjava enabled,
> but may fail for even larger libraries.
I don't think you mean to change the size of the cygheap to 1792 Megs,
do you? This sounds impossible to me. Keep in mind that you only have
2 Gigs total memory available per application.
The cygheap size is usually 1 MByte, + the number of pages to align the
end of the cygheap section to the next 64K boundary. In a case like
this you can increase the cygheap to, say, 2 Megs + alignment, but that
should be enough for all cases which fit into memory at all.
Otherwise, ld should use temporary files to store intermediate data.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
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