This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: loading DLLs created with Cygwin into Sun JDK


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]