summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-09-25 09:13:13 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:06:47 +0200
commit0dbf78a04c14c7a6cfb3302f9faa4b6bcaa44b35 (patch)
treecece4c4efe12ab7f595c27104693a6032517aba2 /mark_rts.c
parentba266fac91ce5c645b7b7345f1729e31e0792955 (diff)
2009-09-25 Ivan Maidanski <ivmai@mail.ru>
* checksums.c (GC_checksum, GC_update_check_page): Remove "register" keyword in local variable declarations (for the code used only for debugging or which is not time-critical). * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info, GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj, GC_print_smashed_obj, GC_debug_end_stubborn_change, GC_debug_invoke_finalizer): Ditto. * dyn_load.c (GC_register_dynamic_libraries): Ditto. * mallocx.c (GC_realloc): Ditto. * mark_rts.c (GC_print_static_roots, GC_is_static_root, GC_clear_roots): Ditto. * misc.c (GC_write): Ditto. * os_dep.c (GC_print_callers): Ditto. * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local variable to "j" for the nested loop (just not to hide the similar variable in the outer one). * mark_rts.c (GC_print_static_roots): Output an error message using GC_err_printf() (instead of GC_printf()).
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 4b30a71..9aab5cb 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -42,7 +42,7 @@ static int n_root_sets = 0;
/* For debugging: */
void GC_print_static_roots(void)
{
- register int i;
+ int i;
size_t total = 0;
for (i = 0; i < n_root_sets; i++) {
@@ -54,8 +54,8 @@ void GC_print_static_roots(void)
}
GC_printf("Total size: %ld\n", (unsigned long) total);
if (GC_root_size != total) {
- GC_printf("GC_root_size incorrect: %ld!!\n",
- (unsigned long) GC_root_size);
+ GC_err_printf("GC_root_size incorrect: %ld!!\n",
+ (long) GC_root_size);
}
}
# endif /* NO_DEBUGGING */
@@ -66,8 +66,7 @@ void GC_print_static_roots(void)
GC_bool GC_is_static_root(ptr_t p)
{
static int last_root_set = MAX_ROOT_SETS;
- register int i;
-
+ int i;
if (last_root_set < n_root_sets
&& p >= GC_static_roots[last_root_set].r_start
@@ -254,11 +253,10 @@ GC_API void GC_CALL GC_clear_roots (void)
n_root_sets = 0;
GC_root_size = 0;
# if !defined(MSWIN32) && !defined(MSWINCE)
- {
- register int i;
-
+ {
+ int i;
for (i = 0; i < RT_SIZE; i++) GC_root_index[i] = 0;
- }
+ }
# endif
UNLOCK();
}