When decommitting, remap zero pages using MAP_FIXED.
This commit is contained in:
parent
d93c7bca23
commit
0be7cabb49
|
@ -697,11 +697,11 @@ BOOL WINAPI VirtualFree(
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Decommit the pages by unmapping them and remapping zero-pages instead */
|
/* Decommit the pages by remapping zero-pages instead */
|
||||||
|
|
||||||
FILE_munmap( (LPVOID)base, 0, size );
|
|
||||||
if (FILE_dommap( -1, (LPVOID)base, 0, size, 0, 0,
|
if (FILE_dommap( -1, (LPVOID)base, 0, size, 0, 0,
|
||||||
VIRTUAL_GetUnixProt( 0 ), MAP_PRIVATE ) == (LPVOID)-1)
|
VIRTUAL_GetUnixProt( 0 ), MAP_PRIVATE|MAP_FIXED )
|
||||||
|
!= (LPVOID)base)
|
||||||
ERR( "Could not remap pages, expect trouble\n" );
|
ERR( "Could not remap pages, expect trouble\n" );
|
||||||
return VIRTUAL_SetProt( view, base, size, 0 );
|
return VIRTUAL_SetProt( view, base, size, 0 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue