* mmap.cc (fhandler_dev_zero::mmap): Call VirtualFree(MEM_RELEASE)
with zero length parameter, otherwise it fails. (fhandler_dev_zero::munmap): Ditto.
This commit is contained in:
parent
1219debe0c
commit
edd79f2da4
@ -1,3 +1,9 @@
|
||||
2005-12-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* mmap.cc (fhandler_dev_zero::mmap): Call VirtualFree(MEM_RELEASE)
|
||||
with zero length parameter, otherwise it fails.
|
||||
(fhandler_dev_zero::munmap): Ditto.
|
||||
|
||||
2005-12-18 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* fhandler.h (fhandler_console::invisible_console): Declare new
|
||||
|
@ -1629,7 +1629,7 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot,
|
||||
__seterrno ();
|
||||
else
|
||||
{
|
||||
VirtualFree (base, len, MEM_RELEASE);
|
||||
VirtualFree (base, 0, MEM_RELEASE);
|
||||
set_errno (EINVAL);
|
||||
debug_printf ("VirtualAlloc: address shift with MAP_FIXED given");
|
||||
}
|
||||
@ -1671,7 +1671,7 @@ int
|
||||
fhandler_dev_zero::munmap (HANDLE h, caddr_t addr, size_t len)
|
||||
{
|
||||
if (h == (HANDLE) 1) /* See fhandler_dev_zero::mmap. */
|
||||
VirtualFree (addr, len, MEM_RELEASE);
|
||||
VirtualFree (addr, 0, MEM_RELEASE);
|
||||
else
|
||||
{
|
||||
UnmapViewOfFile (addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user