summaryrefslogtreecommitdiff
path: root/thread_local_alloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-04-20 07:12:47 +0200
committerIvan Maidanski <ivmai@mail.ru>2012-04-22 13:17:22 +0200
commit6eb24292d4cd371013c15e31e8d827bb38672acf (patch)
tree9a2b8826bf02db77814318ae40ff66358c71a03a /thread_local_alloc.c
parent5fff38b536569a43634730768fe5fda6f9a83ab1 (diff)
Code refactoring of GC_check_tls_for/GC_check_fl_marks
(Apply commit e67ab08 from 'master' branch) * alloc.c (GC_check_fl_marks): Change prototype (pass pointer to "freelist" element instead of value); do not define the function if THREAD_LOCAL_ALLOC undefined. * include/private/gc_priv.h (GC_check_fl_marks): Likewise. * alloc.c (GC_check_fl_marks): Skip check if the argument points to a special (non-pointer) value; update comment; rename "q" local variable to "list". * thread_local_alloc.c (GC_check_tls_for): Update code according to GC_check_fl_marks functionality change (remove checks for special value).
Diffstat (limited to 'thread_local_alloc.c')
-rw-r--r--thread_local_alloc.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/thread_local_alloc.c b/thread_local_alloc.c
index 0a49b94..0a5029b 100644
--- a/thread_local_alloc.c
+++ b/thread_local_alloc.c
@@ -291,18 +291,14 @@ GC_INNER void GC_mark_thread_local_fls_for(GC_tlfs p)
/* Check that all thread-local free-lists in p are completely marked. */
void GC_check_tls_for(GC_tlfs p)
{
- ptr_t q;
int j;
for (j = 1; j < TINY_FREELISTS; ++j) {
- q = p -> ptrfree_freelists[j];
- if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
- q = p -> normal_freelists[j];
- if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
+ GC_check_fl_marks(&p->ptrfree_freelists[j]);
+ GC_check_fl_marks(&p->normal_freelists[j]);
# ifdef GC_GCJ_SUPPORT
- q = p -> gcj_freelists[j];
- if ((word)q > HBLKSIZE) GC_check_fl_marks(q);
-# endif /* GC_GCJ_SUPPORT */
+ GC_check_fl_marks(&p->gcj_freelists[j]);
+# endif
}
}
#endif /* GC_ASSERTIONS */