* mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
throughout for symmetry. (fhandler_dev_mem::munmap): Use correct process handle in call to NtUnmapViewOfSection.
This commit is contained in:
parent
c05f7ba26e
commit
f985cc1c53
@ -1,3 +1,10 @@
|
||||
2009-06-06 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
|
||||
throughout for symmetry.
|
||||
(fhandler_dev_mem::munmap): Use correct process handle in call to
|
||||
NtUnmapViewOfSection.
|
||||
|
||||
2009-06-06 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
|
||||
|
@ -1480,7 +1480,7 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot,
|
||||
__seterrno ();
|
||||
else
|
||||
{
|
||||
UnmapViewOfFile (base);
|
||||
NtUnmapViewOfSection (GetCurrentProcess (), base);
|
||||
set_errno (EINVAL);
|
||||
debug_printf ("MapView: address shift with MAP_FIXED given");
|
||||
}
|
||||
@ -1499,7 +1499,7 @@ fhandler_dev_zero::munmap (HANDLE h, caddr_t addr, size_t len)
|
||||
VirtualFree (addr, 0, MEM_RELEASE);
|
||||
else
|
||||
{
|
||||
UnmapViewOfFile (addr);
|
||||
NtUnmapViewOfSection (GetCurrentProcess (), addr);
|
||||
NtClose (h);
|
||||
}
|
||||
return 0;
|
||||
@ -1560,7 +1560,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot,
|
||||
__seterrno ();
|
||||
else
|
||||
{
|
||||
UnmapViewOfFile (base);
|
||||
NtUnmapViewOfSection (GetCurrentProcess (), base);
|
||||
set_errno (EINVAL);
|
||||
debug_printf ("MapView: address shift with MAP_FIXED given");
|
||||
}
|
||||
@ -1575,7 +1575,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot,
|
||||
int
|
||||
fhandler_disk_file::munmap (HANDLE h, caddr_t addr, size_t len)
|
||||
{
|
||||
UnmapViewOfFile (addr);
|
||||
NtUnmapViewOfSection (GetCurrentProcess (), addr);
|
||||
NtClose (h);
|
||||
return 0;
|
||||
}
|
||||
@ -1673,7 +1673,7 @@ int
|
||||
fhandler_dev_mem::munmap (HANDLE h, caddr_t addr, size_t len)
|
||||
{
|
||||
NTSTATUS ret;
|
||||
if (!NT_SUCCESS (ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, addr)))
|
||||
if (!NT_SUCCESS (ret = NtUnmapViewOfSection (GetCurrentProcess (), addr)))
|
||||
{
|
||||
__seterrno_from_nt_status (ret);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user