summaryrefslogtreecommitdiff
path: root/mark_rts.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-02-10 05:26:40 +0100
committerIvan Maidanski <ivmai@mail.ru>2012-02-10 08:03:29 +0100
commit8440e37357a0e575af3d5a5a2ae144434da89c56 (patch)
treedc7d8c772594b0ef8b44455d52137d8d981277ea /mark_rts.c
parent59942ee198093c50ed098d23597fb517b9509b31 (diff)
Fix GC_root_size update in GC_add_roots_inner (Win32)
* mark_rts.c (GC_add_roots_inner): Fix update of GC_root_size value for Win32 (adjust GC_root_size before altering r_start/r_end).
Diffstat (limited to 'mark_rts.c')
-rw-r--r--mark_rts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mark_rts.c b/mark_rts.c
index 5eb4d14..e48f660 100644
--- a/mark_rts.c
+++ b/mark_rts.c
@@ -177,12 +177,12 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
old = GC_static_roots + i;
if (b <= old -> r_end && e >= old -> r_start) {
if (b < old -> r_start) {
+ GC_root_size += old->r_start - b;
old -> r_start = b;
- GC_root_size += (old -> r_start - b);
}
if (e > old -> r_end) {
+ GC_root_size += e - old->r_end;
old -> r_end = e;
- GC_root_size += (e - old -> r_end);
}
old -> r_tmp &= tmp;
break;
@@ -198,12 +198,12 @@ void GC_add_roots_inner(ptr_t b, ptr_t e, GC_bool tmp)
e = other -> r_end;
if (b <= old -> r_end && e >= old -> r_start) {
if (b < old -> r_start) {
+ GC_root_size += old->r_start - b;
old -> r_start = b;
- GC_root_size += (old -> r_start - b);
}
if (e > old -> r_end) {
+ GC_root_size += e - old->r_end;
old -> r_end = e;
- GC_root_size += (e - old -> r_end);
}
old -> r_tmp &= other -> r_tmp;
/* Delete this entry. */