delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/04/07/09:21:04

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: cygheap base mismatch detected
Date: Thu, 7 Apr 2005 14:19:38 +0100
MIME-Version: 1.0
In-Reply-To: <000d01c53b5a$59cf4b20$75986686@doas.iup.physik.unibremen.de>
Message-ID: <SERRANOWkfb81IfpT8v0000009e@SERRANO.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 07 Apr 2005 13:19:57.0551 (UTC) FILETIME=[7E8F8FF0:01C53B74]

----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=<size> 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
-- 
Can't think of a witty .sigline today....


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019