Use mprotect instead of mmap in GC_unmap() on Cygwin
authorErik M. Bray <erik.bray@lri.fr>
Tue, 17 Oct 2017 08:50:03 +0000 (11:50 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 17 Oct 2017 08:50:03 +0000 (11:50 +0300)
commit97579ed6bc1946247d99ae599c6418b38aa54578
tree6f2f710c659c524a079a47623ef4510e8bbf1cb1
parentfbb22e9e32827af4257e03ff3b473438ad6d0942
Use mprotect instead of mmap in GC_unmap() on Cygwin

Issue #187 (BDWGC).

* configure.ac [$enable_munmap!="" && $enable_munmap!=no]
(USE_WINALLOC): Replace AC_DEFINE with AH_TEMPLATE; remove comment
about a workaround for Cygwin; remove "if $host=*-*-cygwin*".
* os_dep.c [CYGWIN32 && USE_MUNMAP] (GC_setpagesize): Set GC_page_size
to dwAllocationGranularity (instead of dwPageSize); add comment; add
assertion that dwAllocationGranularity is not less than dwPageSize.
* os_dep.c [USE_MUNMAP && CYGWIN32 && !USE_WINALLOC] (GC_unmap,
GC_unmap_gap): Call mprotect() instead of mmap(); add comment.
configure.ac
os_dep.c