summaryrefslogtreecommitdiff
path: root/typd_mlc.c
diff options
context:
space:
mode:
authorivmai <ivmai>2009-09-30 17:47:48 +0000
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 21:06:49 +0400
commit06ecaefca4cbad82a12caa7c96c9e13393b148c4 (patch)
tree0745d998482d8e83f25e38b5b467b3c7714c9c73 /typd_mlc.c
parent8e066c3bccd6d83f82d79e976ae0f36df3812e6d (diff)
downloadbdwgc-06ecaefca4cbad82a12caa7c96c9e13393b148c4.tar.gz
2009-09-30 Ivan Maidanski <ivmai@mail.ru>
* allchblk.c (GC_large_alloc_warn_interval): Move declaration from gc_priv.h. * allchblk.c (GC_large_alloc_warn_suppressed): Move definition from misc.c; define as STATIC. * include/private/gc_priv.h (GC_large_alloc_warn_interval, GC_large_alloc_warn_suppressed): Remove declaration. * alloc.c (GC_bytes_found): Add "defined in" comment. * mallocx.c (GC_bytes_found): Ditto. * misc.c (GC_unmap_threshold): Ditto. * os_dep.c (GC_old_allocator): Ditto. * pthread_support.c (GC_markers): Ditto. * thread_local_alloc.c (GC_gcjobjfreelist, GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. * win32_threads.c (GC_markers): Ditto. * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to be distinctive from a variable declaration). * backgraph.c (GC_max_height, GC_deepest_obj): Ditto. * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl, GC_old_stack_bl, GC_incomplete_stack_bl): Ditto. * checksums.c (GC_faulted, GC_n_dirty_errors, GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean, GC_n_dirty, GC_bytes_in_used_blocks): Ditto. * dbg_mlc.c (GC_smashed): Ditto. * finalize.c (GC_old_dl_entries): Ditto. * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist, GC_gcjdebugobjfreelist): Ditto. * mach_dep.c (GC_save_regs_ret_val): Ditto. * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_top): Ditto. * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset): Ditto. * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo, GC_old_segv_handler, GC_old_bus_handler, GC_old_bus_handler_used_si, GC_old_segv_handler_used_si, GC_proc_buf, GC_proc_fd, GC_vd_base): Ditto. * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Ditto. * reclaim.c (GC_leaked): Ditto. * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors, GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist, GC_arobjfreelist): Ditto. * win32_threads.c (GC_pthread_map_cache, GC_marker_cv, GC_marker_Id): Ditto. * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC. * gcj_mlc.c (GC_gcjdebugobjfreelist): Ditto. * os_dep.c (GC_vd_base): Ditto. * pthread_support.c (GC_mark_threads): Ditto. * reclaim.c (GC_leaked): Ditto. * typd_mlc.c (GC_bm_table): Ditto. * mark_rts.c (GC_save_regs_ret_val): Change declaration type to that of definition; add "defined in" comment. * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for GC_save_regs_ret_val. * misc.c (GC_check_heap, GC_print_all_smashed, GC_start_call_back): Remove unnecessary cast (of 0). * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro. * misc.c (GC_large_alloc_warn_interval): Initialize to GC_LARGE_ALLOC_WARN_INTERVAL value. * misc.c (GC_tmp): Change to "static". * os_dep.c (GC_setpagesize): Reformat the code (collapse multiple function definitions). * os_dep.c (GC_mprotect_state): Define as static. * pthread_support.c (dummy_thread_local): Prefix with "GC_". * win32_threads.c (WinMain): Remove FIXME for WinCE.
Diffstat (limited to 'typd_mlc.c')
-rw-r--r--typd_mlc.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/typd_mlc.c b/typd_mlc.c
index 82bd92dc..ce49419d 100644
--- a/typd_mlc.c
+++ b/typd_mlc.c
@@ -43,11 +43,11 @@
STATIC GC_bool GC_explicit_typing_initialized = FALSE;
-STATIC int GC_explicit_kind;
+STATIC int GC_explicit_kind = 0;
/* Object kind for objects with indirect */
/* (possibly extended) descriptors. */
-STATIC int GC_array_kind;
+STATIC int GC_array_kind = 0;
/* Object kind for objects with complex */
/* descriptors and GC_array_mark_proc. */
@@ -88,7 +88,8 @@ typedef union ComplexDescriptor {
} complex_descriptor;
#define TAG ld.ld_tag
-STATIC ext_descr * GC_ext_descriptors; /* Points to array of extended */
+STATIC ext_descr * GC_ext_descriptors = NULL;
+ /* Points to array of extended */
/* descriptors. */
STATIC size_t GC_ed_size = 0; /* Current size of above arrays. */
@@ -96,8 +97,8 @@ STATIC size_t GC_ed_size = 0; /* Current size of above arrays. */
STATIC size_t GC_avail_descr = 0; /* Next available slot. */
-STATIC int GC_typed_mark_proc_index; /* Indices of my mark */
-STATIC int GC_array_mark_proc_index; /* procedures. */
+STATIC int GC_typed_mark_proc_index = 0; /* Indices of my mark */
+STATIC int GC_array_mark_proc_index = 0; /* procedures. */
static void GC_push_typed_structures_proc (void)
{
@@ -162,7 +163,7 @@ STATIC signed_word GC_add_ext_descriptor(GC_bitmap bm, word nbits)
}
/* Table of bitmap descriptors for n word long all pointer objects. */
-GC_descr GC_bm_table[WORDSZ/2];
+STATIC GC_descr GC_bm_table[WORDSZ/2];
/* Return a descriptor for the concatenation of 2 nwords long objects, */
/* each of which is described by descriptor. */
@@ -316,7 +317,7 @@ GC_make_sequence_descriptor(complex_descriptor *first,
#ifdef UNDEFINED
complex_descriptor * GC_make_complex_array_descriptor(word nelements,
- complex_descriptor *descr)
+ complex_descriptor *descr)
{
struct ComplexArrayDescriptor * result =
(struct ComplexArrayDescriptor *)
@@ -331,9 +332,9 @@ complex_descriptor * GC_make_complex_array_descriptor(word nelements,
}
#endif
-STATIC ptr_t * GC_eobjfreelist;
+STATIC ptr_t * GC_eobjfreelist = NULL;
-STATIC ptr_t * GC_arobjfreelist;
+STATIC ptr_t * GC_arobjfreelist = NULL;
STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,
mse * mark_stack_limit, word env);
@@ -612,7 +613,7 @@ GC_API void * GC_CALL GC_malloc_explicitly_typed(size_t lb, GC_descr d)
}
GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(size_t lb,
- GC_descr d)
+ GC_descr d)
{
ptr_t op;
ptr_t * opp;
@@ -647,7 +648,7 @@ GC_API void * GC_CALL GC_malloc_explicitly_typed_ignore_off_page(size_t lb,
}
GC_API void * GC_CALL GC_calloc_explicitly_typed(size_t n, size_t lb,
- GC_descr d)
+ GC_descr d)
{
ptr_t op;
ptr_t * opp;