This is the mail archive of the cygwin-patches@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] |
Hi, This patch fixes a problem I have with running large fortran programs (actually most programs with a very large image size in memory). The problem occurs on Windows 2000, XP and 2003. The problem occurs when a process is large enough so when open_shared() tries to map the shared memory section to 0x0A000000, it fails, since 0x0A000000 is occupied by the program. Since the MapViewOfFileEx(h,...,NULL) is preformed on a region smaller than the full region required for offsets[SH_TOTAL_SIZE], MapViewOfFileEx might allocate a region at a location which does not have enough free space after it, so the VirtualAlloc's at the end of open_shared() silently fail (in my case MapViewOfFileEx() returns 0x3d0000). The patch fixed the problem by looking for a region large enough for offsets[SH_TOTAL_SIZE], and using this region as the base address for offsets[0] instead. I would greatly appreciate if you could integrate this patch into mainstream Cygwin. The `cvs diff -up` patch is attached as TEXT/PLAIN. The ChangeLog entry is: * shared.cc (open_shared): Fix allocation of shared region for large processes. Thanks.
Attachment:
shared.cc.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |