summaryrefslogtreecommitdiff
path: root/gc_dlopen.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused DCL_LOCK_STATEIvan Maidanski2023-01-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (refactoring) * alloc.c (GC_set_disable_automatic_collection, GC_set_stop_func, GC_get_disable_automatic_collection, GC_get_stop_func, GC_set_start_callback, GC_get_start_callback, GC_set_on_collection_event, GC_get_on_collection_event, GC_collect_a_little, GC_try_to_collect_general, GC_expand_hp): Remove DCL_LOCK_STATE. * alloc.c [!GC_DISABLE_INCREMENTAL] (GC_start_incremental_collection): Likewise. * dbg_mlc.c (GC_generate_random_backtrace, store_debug_info, GC_debug_register_displacement): Likewise. * dyn_load.c [DARWIN_DEBUG && !NO_DEBUGGING] (GC_dyld_image_add, GC_dyld_image_remove): Likewise. * finalize.c (GC_register_disappearing_link_inner, GC_unregister_disappearing_link, GC_complete_ongoing_collection, GC_set_toggleref_func, GC_get_toggleref_func, GC_toggleref_add, GC_set_await_finalize_proc, GC_get_await_finalize_proc, GC_unregister_long_link, GC_move_disappearing_link, GC_move_long_link, GC_register_finalizer_inner, GC_finalize, GC_invoke_finalizers, GC_notify_or_invoke_finalizers): Likewise. * fnlz_mlc.c (GC_init_finalized_malloc): Likewise. * gc_dlopen.c [!USE_PROC_FOR_LIBRARIES] (disable_gc_for_dlopen): Likewise. * gcj_mlc.c (GC_init_gcj_malloc, maybe_finalize, GC_core_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * malloc.c (GC_alloc_large, GC_generic_malloc_inner, GC_generic_malloc_aligned, GC_malloc_kind_global, GC_generic_malloc_uncollectable, GC_free): Likewise. * mallocx.c (GC_realloc, GC_generic_malloc_ignore_off_page, GC_generic_malloc_many): Likewise. * mark.c (GC_print_trace): Likewise. * mark_rts.c (GC_add_roots, GC_clear_roots, GC_remove_roots): Likewise. * misc.c (GC_get_heap_usage_safe, GC_get_heap_usage_safe, GC_is_init_called, GC_init, GC_enable_incremental, GC_start_mark_threads, GC_set_warn_proc, GC_get_warn_proc, GC_set_abort_func, GC_get_abort_func, GC_enable, GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc, GC_call_with_alloc_lock, GC_dump, GC_get_memory_use, GC_alloc_lock, GC_set_on_thread_event, GC_get_on_thread_event, GC_set_oom_fn, GC_get_oom_fn, GC_set_on_heap_resize, GC_get_on_heap_resize, GC_set_finalizer_notifier, GC_get_finalizer_notifier, GC_set_all_interior_pointers): Likewise. * obj_map.c (GC_register_displacement): Likewise. * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise. * pthread_stop_world.c [GC_ENABLE_SUSPEND_THREAD] (GC_suspend_thread, GC_resume_thread, GC_is_thread_suspended): Likewise. * pthread_support.c (GC_is_thread_tsd_valid, GC_thread_is_registered, GC_register_altstack, GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner, GC_suspend_self_blocked, GC_get_my_stackbottom, GC_call_with_gc_active, GC_unregister_my_thread, GC_pthread_cancel, GC_pthread_exit, GC_allow_register_threads, GC_register_my_thread, GC_thread_exit_proc, GC_pthread_join, GC_pthread_detach, GC_start_rtn_prepare_thread): Likewise. * ptr_chck.c (GC_set_same_obj_print_proc, GC_get_same_obj_print_proc, GC_set_is_valid_displacement_print_proc, GC_set_is_visible_print_proc, GC_get_is_valid_displacement_print_proc, GC_get_is_visible_print_proc): Likewise. * reclaim.c (GC_print_all_errors): Likewise. * typd_mlc.c (GC_add_ext_descriptor, GC_make_descriptor, GC_malloc_explicitly_typed_ignore_off_page, GC_calloc_explicitly_typed): Likewise. * alloc.c (GC_max_retries): Change type from GC_word to word. * include/private/gc_locks.h: Remove DCL_LOCK_STATE from comment, * include/private/gc_locks.h (DCL_LOCK_STATE): Do not define.
* Remove extra space after comma in license termsIvan Maidanski2022-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (reformatting) * CMakeLists.txt: Remove an extra space after comma in license header comment. * Makefile.am: Likewise. * allchblk.c: Likewise. * alloc.c: Likewise. * backgraph.c: Likewise. * blacklst.c: Likewise. * checksums.c: Likewise. * configure.ac: Likewise. * cord/cordbscs.c: Likewise. * cord/cordprnt.c: Likewise. * cord/cordxtra.c: Likewise. * cord/tests/cordtest.c: Likewise. * cord/tests/de.c: Likewise. * cord/tests/de_cmds.h: Likewise. * cord/tests/de_win.c: Likewise. * cord/tests/de_win.h: Likewise. * cord/tests/de_win.rc: Likewise. * darwin_stop_world.c: Likewise. * dbg_mlc.c: Likewise. * dyn_load.c: Likewise. * extra/gc.c: Likewise. * extra/msvc_dbg.c: Likewise. * extra/pcr_interface.c: Likewise. * extra/real_malloc.c: Likewise. * finalize.c: Likewise. * fnlz_mlc.c: Likewise. * gc_badalc.cc: Likewise. * gc_cpp.cc: Likewise. * gc_dlopen.c: Likewise. * gcj_mlc.c: Likewise. * headers.c: Likewise. * include/gc/cord.h: Likewise. * include/gc/cord_pos.h: Likewise. * include/gc/ec.h: Likewise. * include/gc/gc.h: Likewise. * include/gc/gc_backptr.h: Likewise. * include/gc/gc_config_macros.h: Likewise. * include/gc/gc_disclaim.h: Likewise. * include/gc/gc_gcj.h: Likewise. * include/gc/gc_inline.h: Likewise. * include/gc/gc_mark.h: Likewise. * include/gc/gc_pthread_redirects.h: Likewise. * include/gc/gc_tiny_fl.h: Likewise. * include/gc/gc_typed.h: Likewise. * include/gc/gc_version.h: Likewise. * include/gc/javaxfc.h: Likewise. * include/gc/leak_detector.h: Likewise. * include/include.am: Likewise. * include/private/darwin_semaphore.h: Likewise. * include/private/darwin_stop_world.h: Likewise. * include/private/dbg_mlc.h: Likewise. * include/private/gc_alloc_ptrs.h: Likewise. * include/private/gc_atomic_ops.h: Likewise. * include/private/gc_hdrs.h: Likewise. * include/private/gc_locks.h: Likewise. * include/private/gc_pmark.h: Likewise. * include/private/gc_priv.h: Likewise. * include/private/gcconfig.h: Likewise. * include/private/pthread_stop_world.h: Likewise. * include/private/pthread_support.h: Likewise. * include/private/specific.h: Likewise. * include/private/thread_local_alloc.h: Likewise. * m4/gc_set_version.m4: Likewise. * mach_dep.c: Likewise. * malloc.c: Likewise. * mallocx.c: Likewise. * mark.c: Likewise. * mark_rts.c: Likewise. * misc.c: Likewise. * new_hblk.c: Likewise. * obj_map.c: Likewise. * os_dep.c: Likewise. * pthread_start.c: Likewise. * pthread_stop_world.c: Likewise. * pthread_support.c: Likewise. * ptr_chck.c: Likewise. * reclaim.c: Likewise. * specific.c: Likewise. * tests/atomicops.c: Likewise. * tests/cpp.cc: Likewise. * tests/disclaim.c: Likewise. * tests/disclaim_bench.c: Likewise. * tests/gctest.c: Likewise. * tests/tests.am: Likewise. * tests/weakmap.c: Likewise. * thread_local_alloc.c: Likewise. * tools/setjmp_t.c: Likewise. * tools/threadlibs.c: Likewise. * typd_mlc.c: Likewise. * win32_threads.c: Likewise. * LICENSE: Remove an extra space after comma in license terms.
* Remove extra parentheses in return statementIvan Maidanski2022-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (refactoring) Also, replace 0 to NULL where appropriate. * allchblk.c (setup_header, GC_get_first_part, GC_allochblk_nth): Remove outermost parentheses in the expression of return statement. * alloc.c (GC_never_stop_func, GC_timeout_stop_func, GC_adj_bytes_allocd, GC_try_to_collect_inner, GC_collect_a_little, GC_stopped_mark, GC_try_to_collect_general, GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise. * blacklst.c (GC_is_black_listed, GC_number_stack_black_listed, total_stack_black_listed): Likewise. * checksums.c (GC_checksum): Likewise. * cord/cordbscs.c (CORD_cat_char_star, CORD_cat, CORD_len, CORD_index_access_fn, CORD_apply_access_fn, CORD_substr_checked, CORD_substr, CORD_iter5, CORD_iter, CORD_riter4, CORD_riter, CORD_concat_forest, CORD_balance, CORD__pos_fetch, CORD__prev, CORD_prev, CORD_pos_to_cord, CORD_pos_valid): Likewise. * cord/cordprnt.c (extract_conv_spec, CORD_vsprintf, CORD_sprintf, CORD_fprintf, CORD_vfprintf, CORD_printf, CORD_vprintf): Likewise. * cord/cordxtra.c (CORD_cat_char, CORD_catn, CORD_fill_proc, CORD_batched_fill_proc, CORD_cmp, CORD_ncmp, CORD_to_char_star, CORD_from_char_star, CORD_to_const_char_star, CORD_fetch, CORD_put_proc, CORD_batched_put_proc, CORD_put, CORD_chr_proc, CORD_rchr_proc, CORD_batched_chr_proc, CORD_chr, CORD_rchr, CORD_str, CORD_from_file_eager, CORD_lf_func, CORD_from_file_lazy_inner, CORD_from_file_lazy, CORD_from_file): Likewise. * cord/tests/cordtest.c (test_fn, id_cord_fn, test_basics): Likewise. * cord/tests/de.c (line_pos, add_hist, retrieve_line, beep): Likewise. * cord/tests/de_win.c (WinMain, plain_chars, control_chars, WndProc): Likewise. * dbg_mlc.c (store_debug_info, GC_debug_generic_malloc, GC_debug_generic_malloc, GC_debug_realloc, GC_make_closure): Likewise. * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise. * extra/real_malloc.c (real_malloc): Likewise. * finalize.c (GC_register_disappearing_link, GC_unregister_disappearing_link): Likewise. * gc_dlopen.c (dlopen): Likewise. * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise. * headers.c (GC_find_header, alloc_hdr, get_index, GC_install_header, GC_next_block, GC_prev_block): Likewise. * malloc.c (GC_generic_malloc): Likewise. * mallocx.c (GC_realloc, GC_generic_malloc_ignore_off_page): Likewise. * mark.c (GC_collection_in_progress, GC_mark_some, GC_signal_mark_stack_overflow, GC_block_was_dirty, GC_push_next_marked, GC_push_next_marked_dirty, GC_push_next_marked_uncollectable): Likewise. * mark_rts.c (GC_is_static_root, rt_hash, GC_roots_present, GC_remove_tmp_roots, GC_approx_sp): Likewise. * misc.c (GC_default_oom_fn, GC_clear_stack_inner, GC_base, GC_write, GC_get_warn_proc, GC_call_with_alloc_lock): Likewise. * new_hblk.c (GC_build_fl_clear2, GC_build_fl_clear4, GC_build_fl2, GC_build_fl4, GC_build_fl): Likewise. * obj_map.c (GC_register_displacement_inner): Likewise. * os_dep.c (GC_find_limit_openbsd, GC_skip_hole_openbsd, GC_get_writable_length, GC_get_writable_length, GC_get_main_stack_base, GC_FreeBSDGetDataStart, GC_unix_mmap_get_mem, GC_unix_sbrk_get_mem, os2_alloc, GC_wince_get_mem, GC_win32_get_mem, GC_push_thread_stack, GC_push_old_obj, GC_write_fault_handler, catch_exception_raise_state, catch_exception_raise_state_identity): Likewise. * pthread_support.c (GC_new_thread, GC_lookup_thread, GC_get_nprocs, pthread_sigmask, pthread_create): Likewise. * ptr_chck.c (GC_same_obj, GC_default_is_visible_print_proc, GC_default_is_valid_displacement_print_proc, GC_is_visible, GC_pre_incr, GC_post_incr): Likewise. * reclaim.c (GC_block_empty, GC_reclaim_uninit, GC_n_set_marks, GC_reclaim_all): Likewise. * tests/cpp.cc (main): Likewise. * tests/gctest.c (fake_gcj_mark_proc, reverse1, reverse, ints, gcj_reverse1, gcj_reverse, gcj_ints, uncollectable_ints, mktree, alloc8bytes, main, test): Likewise. * tools/if_mach.c (main): Likewise. * tools/if_not_there.c (main): Likewise. * tools/setjmp_t.c (getpagesize, main, g): Likewise. * typd_mlc.c (GC_add_ext_descriptor, GC_add_ext_descriptor, GC_double_descr, GC_make_array_descriptor, GC_make_sequence_descriptor, GC_typed_mark_proc, GC_descr_obj_size, GC_push_complex_descriptor, GC_array_mark_proc, GC_make_descriptor, GC_calloc_explicitly_typed): Likewise. * win32_threads.c (GC_new_thread, GC_lookup_thread_inner, GC_get_stack_min, GC_pthread_create, GC_pthread_start_inner): Likewise. * allchblk.c (GC_get_first_part, GC_allochblk_nth): Replace 0 to NULL where appropriate. * alloc.c (GC_allocobj): Likewise. * blacklst.c (GC_is_black_listed): Likewise. * cord/cordbscs.c (CORD_from_fn_inner, CORD_substr_checked): Likewise. * cord/cordxtra.c (CORD_cat_char, CORD_to_char_star, CORD_from_char_star, CORD_lf_func, CORD_from_file_lazy_inner): Likewise. * dbg_mlc.c (store_debug_info, GC_debug_generic_malloc, GC_debug_generic_malloc): Likewise. * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise. * gcj_mlc.c (GC_debug_gcj_malloc): Likewise. * headers.c (GC_next_block, GC_prev_block): Likewise. * malloc.c (GC_generic_malloc, strdup): Likewise. * mallocx.c (GC_realloc): Likewise. * misc.c (GC_default_oom_fn, GC_base): Likewise. * os_dep.c (GC_get_main_stack_base, os2_alloc, GC_win32_get_mem): Likewise. * pthread_support.c (GC_new_thread, GC_lookup_thread): Likewise. * ptr_chck.c (GC_same_obj, GC_is_visible, GC_default_is_valid_displacement_print_proc): Likewise. * tests/gctest.c (mktree): Likewise. * typd_mlc.c (GC_make_array_descriptor, GC_push_complex_descriptor, GC_array_mark_proc, GC_calloc_explicitly_typed): Likewise. * win32_threads.c (GC_new_thread, GC_lookup_thread_inner): Likewise. * alloc.c (GC_never_stop_func, GC_timeout_stop_func): Replace 0 and 1 (in return statement) to FALSE and TRUE, respectively. * include/private/gcconfig.h: Remove outermost parentheses in the expression of return statement in comment.
* Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)Ivan Maidanski2019-09-251-0/+2
| | | | | | | | * alloc.c (GC_try_to_collect_inner, GC_collect_a_little): Wrap GC_collect_a_little_inner() call into ENTER/EXIT_GC(). * gc_dlopen.c [!USE_PROC_FOR_LIBRARIES] (disable_gc_for_dlopen): Likewise. * malloc.c (GC_alloc_large): Likewise.
* Remove information about the authors from the source files.Ivan Maidanski2011-08-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (This information could be observed via "git log" or by looking into the original version of a file.) * Makefile.am: Remove original-author and modified-by information (as well as a time-stamp) from the file header. * configure.ac: Ditto. * cord/cordbscs.c: Ditto. * cord/cordprnt.c: Ditto. * cord/cordxtra.c: Ditto. * cord/de.c: Ditto. * cord/de_cmds.h: Ditto. * cord/de_win.h: Ditto. * doc/README.arm.cross: Ditto. * doc/doc.am: Ditto. * dyn_load.c: Ditto. * gc_cpp.cc: Ditto. * gc_dlopen.c: Ditto. * include/cord.h: Ditto. * include/include.am: Ditto. * include/private/cord_pos.h: Ditto. * include/private/gc_hdrs.h: Ditto. * include/weakpointer.h: Ditto. * m4/gc_set_version.m4: Ditto. * tests/test_cpp.cc: Ditto. * cord/cordprnt.c: Fix a typo in a comment. * AUTHORS: Add authors. * cord/cordprnt.c: Expand all tabs to spaces; remove trailing spaces at EOLn. * cord/de.c: Ditto. * cord/de_cmds.h: Ditto. * cord/de_win.c: Ditto. * cord/de_win.h: Ditto. * doc/README.arm.cross: Ditto. * include/private/cord_pos.h: Ditto. * include/weakpointer.h: Ditto. * m4/gc_set_version.m4: Ditto.
* 2011-06-30 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-9/+11
| | | | | | | | | | | | | | | | | * dyn_load.c (GC_register_map_entries): Remove "count" local variable as unused. * gc_dlopen.c (disable_gc_for_dlopen): Define only if not USE_PROC_FOR_LIBRARIES. * malloc.c (calloc): Add parentheses around '&&' operator. * mark.c (GC_noop_sink): New global variable (instead of a static local variable inside GC_noop1). * mark.c (GC_noop1): Use GC_noop_sink variable (to prevent "variable set but not used" compiler warning). * include/private/gcconfig.h (USE_PROC_FOR_LIBRARIES): Define only if undefined yet. * tests/smash_test.c (main): Don't dereference "p" local variable if it is NULL. * tests/staticrootslib.c (main): Ditto.
* 2011-03-07 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test GC_NO_DLOPEN. * gc_dlopen.c: Ditto. * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Ditto. * gc_dlopen.c: Don't include dlfcn.h (as it is included in gc_pthread_redirects.h). * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t, GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL). * include/gc_pthread_redirects.h (GC_pthread_sigmask, pthread_sigmask): Ditto. * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS); reformat the comment. * pthread_support.c (pthread_create, GC_pthread_create_t, GC_pthread_create): Rename GC_PTHREAD_CONST to GC_PTHREAD_CREATE_CONST. * win32_threads.c (GC_pthread_create): Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_pthread_redirects.h (GC_NO_DLOPEN, GC_NO_PTHREAD_SIGMASK): New macro defined. * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to empty for NaCl. * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do not define for Android (as CANCEL_SAFE is not defined).
* 2011-02-20 Ivan Maidanski <ivmai@mail.ru> (mostly really Elijah Taylor)ivmai2011-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gc_dlopen.c: Empty unit for NaCl. * os_dep.c: Include fcntl.h for NaCl. * os_dep.c (GC_get_main_stack_base): Ignore USE_GET_STACKBASE_FOR_MAIN macro for NaCl. * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl. * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl. * pthread_start.c (GC_inner_start_routine): Don't invoke pthread_cleanup_push/pop for NaCl. * pthread_stop_world.c (GC_nacl_num_gc_threads, GC_nacl_thread_idx, GC_nacl_park_threads_now, GC_nacl_thread_parker, GC_nacl_gc_thread_self, GC_nacl_thread_parked, GC_nacl_thread_used, GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New variable (fo NaCl only). * pthread_stop_world.c (GC_suspend_handler): Reformat the code. * pthread_stop_world.c (GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count, GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem, GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, GC_restart_handler): Don't define for NaCl. * pthread_support.c (GC_get_nprocs): Ditto. * include/private/gc_priv.h (SIG_SUSPEND): Ditto. * include/private/gcconfig.h (LINUX): Ditto. * pthread_stop_world.c (GC_push_all_stacks): Push register storage for NaCl. * pthread_stop_world.c (GC_suspend_all, GC_stop_world, GC_start_world): Implement for NaCl. * pthread_stop_world.c (GC_stop_world): Don't define unused "i" local variable for OpenBSD (and NaCl). * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for NaCl. * pthread_stop_world.c (nacl_pre_syscall_hook, __nacl_suspend_thread_if_needed, nacl_post_syscall_hook, GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New function (for NaCl only). * pthread_stop_world.c (GC_stop_init): Empty for NaCl. * pthread_support.c (pthread_cancel, pthread_sigmask): Don't redirect for NaCl. * include/gc_pthread_redirects.h (pthread_cancel, pthread_sigmask): Ditto. * pthread_support.c (GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only). * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize and shutdown thread for NaCl. * pthread_support.c (GC_thr_init): Call sysconf for NaCl. * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc for NaCl. * include/gc.h: Don't include features.h for NaCl. * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro. * include/gc_pthread_redirects.h (GC_pthread_create): Use GC_PTHREAD_CONST instead of const. * win32_threads.c (GC_pthread_create): Ditto. * pthread_support.c (GC_pthread_create_t, GC_pthread_create, pthread_create): Ditto. * include/private/gcconfig.h (NACL): Recognize NaCl. * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl. * include/private/pthread_stop_world.h (thread_stop_info): Add reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for NaCl only). * include/private/pthread_support.h (GC_nacl_gc_thread_self): Declare internal variable (for NaCl only).
* 2011-01-07 Ivan Maidanski <ivmai@mail.ru>gc7_2alpha5-20110107ivmai2011-07-261-59/+57
| | | | * gc_dlopen.c: Reformat the comments and adjust code indentation.
* 2010-07-13 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-2/+3
| | | | | | | | | | | | * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP. * pthread_support.c (pthread_create, pthread_join, pthread_detach, pthread_sigmask): Ditto. * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype is added). * gc_dlopen.c (GC_dlopen): Fix return type. * pthread_support.c (GC_init_real_syms): Don't define LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and libpthread_name if RTLD_NEXT.
* 2010-07-13 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-5/+6
| | | | | | | | | | | | * gc_dlopen.c (disable_gc_for_dlopen): Update the comment. * gc_dlopen.c (dlopen): Ditto. * include/gc.h: Update copyright header. * include/gc.h (GC_enable_incremental): Refine the comment. * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if missing (only for Win32). * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN. * win32_threads.c (GC_ExitThread): Ditto. * include/gc.h (GC_endthreadex): Add a comment.
* 2010-03-05 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (GC_set_stop_func, GC_get_stop_func): Add DCL_LOCK_STATE. * finalize.c (GC_notify_or_invoke_finalizers): Ditto. * gc_dlopen.c (disable_gc_for_dlopen): Ditto. * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Ditto. * mark.c (GC_print_trace): Ditto. * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable, GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc, GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier, GC_get_finalizer_notifier): Ditto. * os_dep.c (GC_get_stack_base, GC_print_callers): Ditto. * pthread_support.c (GC_is_thread_tsd_valid, GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner, GC_call_with_gc_active, GC_unregister_my_thread, pthread_join, pthread_detach, GC_register_my_thread, GC_inner_start_routine, pthread_create): Ditto. * reclaim.c (GC_print_all_errors): Ditto. * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread, GC_unregister_my_thread, GC_do_blocking_inner, GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join, GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach, GC_init_parallel): Ditto.
* 2009-10-22 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (GC_collection_in_progress): Move the prototype to gc_priv.h. * gc_dlopen.c (GC_collection_in_progress): Ditto. * pthread_support.c (GC_collection_in_progress): Ditto. * misc.c (GC_init_parallel): Ditto. * pthread_support.c (GC_init_parallel): Ditto. * win32_threads.c (GC_init_parallel): Ditto. * darwin_stop_world.c (GC_thr_init): Ditto. * misc.c (GC_thr_init): Ditto. * pthread_stop_world.c (GC_thr_init): Ditto. * pthread_support.c (GC_thr_init): Ditto. * blacklst.c (GC_clear_bl, GC_copy_bl, GC_number_stack_black_listed): Make STATIC. * dbg_mlc.c (GC_print_obj, GC_make_closure, GC_debug_invoke_finalizer): Ditto. * malloc.c (GC_alloc_large_and_clear): Ditto. * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2, GC_push_marked4, GC_push_marked, GC_push_next_marked, GC_push_next_marked_dirty, GC_push_next_marked_uncollectable): Ditto. * misc.c (GC_clear_stack_inner): Ditto. * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Ditto. * darwin_stop_world.c (FindTopOfStack): Make static; define only if not DARWIN_DONT_PARSE_STACK. * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL. * dyn_load.c (GC_repeat_read): Remove unused prototype. * include/private/gc_pmark.h (GC_find_start): Ditto. * misc.c (GC_read, GC_register_finalizer_no_order): Ditto. * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if THREADS). * dyn_load.c (GC_register_main_static_data): Define only if DYNAMIC_LOADING. * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail "return" statement. * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies GC_PTHREADS). * include/gc.h: Fix a typo. * include/gc_inline.h (GC_ASSERT): Define (if not defined) since the header is public. * include/gc_inline.h (GC_generic_malloc_many): New public function declaration. * mallocx.c (GC_generic_malloc_many): Make public. * include/private/gc_priv.h (GC_INNER): Use visibility attribute (if available). * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER. * include/private/gc_priv.h: Include atomic_ops.h if THREADS and MPROTECT_VDB. * os_dep.c: Don't include atomic_ops.h * win32_threads.c: Ditto. * include/private/gc_priv.h (GC_push_selected, GC_push_regs, GC_push_marked, GC_number_stack_black_listed, GC_alloc_large_and_clear, GC_reclaim_or_delete_all, GC_generic_malloc_many, GC_make_closure, GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty): Remove the prototype. * mark.c (GC_page_was_ever_dirty): Add prototype (only if PROC_VDB). * include/private/gc_priv.h (GC_push_next_marked_dirty, GC_push_next_marked, GC_push_next_marked_uncollectable): Move the prototype to mark.c. * include/private/gc_priv.h (GC_is_static_root): Declare only if not THREADS. * include/private/gc_priv.h (GC_free_inner): Declare only if THREADS. * include/private/gc_priv.h (GC_debug_free_inner): Declare only if THREADS and DBG_HDRS_ALL. * include/private/gc_priv.h (GC_markers): Declare GC_markers only if PARALLEL_MARK. * include/private/gc_priv.h (GC_register_main_static_data): Move the prototype to misc.c. * mach_dep.c (GC_push_regs): Make STATIC; define only along with HAVE_PUSH_REGS definition. * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function definition with the ANSI C one. * mark.c (GC_started_thread_while_stopped): Declared only if not GNU C. * win32_threads.c (GC_started_thread_while_stopped): Don't define if GNU C. * mark.c (GC_mark_from): Avoid unbalanced brackets in #if-#else-#endif blocks. * mark_rts.c (GC_is_static_root): Define only if not THREADS. * os_dep.c (GC_get_stack_base): Make public (for OpenBSD). * os_dep.c (GC_page_was_ever_dirty): Comment out the function except for PROC_VDB. * tests/test.c (main): Don't reference GC_print_obj, GC_make_closure, GC_debug_invoke_finalizer, GC_page_was_ever_dirty, GC_is_fresh (in GC_noop). * thread_local_alloc.c: Don't include "gc_inline.h". * win32_threads.c (GC_write_fault_handler): Declare only if MPROTECT_VDB.
* 2009-10-21 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * allchblk.c (DEBUG): Remove macro (since unused). * allchblk.c: Include private/gc_priv.h before other includes and definitions. * alloc.c: Ditto. * gc_dlopen.c: Ditto. * headers.c: Ditto. * mallocx.c: Ditto. * mark_rts.c: Ditto. * new_hblk.c: Ditto. * reclaim.c: Ditto. * mark.c: Include private/gc_pmark.h before other includes. * misc.c: Ditto. * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h. * pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto. * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since already defined in gc_config_macros.h). * dyn_load.c (GC_init_dyld): Remove parameter cast for _dyld_register_func_for_add_image() and _dyld_register_func_for_remove_image(); add the comment about possible warnings; add FIXME for the deprecated _dyld_bind_fully_image_containing_address(). * include/private/gc_priv.h: Include gc.h before the standard headers inclusion. * tests/test.c: Ditto. * include/private/gcconfig.h (DebugBreak): Update the comment. * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'. * alloc.c: Reformat the code (partly adjust indentation). * backgraph.c: Ditto. * blacklst.c: Ditto. * checksums.c: Ditto. * finalize.c: Ditto. * gcj_mlc.c: Ditto. * mach_dep.c: Ditto. * mark_rts.c: Ditto. * obj_map.c: Ditto. * os_dep.c: Ditto. * ptr_chck.c: Ditto. * stubborn.c: Ditto. * thread_local_alloc.c: Ditto. * typd_mlc.c: Ditto.
* 2009-10-17 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-7/+14
| | | | | | | | | | | | | | | | | | | * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen redirection is turned off; turn it on later when dlopen real symbol is no longer needed (according to the comment and the same as in dyn_load.c). * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and REAL_DLFUNC, respectively (to have unique names since the definitions may differ from that of the similar ones in pthread_support.c). * mark.c (source): Undefine the macro when no longer needed. * os_dep.c (handler): Rename the type to GC_fault_handler_t (to have the unique name across the project). * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the comment. * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Ditto. * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no longer needed.
* 2009-10-17 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | * alloc.c (GC_never_stop_func, GC_check_fl_marks, GC_finish_collection): Reformat the code (make opening bracket style uniform across the file). * allchblk.c (GC_allochblk): Ditto. * backgraph.c (add_edge): Ditto. * dbg_mlc.c (GC_marked_for_finalization): Ditto. * dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto. * finalize.c (GC_null_finalize_mark_proc): Ditto. * gc_dlopen.c (GC_dlopen): Ditto. * mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4): Ditto. * misc.c (looping_handler, GC_call_with_gc_active, GC_do_blocking_inner, GC_do_blocking): Ditto. * os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto. * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, GC_pthread_join, GC_pthread_detach, GC_check_tls, GC_do_blocking_inner, GC_call_with_gc_active): Ditto. * reclaim.c (GC_reclaim_clear, GC_reclaim_block, GC_print_free_list): Ditto. * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty, GC_remove_protection): Reformat the code (wrap long lines).
* 2009-10-01 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-0/+10
| | | | | | | | | | | | | * gc_dlopen.c (GC_dlopen): Add function redirector (only if GC_USE_LD_WRAP). * include/gc.h: Include "gc_pthread_redirects.h" even if GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't define and check for (since included only from gc.h). * include/gc_pthread_redirects.h: Declare "GC_" symbols even if GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. * include/gc_pthread_redirects.h: Include signal.h only to get sigset_t definition.
* 2009-09-16 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-17/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog: Remove trailing spaces at EOLn; insert blank lines where missed. * doc/README: Expand all tabs to spaces; remove trailing spaces at EOLn; remove multiple trailing blank lines. * doc/README.autoconf: Ditto. * doc/README.DGUX386: Ditto. * doc/README.environment: Ditto. * doc/README.macros: Ditto. * doc/README.win32: Ditto. * tests/test.c: Ditto. * tests/test_cpp.cc: Ditto. * backgraph.c: Ditto. * blacklst.c: Ditto. * checksums.c: Ditto. * darwin_stop_world.c: Ditto. * dbg_mlc.c: Ditto. * dyn_load.c: Ditto. * finalize.c: Ditto. * gc_dlopen.c: Ditto. * gcj_mlc.c: Ditto. * headers.c: Ditto. * mach_dep.c: Ditto. * malloc.c: Ditto. * mallocx.c: Ditto. * new_hblk.c: Ditto. * obj_map.c: Ditto. * ptr_chck.c: Ditto. * real_malloc.c: Ditto. * reclaim.c: Ditto. * stubborn.c: Ditto. * thread_local_alloc.c: Ditto. * typd_mlc.c: Ditto. * gc_cpp.cc: Ditto. * include/gc_allocator.h: Ditto. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_cpp.h: Ditto. * include/gc_gcj.h: Ditto. * include/gc_inline.h: Ditto. * include/gc_mark.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_typed.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/new_gc_alloc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/dbg_mlc.h: Ditto. * include/private/gc_hdrs.h: Ditto. * include/private/gc_locks.h: Ditto. * include/private/gc_pmark.h: Ditto. * include/private/gcconfig.h: Ditto. * include/private/pthread_support.h: Ditto. * include/private/thread_local_alloc.h: Ditto. * darwin_stop_world.c: Add copyright header. * include/gc_backptr.h: Ditto. * include/gc_config_macros.h: Ditto. * include/gc_pthread_redirects.h: Ditto. * include/gc_version.h: Ditto. * include/javaxfc.h: Ditto. * include/private/darwin_semaphore.h: Ditto. * include/private/pthread_support.h: Ditto. * gc_cpp.cc: Make copyright header uniform across the package. * include/gc_cpp.h: Ditto.
* 2009-09-10 Ivan Maidanski <ivmai@mail.ru>ivmai2011-07-261-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (diff116a, diff116b, diff116c) * Makefile.direct (GC_DLL): Add the comment for. * doc/README.macros: Fix a typo. * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info. * doc/README.macros (__STDC__): Remove info. * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address, GC_generate_random_valid_address, GC_print_backtrace, GC_generate_random_backtrace, GC_register_describe_type_fn): Add GC_API and GC_CALL to function definition. * malloc.c (GC_generic_malloc): Ditto. * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Ditto. * mark.c (GC_mark_and_push): Ditto. * misc.c (GC_new_free_list_inner, GC_new_free_list, GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc): Ditto. * include/gc_backptr.h (GC_get_back_ptr_info, GC_generate_random_heap_address, GC_generate_random_valid_address, GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and GC_CALL to function prototype. * include/gc_mark.h (GC_mark_and_push, GC_new_free_list, GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner, GC_new_proc, GC_new_proc_inner, GC_generic_malloc, GC_register_describe_type_fn): Ditto. * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed, GC_generic_malloc_words_small): Ditto. * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined). * include/private/gc_pmark.h: Ditto. * include/private/gc_priv.h: Ditto. * tests/test.c: Ditto. * gc_cpp.cc: Define GC_BUILD. * include/private/gc_pmark.h: Ditto. * include/private/gc_priv.h: Ditto. * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro. * gc_dlopen.c (dlopen): Add GC_API to the wrapper function definition. * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join, pthread_detach, pthread_create): Ditto. * win32_threads.c (GC_pthread_join, GC_pthread_create, GC_pthread_sigmask, GC_pthread_detach): Ditto. * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros. * include/gc_backptr.h: Include "gc.h". * include/gc_backptr.h: Use extern "C" for the exported functions. * include/gc_mark.h: Ditto. * include/gc_config_macros.h (GC_THREADS): Define the macro if any GC_XXX_THREADS is defined. * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE): Move the definitions below the place where GC_NETBSD_THREADS and GC_DGUX386_THREADS are defined. * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL is defined) for GCC. * include/gc_config_macros.h (GC_API): Define for Cygwin (in the same way as for VC++); define for GCC v4+ (other than already recognized MinGW/Cygwin) as a "default" visibility attribute if GC_DLL is defined. * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE): New macro. * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, GC_debug_malloc, GC_debug_malloc_atomic, GC_debug_strdup, GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute. * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto. * include/gc.h (GC_malloc, GC_malloc_atomic, GC_malloc_uncollectable, GC_malloc_stubborn, GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, GC_debug_malloc, GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute (for the first argument). * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto. * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc, GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute (for the second argument). * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size, GC_realloc, GC_expand_hp, GC_set_max_heap_size, GC_exclude_static_roots, GC_add_roots, GC_remove_roots, GC_register_displacement, GC_debug_register_displacement, GC_try_to_collect, GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page, GC_debug_malloc, GC_debug_malloc_atomic, GC_debug_strdup, GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page, GC_debug_malloc_atomic_ignore_off_page, GC_debug_free, GC_debug_realloc, GC_debug_malloc_replacement, GC_debug_realloc_replacement, GC_finalization_proc, GC_register_finalizer, GC_debug_register_finalizer, GC_register_finalizer_ignore_self, GC_debug_register_finalizer_ignore_self, GC_register_finalizer_no_order, GC_debug_register_finalizer_no_order, GC_register_finalizer_unreachable, GC_debug_register_finalizer_unreachable, GC_register_disappearing_link, GC_general_register_disappearing_link, GC_unregister_disappearing_link, GC_noop1, GC_warn_proc, GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type, GC_call_with_alloc_lock, GC_stack_base_func, GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr, GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc, GC_is_valid_displacement_print_proc, GC_is_visible_print_proc, GC_malloc_many, GC_CreateThread, GC_beginthreadex, GC_endthreadex): Comment out (or remove if single and meaningless) function argument names (to avoid identifiers out of the name space). * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc, GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto. * include/gc.h (GC_try_to_collect): Update the comment. * include/gc.h (GC_size, GC_register_my_thread): Add const qualifier for the argument referent. * misc.c (GC_size): Ditto. * pthread_support.c (GC_register_my_thread_inner, GC_register_my_thread): Ditto. * win32_threads.c (GC_register_my_thread_inner, GC_register_my_thread): Ditto. * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use (define instead of GC_INIT() for Cygwin and AIX). * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES, GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN, GC_INITIAL_HEAP_SIZE): Recognize new macro. * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES, GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ, GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN, GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use. * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros. * include/gc_mark.h: Prefix GC_H with '_'. * include/gc_mark.h (GC_least_plausible_heap_addr, GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API for the public variable declaration. * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr, GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Ditto. * include/gc_pthread_redirects.h (GC_pthread_create, GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach): Use GC_API for the wrapper prototype. * include/gc_pthread_redirects.h (pthread_create, pthread_join, pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally before redirecting. * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with GC_incr_bytes_freed(); remove FIXME. * include/private/gc_priv.h (GC_make_closure, GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private function. * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of the target.
* 2008-07-25 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)hboehm2011-07-261-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ivan's description of the patch follows. Note that a few pieces like the GC_malloc(0) patch, were not applied since an alternate had been previously applied. A few differed stylistically from the rest of the code (mostly casts to void * instead of target type), or were classified as too minor to bother. Note that all of Ivan's static declarations which did not correct outright naming bugs (as a few did), where replaced by STATIC, which is ignored by default. - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for GC_malloc(0)); - addition of missing getter/setter functions for public variables (may be useful if compiled as Win32 DLL); - addition of missing GC_API for some exported functions; - addition of missing "static" declarator for internal functions and variables (where possible); - replacement of all remaining K&R-style definitions with ANSI C ones (__STDC__ macro is not used anymore); - addition of some Win32 macro definitions (that may be missing in the standard headers supplied with a compiler) for GWW_VDB mode; - elimination of most compiler warnings (except for "uninitialized data" warning); - several typos correction; - missing parenthesis addition in macros in some header files of "libatomic_ops" module. My highlights based on reading the patch: * allchblk.c: Remove GC_freehblk_ptr decl. Make free_list_index_of() static. * include/gc.h: Use __int64 on win64, define GC_oom_func, GC_finalizer_notifier_proc, GC_finalizer_notifier_proc, add getter and setters: GC_get_gc_no, GC_get_parallel, GC_set_oom_fn, GC_set_finalize_on_demand, GC_set_java_finalization, GC_set_dont_expand, GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect, GC_set_finalizer_notifier. Always define GC_win32_free_heap. gc_config_macros.h: Define _REENTRANT after processing GC_THREADS. * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test, handling of operator new[] for old Windows compilers. * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses around arguments. * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs. * mark.c (GC_mark_and_push_stack): Fix source argument for blacklist printing. * misc.c: Fix log file naming based on environment variable for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor just return current value with 0 argument. Add DONT_USER_USER32_DLL. Add various getters and setters as in gc.h. * os_dep.c: Remove no longer used GC_disable/enable_signals implementations. (GC_get_stack_base): Add pthread_attr_destroy call. No longer set GC_old_bus_handler in DARWIN workaround. * pthread_support.c: GC_register_my_thread must also call GC_init_thread_local.
* 2007-05-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca)hboehm2011-07-261-1/+1
| | | | | | | | | | | | | * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c, tests/test.c: Accomodate GC_WIN32_PTHREADS. * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS. * include/gc_config_macros.h: Define both PTHREADS and GC_WIN32_THREADS. * include/private/gc_locks.h: Nonstandard definitions of NUMERIC_THREAD_ID for GC_WIN32_PTHREADS. * doc/README.win32, Makefile.direct: Include documentation for GC_WIN32_PTHREADS. * Makefile.direct: Remove some anachronisms in the documentation.
* gc7.0alpha1 tarball importgc7_0alpha1Ivan Maidanski2011-07-261-3/+1
|
* gc6.2 tarball importgc6_2Ivan Maidanski2011-07-261-12/+8
|
* gc6.1alpha4 tarball importgc6_1alpha4Ivan Maidanski2011-07-261-3/+2
|
* gc6.0 tarball importgc6_0Ivan Maidanski2011-07-261-0/+96