[Gc] More minor improvements

Ivan Maidanski ivmai at mail.ru
Tue Apr 14 03:19:07 PDT 2009


The following minor changes are suggested in the patch:
- destruction of thread-local-alloc structures and removal of a thread from GC_threads is done now atomically in GC_unregister_my_thread() in "win32_threads.c";
- addition of a thread to GC_threads and initialization of thread-local-alloc structures is done now atomically in GC_inner_start_routine() in "pthread_support.c";
- a dummy return statement is added to GC_mark_thread() (to prevent compiler warning, the same is in "win32_threads.c") in "pthread_support.c";
- a check for null stack_end is added (the same as in "win32_threads.c") to GC_register_my_thread_inner() in "pthread_support.c";
- GC_mark_some_inner(), GC_push_current_stack(), GC_push_gc_structures(), GC_mark_thread() are made static ("mark.c", "mark_rts.c", "pthread_support.c");
- GC_push_all_stack_partially_eager(), GC_push_regs_and_stack() are moved to "mark_rts.c" (for code locality) and made static (their non-static declarations are removed from "gc_priv.h");
- some local variables (start_time, finalize_time, result, hhdr, bytes_freed_before, limit, old) are explicitly initialized to zero to prevent complier warnings in GC_try_to_collect_inner(), GC_stopped_mark(), GC_finish_collection(), GC_debug_realloc(), GC_register_finalizer_inner(), GC_invoke_finalizers(), GC_mark_from(), GC_add_roots_inner() and GC_reclaim_all() ("alloc.c", "dbg_mlc.c", "finalize.c", "mark.c", "mark_rts.c", "reclaim.c");
- GC_set_fl_marks() and GC_clear_fl_marks() code is restructured (partial loop unrolling) to prevent "variable might be uninitialized" compiler warning ("alloc.c").


-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff67
Type: application/octet-stream
Size: 17369 bytes
Desc: not available
Url : https://napali.hpl.hp.com/pipermail/gc/attachments/20090414/1d422c37/diff67.obj

More information about the Gc mailing list