Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Message-ID: <3F2C7F4B.50501@santafe.edu> Date: Sat, 02 Aug 2003 21:19:39 -0600 From: "Marcus G. Daniels" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: loading DLLs created with Cygwin into Sun JDK Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > Interesting -- if I add the -Xmx256m flag to `java', my test case > works too. The cause is the fixed `cygwin_shared_address' (set to 0xa000000 in winsup/cygwin/shared_info.h). What happens with Sun JVM loads of Cygwin-dependent DLLs is that chunk of virtual memory gets claimed by the JVM, and then `open_shared' (in winsup/cygwin/shared.cc) defaults to a second MapViewOfFileEx after failing in its attempt to map the fixed address. The second MapViewOfFileEx attempt has a comment that says "Probably win95, so try without specifying the address", which doesn't seem to be desirable in this case. When I rebuilt the Cygwin DLL using 0x20000000 the load of my set of DLLs work fine (without the -Xmx256m flag, which was presumably just pushing VM allocation blocks around). Incidentally, does anyone know of a Windows application that can be used to see the VM maps in a given process. (Like in Linux, with /proc/PID/maps?) -- 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/