X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Wed, 23 Mar 2011 09:52:44 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: ld: fatal error - cmalloc would have returned NULL Message-ID: <20110323085244.GA10657@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4D7A2951 DOT 1030002 AT emrich-ebersheim DOT de> <20110311141317 DOT GH7064 AT calimero DOT vinschen DOT de> <20110311142357 DOT GI7064 AT calimero DOT vinschen DOT de> <20110311150714 DOT GJ7064 AT calimero DOT vinschen DOT de> <4D89B15C DOT 7080605 AT emrich-ebersheim DOT de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4D89B15C.7080605@emrich-ebersheim.de> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On Mar 23 09:37, Rainer Emrich wrote: > On Mar 18 16:42, Corinna Vnschen wrote: > >On Mar 18 10:56, Christopher Faylor wrote: > >> On Fri, Mar 18, 2011 at 03:40:48PM +0100, Corinna Vinschen wrote: > >> >On Mar 18 11:23, Corinna Vinschen wrote: > >> >> In this case the bigger heap seems to avoid the aggressive use of small > >> >> mmap chunks which in turn disallows to raise the cygheap size. Without > >> >> analyzing the whole situation there's not much else to say or do. This > >> >> is YA case which screams loudly for a testcase... > >> > > >> >I created an extensive testcase(*) and it turned out that the current > >> >algorithm to allocate memory on the cygheap is wasting a lot of memory. > >> >Actually it organizes the memory in buckets, each of which cares for a > >> >specific size as a power of 2. So memory on the cygheap is always > >> >allocated in chunks of 4 byte, 8 byte, 16 byte, 32 byte, etc. Plus, > >> >every chunk needs extra 8 byte for bookkeeping. > >> > >> Right. That's a fairly classic implementation of malloc which was, in > >> this case, implemented by DJ Delorie. I chose that from a few other > >> implementations because it was, at the time, supposed to be the best > >> tradeoff between speed and memory usage. But, back when I implemented > >> the cygheap it wasn't used as much as it is now, which I guess is > >> fairly obvious. > > > >Maybe we should modify the implementation at one point, but for now I'm > >wonderin if we shouldn't just raise the cygheap size to 2 Megs. It's > >still not much memory given today's RAM sizes, and it's only a fraction > >of the application's address space. But it is enough so that ld's > >address space will be exhausted before the cygheap is exhausted. > > I followed the discussion on the list and just tried the snapshot from 18th of > March. This snapshot allows bootstrapping of gcc-4.5.0-1 including libjava. Thanks for testing and thanks for this info! 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