Resubmitting patch for memory-mapping problem -- See VirtualQuery post in wine-devel

Massimo max at veneto.com
Mon Jul 29 08:17:49 CDT 2002


Was this patch lost in space or does it have some problem ?

Took off in executable mapping VPROT_WRITE and VPROT_WRITECOPY flags 
and
 added VPROT_EXEC; that looks much more close to win2k mapping.
The only difference now is in Type field, wine maps as MEM_PRIVATE and win2k
as MEM_IMAGE (I guess that's the right one, but no time now to check.

The patch solves (partially) bug 890, and allows AutoCAD 2000 to start up (only in 
win95 mode, because of another problem on fibers).

Here the attached patch.... any comment appreciated :-)

Regards

Max


-------------- next part --------------
Index: virtual.c
===================================================================
RCS file: /home/wine/wine/memory/virtual.c,v
retrieving revision 1.80
diff -u -r1.80 virtual.c
--- virtual.c	3 Jul 2002 21:10:44 -0000	1.80
+++ virtual.c	19 Jul 2002 19:33:10 -0000
@@ -94,7 +94,6 @@
     PAGE_EXECUTE_WRITECOPY      /* READ | WRITE | EXEC | WRITECOPY */
 };
 
-
 static FILE_VIEW *VIRTUAL_FirstView;
 static CRITICAL_SECTION csVirtual = CRITICAL_SECTION_INIT("csVirtual");
 
@@ -345,6 +344,7 @@
 ) {
     if (protect) {
     	*protect = VIRTUAL_Win32Flags[vprot & 0x0f];
+
 /*    	if (vprot & VPROT_GUARD) *protect |= PAGE_GUARD;*/
     	if (vprot & VPROT_NOCACHE) *protect |= PAGE_NOCACHE;
 
@@ -650,7 +650,8 @@
 
     if (removable) hmapping = 0;  /* don't keep handle open on removable media */
     if (!(view = VIRTUAL_CreateView( ptr, total_size, 0,
-                                     VPROT_COMMITTED|VPROT_READ|VPROT_WRITE|VPROT_WRITECOPY,
+// PATCH                                     VPROT_COMMITTED|VPROT_READ|VPROT_WRITE|VPROT_WRITECOPY,
+/*PATCH*/                                     VPROT_COMMITTED|VPROT_READ|VPROT_EXEC,
                                      hmapping )))
     {
         SetLastError( ERROR_OUTOFMEMORY );



More information about the wine-patches mailing list