Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2003-09-26 12:50:12 +0400
committerCorinna Vinschen <corinna@vinschen.de>2003-09-26 12:50:12 +0400
commit186a0e42de9b19d267e2b5bb1f1ff108e2d9ae36 (patch)
treecf1be90bf6d6dd9193473ba71a4a9b20f4e490ae /winsup/cygwin
parent0a0a45e22a1f97ac834f757b09fef4b985cee99d (diff)
* mmap.cc (munmap): Use correct address and length parameters when
calling fhandler's munmap.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/mmap.cc9
2 files changed, 11 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index b0c3d7540..4bca458c2 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2003-09-26 Corinna Vinschen <corinna@vinschen.de>
+ * mmap.cc (munmap): Use correct address and length parameters when
+ calling fhandler's munmap.
+
+2003-09-26 Corinna Vinschen <corinna@vinschen.de>
+
* spawn.cc (spawn_guts): Set errno to E2BIG if command line is
longer than CreateProcess allows (32K).
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 5ed774273..79014310e 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -679,12 +679,15 @@ munmap (void *addr, size_t len)
mmap_record *rec = map_list->get_record (record_idx);
if (rec->unmap_pages (u_addr, u_len))
{
- /* The whole record has been unmapped, so... */
+ /* The whole record has been unmapped, so we now actually
+ unmap it from the system in full length... */
fhandler_base *fh = rec->alloc_fh ();
- fh->munmap (rec->get_handle (), (caddr_t)addr, len);
+ fh->munmap (rec->get_handle (),
+ rec->get_address (),
+ rec->get_size ());
rec->free_fh (fh);
- /* ...delete the record. */
+ /* ...and delete the record. */
if (map_list->del_record (record_idx--))
{
/* Yay, the last record has been removed from the list,