[Gc] Fix for MPROTECT_VDB

Ivan Maidanski ivmai at mail.ru
Fri May 22 08:07:31 PDT 2009


Hi!

The proposed patch refines the recent committed changes regarding MPROTECT_VDB.

Changelog entries:
        * Makefile.direct: Update info for -DUSE_MUNMAP.
        * Makefile.direct: Add info about new -DGC_PREFER_MPROTECT_VDB.
        * doc/README.environment: Replace info about removed
        GC_DISABLE_GETWRITEWATCH With info about new GC_USE_GETWRITEWATCH.
        * doc/README.win64: Add info about mingw-w64 compiler.
        * doc/README.win64: Add note about warnings suppression for VC++.
        * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
        recognized (for the case when multiple VDB strategies available).
        * os_dep.c (detect_GetWriteWatch): Remove "GC_DISABLE_GETWRITEWATCH"
        environment var recognition.
        * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
        environment var and GC_PREFER_MPROTECT_VDB macro (only
        if MPROTECT_VDB).
        * os_dep.c (GC_dirty_init): A check for defined(MSWIN32) is removed
        for GC_gww_dirty_init() call (for Cygwin).
        * win32_threads.c (GC_fault_handler_lock): Guard the declaration
        with "if defined(MPROTECT_VDB) && !defined(MSWINCE)".
        * win32_threads.c (GC_suspend): Ditto for GC_fault_handler_lock
        access.
        * win32_threads.c (GC_push_stack_for): Add UNPROTECT(thread) before
        setting last_stack_min value based on the hottest activation_frame.
        * win32_threads.c (GC_get_next_stack): Add new local var 'thread'
        and UNPROTECT(thread) (if 'thread' set) before updating
        (*plast_stack_min) value.

Some notes:
- Incremental collection (both MPROTECT and GWW) doesn't work on Cygwin yet;
- Incremental collection based on MPROTECT doesn't work with USE_MUNMAP and/or PARALLEL_MARK (Q: could this be improved?);
- Incremental collection based on MPROTECT (Win32) could crash an app if "Replaced other UnhandledExceptionFilter" warning is printed (or if the app replaces GC write_handler).

Bye.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff83
Type: application/octet-stream
Size: 8778 bytes
Desc: not available
Url : http://napali.hpl.hp.com/pipermail/gc/attachments/20090522/7b75bf6a/diff83-0001.obj


More information about the Gc mailing list