diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2017-09-26 00:52:49 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2017-09-26 00:52:49 +0300 |
commit | f487f27c72ab054e8f9101c0696c24836a18eb9b (patch) | |
tree | 1e414ec1b5512326aef8d0a4fdbe9b0970d73049 /mark_rts.c | |
parent | ceef8a5a09692a09266eaa2f201f90a6456c62d0 (diff) | |
download | bdwgc-f487f27c72ab054e8f9101c0696c24836a18eb9b.tar.gz |
Do not disable parallel mark for WRAP_MARK_SOME
Issue #179 (bdwgc).
Now, if there is a chance of unmapping of root segments, the latter
ones are scanned immediately by GC_push_roots thus preventing memory
protection faults in GC_mark_local.
* include/private/gc_priv.h (GC_PUSH_CONDITIONAL): Move definition to
mark_rts.c.
* include/private/gcconfig.h [WRAP_MARK_SOME && PARALLEL_MARK]
(PARALLEL_MARK): Do not undefine; remove TODO item.
* mark.c [WRAP_MARK_SOME && PARALLEL_MARK] (GC_push_conditional_eager):
New internal function; add TODO item.
* mark_rts.c [WRAP_MARK_SOME && PARALLEL_MARK]
(GC_push_conditional_eager): Declare function.
* mark_rts.c [WRAP_MARK_SOME && PARALLEL_MARK] (GC_PUSH_CONDITIONAL):
Define to GC_push_conditional_eager if GC_parallel.
Diffstat (limited to 'mark_rts.c')
-rw-r--r-- | mark_rts.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -497,6 +497,24 @@ GC_API void GC_CALL GC_exclude_static_roots(void *b, void *e) UNLOCK(); } +#if defined(WRAP_MARK_SOME) && defined(PARALLEL_MARK) + /* GC_mark_local does not handle memory protection faults yet. So, */ + /* the static data regions are scanned immediately by GC_push_roots. */ + GC_INNER void GC_push_conditional_eager(ptr_t bottom, ptr_t top, + GC_bool all); +# define GC_PUSH_CONDITIONAL(b, t, all) \ + (GC_parallel \ + ? GC_push_conditional_eager(b, t, all) \ + : GC_push_conditional((ptr_t)(b), (ptr_t)(t), all)) +#elif defined(GC_DISABLE_INCREMENTAL) +# define GC_PUSH_CONDITIONAL(b, t, all) GC_push_all((ptr_t)(b), (ptr_t)(t)) +#else +# define GC_PUSH_CONDITIONAL(b, t, all) \ + GC_push_conditional((ptr_t)(b), (ptr_t)(t), all) + /* Do either of GC_push_all or GC_push_selected */ + /* depending on the third arg. */ +#endif + /* Invoke push_conditional on ranges that are not excluded. */ STATIC void GC_push_conditional_with_exclusions(ptr_t bottom, ptr_t top, GC_bool all GC_ATTR_UNUSED) |