Decide between memory unmapping and mprotect-based dirty bits at runtime
authorIvan Maidanski <ivmai@mail.ru>
Thu, 29 Jun 2017 07:47:50 +0000 (10:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 29 Jun 2017 07:47:50 +0000 (10:47 +0300)
commit922c747f558a220c8a87359c2abd6b6e0d991b6b
treef4ae86b7deb31795c8319d68a271a649299c7e85
parent6bfc8404c23dd74996967ff4d38266b30983ea60
Decide between memory unmapping and mprotect-based dirty bits at runtime

* allchblk.c [USE_MUNMAP && MPROTECT_VDB] (GC_has_unmapped_memory): New
function.
* include/private/gcconfig.h [USE_MUNMAP] (MPROTECT_VDB): Do not
undefine unless GWW_VDB; update comment.
* os_dep.c [MPROTECT_VDB && USE_MUNMAP] (GC_has_unmapped_memory,
GC_mprotect_dirty_init): Declare function.
* os_dep.c [MPROTECT_VDB && USE_MUNMAP] (GC_dirty_init): Ensure
mprotect-based virtual dirty bits and memory unmapping are not both
turned on (disable on of them and call WARN with the appropriate
message), and call GC_mprotect_dirty_init (unless memory unmapping is
requested or some pages are already unmapped).
* os_dep.c [MPROTECT_VDB && !USE_MUNMAP] (GC_mprotect_dirty_init):
Define as a macro (to GC_dirty_init).
* os_dep.c [MPROTECT_VDB] (GC_dirty_init): Rename to
GC_mprotect_dirty_init.
allchblk.c
include/private/gcconfig.h
os_dep.c