[Gc] Fix for Cygwin and more

Ivan Maidanski ivmai at mail.ru
Tue May 19 12:17:43 PDT 2009


The proposed patch does:
- integrate (permanently) the adapted patch from gcc/boehm-gc for GC_get_stack_base() ("os_dep.c" file);
- make gc compilable (optionally) for Cygwin with GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file);
- add STATIC to non-Win32 GC_write_fault_handler() ("os_dep.c" file);
- fix GC_noop() for DMC (declaration/definition mismatch, "mark.c" file);
- eliminate special handling of Watcom (MSWIN32) for GWW_VDB and MPROTECT_VDB (it works ok with GetWriteWatch-based impl including with PARALLEL_MARK as it relies on the OS functionality not compiler/clib itself).

- the new Cygwin-specific version of GC_get_stack_base() replaces both Win32-based (which has worked with Win threads but not with USE_MMAP) and mmap-based (for USE_MMAP but had failed in GC_push_stack_for()) ones and works ok (it returns exactly same value as Win-based one);
- USE_MUNMAP is still not working fo Cygwin;
- while gc for Cygwin now could be compiled with -DGWW_VDB, GC_enable_incremental() is not functional at present (with any strategy, falling back to dirty everything).

Special note for OpenWatcom users: the C (unlike the C++) compiler (of the latest stable release, not sure for older ones) doesn't force pointer global variables (i.e. not struct fields, not sure for locals) to be aligned unless optimizing for speed (eg. "-ot" option is set); the "-zp" option (or align pragma) only controls alignment for structs; I don't know whether it's a bug or a feature (see an old report of same kind - https://bugzilla.openwatcom.org/show_bug.cgi?id=664), so You are warned.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff82
Type: application/octet-stream
Size: 5110 bytes
Desc: not available
Url : https://napali.hpl.hp.com/pipermail/gc/attachments/20090519/97ea4963/diff82.obj

More information about the Gc mailing list