From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4460 invoked by alias); 15 Feb 2006 22:51:08 -0000 Received: (qmail 4452 invoked by uid 22791); 15 Feb 2006 22:51:08 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 15 Feb 2006 22:51:05 +0000 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1F9VU9-0007zk-Cu for cygwin@cygwin.com; Wed, 15 Feb 2006 23:50:57 +0100 Received: from c-24-4-187-203.hsd1.ca.comcast.net ([24.4.187.203]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Feb 2006 23:50:57 +0100 Received: from jens.dill by c-24-4-187-203.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Feb 2006 23:50:57 +0100 To: cygwin@cygwin.com From: Jens Dill Subject: Re: cygheap base mismatch detected Date: Wed, 15 Feb 2006 23:49:00 -0000 Message-ID: References: <000d01c53b5a$59cf4b20$75986686@doas.iup.physik.unibremen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2006-02/txt/msg00555.txt.bz2 Dave Korn artimi.com> writes: > > ----Original Message---- > >From: Andreas Heckel > >Sent: 07 April 2005 11:13 > > > Since I read that the error has something do with putting the cygwin1.dll > > in a certain memory space, I am wondering, if my prog is allocating too > > much memory (big arrays) or in "bad way". > > I am not an expert in these questions and didn't write the prog myself, > > so I just speculating... > > Very likely indeed. If the .dll is already loaded in one process (your > bash shell) at a given address (usually its default base address), and then > you try and launch another process, and the executable has such huge arrays > that the address map is already occupied in that range before the cygwin1 > dll has been loaded (i.e. when the executable itself is initially mapped > into the range), then the cygwin1 dll gets loaded at a new base address, the > two heaps don't line up, and everything goes pear-shaped. > > Hmm. Perhaps that means it would work if you tried to run your Traj2 > program from a DOS command shell, with no other cygwin stuff running in the > system at all. > > Alternatively, sometimes by playing with the -Wl,--stack= option, > you can cause the program's process space to end up being laid out > differently again, but this is very random and hit-and-miss: it's pure luck, > and you can't guess whether growing the stack size, or shrinking it, or by > how much, might or might not make just the difference it needed to work. > > cheers, > DaveK Dave: What you write makes it appear that CygWin simply will not support large executables that reference the CygWin DLL and are also launched from a CygWin shell. I can't believe that nobody has found a better workaround than: (a) not using the CygWin DLL (not an option for us) (b) not launching from a CygWin shell (not an option for us) (c) reducing the memory space required by the program (again, not possible) (d) tinkering randomly with the stack size Does anyone else know of another way around this problem? -- Jens Dill Endeavor Information Systems -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/