summaryrefslogtreecommitdiff
path: root/dbg_mlc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2011-05-07 19:04:25 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:58 +0400
commit62c20c49fbad796c5d4b076000144e21a1261c65 (patch)
tree0506540bd84fbefd63ec41b63eacae00ad4be9f4 /dbg_mlc.c
parent6fab260ad6dff7d60d5f94ec3b8994d6e7b23b3e (diff)
downloadbdwgc-62c20c49fbad796c5d4b076000144e21a1261c65.tar.gz
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 'dbg_mlc.c')
-rw-r--r--dbg_mlc.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/dbg_mlc.c b/dbg_mlc.c
index c3d9e77f..c2820602 100644
--- a/dbg_mlc.c
+++ b/dbg_mlc.c
@@ -171,13 +171,11 @@ GC_INNER void GC_default_print_heap_obj_proc(ptr_t p);
{
ptr_t result;
ptr_t base;
- for (;;) {
- result = GC_generate_random_heap_address();
- base = GC_base(result);
- if (0 == base) continue;
- if (!GC_is_marked(base)) continue;
- return result;
- }
+ do {
+ result = GC_generate_random_heap_address();
+ base = GC_base(result);
+ } while (base == 0 || !GC_is_marked(base));
+ return result;
}
/* Print back trace for p */