summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-07 21:04:25 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:58 +0200
commit62c20c49fbad796c5d4b076000144e21a1261c65 (patch)
tree0506540bd84fbefd63ec41b63eacae00ad4be9f4 /mark_rts.c
parent6fab260ad6dff7d60d5f94ec3b8994d6e7b23b3e (diff)
2011-05-07 Ivan Maidanski <ivmai@mail.ru>
* alloc.c (GC_clear_a_few_frames): Use BZERO(). * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Ditto. * reclaim.c (GC_start_reclaim): Ditto. * blacklst.c (total_stack_black_listed): Remove "len" local variable. * dbg_mlc.c (GC_generate_random_valid_address): Replace "for" statement with "do-while" one. * dyn_load.c (GC_register_dynamic_libraries, GC_register_dynlib_callback): Remove redundant parentheses.
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 3ae8e61..02acf3b 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -251,10 +251,7 @@ GC_API void GC_CALL GC_clear_roots(void)
n_root_sets = 0;
GC_root_size = 0;
# if !defined(MSWIN32) && !defined(MSWINCE) && !defined(CYGWIN32)
- {
- int i;
- for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
- }
+ BZERO(GC_root_index, RT_SIZE * sizeof(void *));
# endif
UNLOCK();
}
@@ -273,8 +270,7 @@ STATIC void GC_remove_root_at_pos(int i)
STATIC void GC_rebuild_root_index(void)
{
int i;
-
- for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
+ BZERO(GC_root_index, RT_SIZE * sizeof(void *));
for (i = 0; i < n_root_sets; i++)
add_roots_to_index(GC_static_roots + i);
}