Ivan Maidanski [Wed, 1 Feb 2012 20:12:30 +0000 (00:12 +0400)]
Tag must-be-non-null arguments of GC API functions with the attribute
* include/gc.h (GC_set_oom_fn, GC_strndup, GC_posix_memalign,
GC_change_stubborn, GC_end_stubborn_change, GC_size,
GC_try_to_collect, GC_set_stop_func, GC_debug_strndup,
GC_debug_change_stubborn, GC_debug_end_stubborn_change, GC_wcsdup,
GC_debug_wcsdup, 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_move_disappearing_link, GC_set_warn_proc, GC_call_with_alloc_lock,
GC_call_with_stack_base, GC_register_my_thread, GC_do_blocking,
GC_call_with_gc_active, GC_get_stack_base, GC_pre_incr, GC_post_incr):
Specify 'non-null' attribute for the relevant function argument.
* include/gc_backptr.h (GC_get_back_ptr_info, GC_print_backtrace):
Likewise.
* include/gc_mark.h (GC_new_kind, GC_new_kind_inner, GC_is_marked,
GC_clear_mark_bit, GC_set_mark_bit): Likewise.
* include/gc_config_macros.h (GC_ATTR_NONNULL): New macro (support
'non-null' attribute for GCC v4+).
Ivan Maidanski [Wed, 1 Feb 2012 19:58:59 +0000 (23:58 +0400)]
Tag deprecated variables in GC API with the corresponding attribute
* include/gc.h (GC_gc_no, GC_parallel, GC_oom_fn, GC_on_heap_resize,
GC_find_leak, GC_all_interior_pointers, GC_finalize_on_demand,
GC_java_finalization, GC_finalizer_notifier, GC_dont_gc,
GC_dont_expand, GC_use_entire_heap, GC_full_freq, GC_non_gc_bytes,
GC_no_dls, GC_free_space_divisor, GC_max_retries, GC_get_max_retries,
GC_stackbottom, GC_dont_precollect, GC_time_limit): Add
GC_ATTR_DEPRECATED attribute.
* include/gc_config_macros.h (GC_ATTR_DEPRECATED): Add new attribute
for tagging deprecated symbols (support GCC v4+ and MS VC v12+).
Ivan Maidanski [Wed, 1 Feb 2012 19:45:20 +0000 (23:45 +0400)]
Add support of GC_ATTR_MALLOC for MS VS
* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, GC_strndup,
GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
GC_malloc_ignore_off_page, GC_malloc_atomic_ignore_off_page,
GC_malloc_atomic_uncollectable, GC_debug_malloc_atomic_uncollectable,
GC_debug_malloc, GC_debug_malloc_atomic, GC_debug_strdup,
GC_debug_strndup, 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,
GC_debug_realloc_replacement, GC_wcsdup, GC_debug_wcsdup): Move
GC_ATTR_MALLOC and GC_ATTR_ALLOC_SIZE from the function declaration
tail to the beginning (just after GC_API) for compatibility with MS VC.
* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* include/gc_config_macros.h (GC_ATTR_MALLOC): Implement for
MS VC (Visual Studio) v14+.
Ivan Maidanski [Wed, 1 Feb 2012 19:21:00 +0000 (23:21 +0400)]
Tag auxiliary malloc-like API functions with 'malloc' attribute
* include/gc.h (GC_malloc_many): Add GC_ATTR_MALLOC attribute.
* include/gc_mark.h (GC_generic_malloc): Likewise.
* include/gc_typed.h (GC_calloc_explicitly_typed): Likewise.
* include/gc_disclaim.h (GC_finalized_malloc): Add GC_ATTR_MALLOC and
GC_ATTR_ALLOC_SIZE attributes.
* include/gc_typed.h (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page): Likewise.
Ivan Maidanski [Wed, 1 Feb 2012 18:51:55 +0000 (22:51 +0400)]
Remove duplicate compiler option in NT_X64_THREADS_MAKEFILE
* NT_X64_THREADS_MAKEFILE (.cpp.obj): Remove duplicate
-D ALL_INTERIOR_POINTERS option.
Ivan Maidanski [Wed, 1 Feb 2012 17:47:08 +0000 (21:47 +0400)]
Refine documentation comments and minor code refactoring in allchblk.c
* allchblk.c (GC_enough_large_bytes_left, GC_allochblk_nth): Refine
and reformat comment.
* allchblk.c (INCR_FREE_BYTES): Add missing parentheses.
* allchblk.c (GC_allochblk): Remove "i" and nested "result" local
variable declarations; replace "return" statement in the trailing loop
with "break" (code refactoring).
Ivan Maidanski [Wed, 1 Feb 2012 17:25:44 +0000 (21:25 +0400)]
Add GC_is_disabled new function to GC API
* include/gc.h (GC_dont_gc): Improve comment (add note for new client
code).
* include/gc.h (GC_is_disabled): New API function.
* misc.c (GC_is_disabled): Likewise.
Ivan Maidanski [Wed, 1 Feb 2012 17:17:18 +0000 (21:17 +0400)]
Refine GC_stackbottom description in gc.h
* include/gc.h (GC_stackbottom): Improve comment (add note for
new client code).
Ivan Maidanski [Wed, 1 Feb 2012 17:12:07 +0000 (21:12 +0400)]
Add assertion to GC_incremental_protection_needs, refine documentation
* include/gc.h (GC_incremental_protection_needs): Improve comment.
* os_dep.c (GC_incremental_protection_needs): Add assertion on GC is
initialized.
Ivan Maidanski [Wed, 1 Feb 2012 16:56:28 +0000 (20:56 +0400)]
Fix a typo in gc.h comment
* include/gc.h (GC_base): Fix a typo in the comment.
Ivan Maidanski [Wed, 1 Feb 2012 16:49:25 +0000 (20:49 +0400)]
gctest: Avoid use of deprecated GC_dont_gc and GC_stackbottom
* tests/test.c (GC_amiga_gctest_malloc_explicitly_typed,
GC_amiga_gctest_calloc_explicitly_typed): Do not unnecessarily check
GC_dont_gc value.
* tests/test.c (check_heap_stats): Get stack base via
GC_get_stack_base() (report error if failed) instead of accessing
GC_stackbottom.
Ivan Maidanski [Wed, 1 Feb 2012 16:36:20 +0000 (20:36 +0400)]
cordtest: Report success to stdout instead of stderr
* cord/tests/cordtest.c (main): Print "SUCCEEDED" message to stdout
instead of stderr.
Ivan Maidanski [Tue, 31 Jan 2012 16:10:14 +0000 (20:10 +0400)]
Add assertions to check GC_large_free_bytes and GC_root_size values by
GC_finish_collection even if GC_dump_regularly is off
* allchblk.c (GC_compute_large_free_bytes): New inner function
(defined only if GC_ASSERTIONS or not NO_DEBUGGING).
* mark_rts.c (GC_compute_root_size): Likewise.
* allchblk.c (GC_print_hblkfreelist): Call GC_compute_large_free_bytes
instead of computing large_free_bytes itself (only if not USE_MUNMAP
for now); remove "sz" local variable.
* allchblk.c (GC_print_hblkfreelist): Refine logged messages (for
total value).
* mark_rts.c (GC_print_static_roots): Likewise.
* include/private/gc_priv.h (GC_dump_regularly, COND_DUMP): Move
definition down below GC_ASSERT one.
* include/private/gc_priv.h (GC_compute_large_free_bytes,
GC_compute_root_size): New function declaration (only if
GC_ASSERTIONS).
* include/private/gc_priv.h (COND_DUMP_CHECKS): New macro (invoke
GC_ASSERT for GC_large_free_bytes and GC_root_size).
* include/private/gc_priv.h (COND_DUMP): Invoke COND_DUMP_CHECKS
unless GC_dump_regularly.
* mark_rts.c (GC_print_static_roots): Call GC_compute_root_size
instead of computing root size itself; rename "total" local variable
to "size".
Ivan Maidanski [Tue, 31 Jan 2012 04:43:55 +0000 (08:43 +0400)]
Update ChangeLog
Ivan Maidanski [Tue, 31 Jan 2012 04:24:26 +0000 (08:24 +0400)]
Fix FREE_ASSERT usage (fix missing trailing semi-colon)
* allchblk.c (GC_add_to_fl): Append ';' after FREE_ASSERT().
* allchblk.c (GC_remove_from_fl): Fix a typo in a comment.
Ivan Maidanski [Tue, 31 Jan 2012 04:22:16 +0000 (08:22 +0400)]
Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
* misc.c (GC_init): Adjust GC_requested_heapsize if GC_expand_hp_inner
(called with the value passed by "GC_INITIAL_HEAP_SIZE" environment
variable) succeeded.
Ivan Maidanski [Tue, 31 Jan 2012 04:01:06 +0000 (08:01 +0400)]
Make logged info of GC_stopped_mark and GC_print_heap_sects more compact
* alloc.c (GC_stopped_mark, GC_print_heap_sects): Make output of
GC_log_printf (printing amount of reclaimed memory and total heap
size) more compact (to fit into 80-characters line for reasonable
values).
Ivan Maidanski [Mon, 30 Jan 2012 19:11:16 +0000 (23:11 +0400)]
Open log file in APPEND mode (Win32) if file name given via
environment variable (to match behavior in Unix/Cygwin)
* misc.c (GC_CreateLogFile): Declare "appendToFile" local variable;
open log file either in CREATE_ALWAYS mode (and move file pointer to
log end) if the log file name is specified via environment variable.
Ivan Maidanski [Mon, 30 Jan 2012 18:20:04 +0000 (22:20 +0400)]
Code refactoring of GC_CreateLogFile (Win32)
* misc.c (GC_LOG_STD_NAME): New macro.
* misc.c (GC_init, GC_CreateLogFile): Use GC_LOG_STD_NAME instead
of "gc.log".
* misc.c (GC_CreateLogFile): Rename "logPath" local variable to
"pathBuf".
* misc.c (GC_CreateLogFile): Declare/use "hFile" and "logPath" local
variables.
Ivan Maidanski [Mon, 30 Jan 2012 12:42:29 +0000 (16:42 +0400)]
Code refactoring of GC_get_nprocs (define for every supported target
and simplify GC_thr_init)
* pthread_support.c (GC_get_nprocs): Define for all targets (either as
macro as inline function); group all implementations together.
* pthread_support.c (get_ncpu): Rename to GC_get_nprocs.
* pthread_support.c (GC_thr_init): Call GC_get_nprocs() for all
targets.
* pthread_support.c (GC_get_nprocs): Remove debug logging (of CPUs
number).
* pthread_support.c (GC_thr_init): Log number of CPUs (if
GC_print_stats) even in case PARALLEL_MARK is disabled.
Ivan Maidanski [Sun, 29 Jan 2012 19:09:43 +0000 (23:09 +0400)]
Update TODO file
Ivan Maidanski [Sun, 29 Jan 2012 18:52:30 +0000 (22:52 +0400)]
Use union of AO_t and word for mse_descr to avoid type casting
(which breaks 'strict-aliasing' compiler optimization)
* include/private/gc_pmark.h (GC_ms_entry): Change type of mse_descr
from word to word_ptr_ao_u.
* include/private/gc_pmark.h (GC_mark_stack_top): Add FIXME.
* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add 'volatile'
keyword to type cast for AO_or argument.
* include/private/gc_priv.h (counter_t): Add 'volatile' in case of
defining as AO_t (replace typedef with a macro).
* include/private/gc_priv.h (word_ptr_ao_u): New union type.
* include/private/gc_pmark.h (PUSH_OBJ): Add ".w" suffix to mse_descr.
* mark.c (GC_mark_from, GC_steal_mark_stack, GC_push_all): Likewise.
* mark.c (GC_steal_mark_stack): Use "ao" element of union to load and
clear mse_descr atomically; remove pointer type casts.
Ivan Maidanski [Sun, 29 Jan 2012 17:46:40 +0000 (21:46 +0400)]
Code refactoring regarding GC_PUSH_ONE_HEAP (mark)
* finalize.c (GC_ignore_self_finalize_mark_proc): Pass
GC_mark_stack_top to GC_PUSH_ONE_HEAP.
* mark.c (PUSH_GRANULE): Likewise.
* include/private/gc_pmark.h (GC_PUSH_ONE_HEAP): Replace
hard-coded GC_mark_stack_top with mark_stack_top argument; reformat
comment; add missing brackets.
Ivan Maidanski [Sun, 29 Jan 2012 16:17:31 +0000 (20:17 +0400)]
Code refactoring of Darwin GC_dyld_image_add/remove (make read-only
array 'const' and remove trailing NULL)
* dyn_load.c (GC_dyld_add_sect_fmts): Add 'const' keyword to global
array definition; remove trailing NULL.
* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Test array
index boundary instead of testing for trailing NULL.
Ivan Maidanski [Sun, 29 Jan 2012 16:07:31 +0000 (20:07 +0400)]
Use union of AO_t and 'tse' data pointer in specific.c to avoid type
casting (breaking strict-aliasing rules)
* include/private/specific.h (ptse_ao_u): New union type.
* include/private/specific.h (thread_specific_data): Change type of
"hash" field from "tse" pointer to ptse_ao_u.
* specific.c (invalid_tse): Put to 'const' data section.
* specific.c (GC_key_create_inner, GC_setspecific, GC_remove_specific,
GC_slow_getspecific, GC_check_tsd_marks): Use "p" element of union to
access "tse" pointer of hash table.
* specific.c (GC_setspecific): Use "ao" element of union to store
"hash" table entry atomically; remove type cast.
Ivan Maidanski [Sun, 29 Jan 2012 15:15:46 +0000 (19:15 +0400)]
Remove part of DllMain-specific code which is always disabled (Win32)
* win32_threads.c (first_thread, GC_push_thread_structures): Refine
the comment.
* win32_threads.c (GC_delete_gc_thread, GC_push_thread_structures):
Remove pthread-specific code from the code specific to DllMain-based
thread registration (since GC_PTHREADS cannot be defined if
GC_NO_THREADS_DISCOVERY is undefined).
* win32_threads.c (GC_DllMain): Reformat the code.
Ivan Maidanski [Sun, 29 Jan 2012 14:03:27 +0000 (18:03 +0400)]
Add missing 'volatile' for AO_t variable definitions
(to minimize number of casts breaking strict-aliasing rules)
* mallocx.c (GC_bytes_allocd_tmp): Change type from signed_word to
AO_t.
* mallocx.c (GC_generic_malloc_many): Use AO_load to get
GC_bytes_allocd_tmp value; remove type cast for GC_bytes_allocd_tmp
passed to AO_fetch_and_add.
* pthread_support.c (GC_spin_count, GC_block_count,
GC_unlocked_count): Add "volatile" for AO_t global variable (defined
only if LOCK_STATS).
* win32_threads.c (GC_attached_thread, GC_block_count,
GC_unlocked_count): Likewise.
* win32_threads.c (GC_Thread_Rep): Add "volatile" for "in_use" AO_t
field.
* win32_threads.c (GC_started_thread_while_stopped): Remove "result"
local variable; use AO_compare_and_swap_release (if available) instead
of AO_nop_full/load/store for GC_attached_thread.
* win32_threads.c (GC_stop_world): Clear GC_attached_thread using
AO_store.
Ivan Maidanski [Sun, 29 Jan 2012 10:41:46 +0000 (14:41 +0400)]
Move some GC_arrays non-pointer fields to module where they are used
* include/private/gc_priv.h (_GC_arrays): Move _max_heapsize and
_non_gc_bytes_at_gc fields to alloc.c.
* include/private/gc_priv.h (GC_max_heapsize, GC_non_gc_bytes_at_gc):
Remove.
* alloc.c (GC_non_gc_bytes_at_gc, GC_max_heapsize): Define global
variables as STATIC.
Ivan Maidanski [Sat, 28 Jan 2012 18:33:58 +0000 (22:33 +0400)]
Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
* alloc.c (GC_maybe_gc, GC_expand_hp_inner): Change printf "%ld"
format specifier to "%lu" one according to printed value.
* backgraph.c (GC_print_back_graph_stats): Likewise.
* blacklst.c (GC_default_print_heap_obj_proc,
GC_promote_black_lists): Likewise.
* gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
* mark_rts.c (GC_print_static_roots): Likewise.
* alloc.c (GC_stopped_mark): Correct logged GC number.
* dbg_mlc.c (GC_print_backtrace): Cast printed value to proper type.
* mark.c (GC_mark_from): Likewise.
* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_stubborn,
GC_debug_malloc_atomic, GC_debug_malloc_uncollectable): Change printf
"%ld" format specifier for line number to "%d" one.
* malloc.c (GC_free): Improve logged message (if LOG_ALLOCS).
* thread_local_alloc.c (GC_malloc): Likewise.
* os_dep.c (GC_dirty_init): Improve logged message (for VERBOSE level).
Ivan Maidanski [Sat, 28 Jan 2012 17:39:28 +0000 (21:39 +0400)]
gctest: Output marker threads count at end
* tests/test.c (run_one_test): Adjust printf format specifier.
* tests/test.c (main): Move printf for completed collections number
to check_heap_stats().
* tests/test.c (check_heap_stats): Print number of marker threads.
Ivan Maidanski [Sat, 28 Jan 2012 15:28:13 +0000 (19:28 +0400)]
Make GC_parallel a synonym to GC_markers_m1
* include/gc.h (GC_parallel, GC_enable_incremental): Update comment.
* include/private/gc_priv.h (GC_markers_m1): Define as a synonym
(macro) to GC_parallel instead of declaring a global variable (only
if PARALLEL_MARKER); update the comment.
* mark.c (GC_markers_m1): Remove global variable.
* pthread_support.c (start_mark_threads): Remove unnecessary
GC_parallel zeroing (after setting GC_markers_m1 to 0).
* win32_threads.c (start_mark_threads): Likewise.
* pthread_support.c (GC_fork_child_proc, GC_thr_init): Remove
unnecessary GC_markers_m1 zeroing (after setting GC_parallel to FALSE).
* win32_threads.c (GC_thr_init): Likewise.
* pthread_support.c (GC_thr_init): Set GC_parallel to FALSE instead of
zeroing GC_markers_m1; remove GC_parallel assignment to TRUE (since
GC_markers_m1 is set to non-zero value); add the comment.
* pthread_support.c (GC_thr_init): Set GC_parallel to FALSE instead of
zeroing GC_markers_m1; add the comment.
* pthread_support.c (GC_thr_init): Remove GC_parallel assignment to
TRUE (since GC_markers_m1 is set to non-zero value).
* win32_threads.c (GC_thr_init): Likewise.
Ivan Maidanski [Sat, 28 Jan 2012 13:19:25 +0000 (17:19 +0400)]
Parallel-marker code refactoring (replace GC_markers with GC_markers_m1)
* include/private/gc_priv.h (GC_markers): Replace with GC_markers_m1
(which is GC_markers minus one); update the comment.
* mark.c (GC_markers): Likewise.
* mark.c (GC_help_marker): Replace GC_markers with GC_markers_m1.
* pthread_support.c (GC_is_mach_marker, start_mark_threads,
GC_segment_is_thread_stack, GC_fork_child_proc, GC_thr_init): Likewise.
* win32_threads.c (GC_get_next_stack, start_mark_threads,
GC_wait_marker, GC_notify_all_marker, GC_thr_init): Likewise.
Ivan Maidanski [Sat, 28 Jan 2012 09:17:51 +0000 (13:17 +0400)]
Change GC_markers and GC_nprocs type to int
* include/private/gc_priv.h (GC_markers): Change type from long to int.
* mark.c (GC_markers): Likewise.
* pthread_support.c (GC_nprocs): Likewise.
* pthread_support.c (start_mark_threads, GC_thr_init): Adjust printf
format specifier for GC_markers and GC_nprocs.
* win32_threads.c (GC_thr_init): Likewise.
* pthread_support.c (GC_thr_init): Cast sysconf() result to int.
* win32_threads.c (start_mark_threads, GC_wait_marker,
GC_notify_all_marker): Remove unnecessary cast of GC_markers.
* win32_threads.c (GC_thr_init): Cast dwNumberOfProcessors to int.
Ivan Maidanski [Fri, 27 Jan 2012 15:07:20 +0000 (19:07 +0400)]
Log amount of unmapped memory (if enabled) on marking-for-collection
* alloc.c (GC_stopped_mark, GC_print_heap_sects): Print
GC_unmapped_bytes value to log if USE_MUNMAP.
Ivan Maidanski [Fri, 27 Jan 2012 05:46:55 +0000 (09:46 +0400)]
Code refactoring of GC_finish_collection (eliminate code duplication
via COMMA_IF_USE_MUNMAP new macro)
* alloc.c (IF_USE_MUNMAP, COMMA_IF_USE_MUNMAP): New macro (defined
conditionally based on USE_MUNMAP).
* alloc.c (GC_finish_collection): Eliminate code duplication via
[COMMA_]IF_USE_MUNMAP macro.
* alloc.c (GC_try_to_collect_general): Use IF_USE_MUNMAP instead of
ifdef USE_MUNMAP.
Ivan Maidanski [Fri, 27 Jan 2012 05:40:15 +0000 (09:40 +0400)]
Fix GC_init_linux_data_start to set GC_data_start to valid address
even if GC_no_dls
(fix commit db0da19)
* os_dep.c (GC_init_linux_data_start): Test GC_no_dls only to avoid
GC_find_limit call; initialize GC_data_start to DATAEND in case of
GC_no_dls to make data root empty (to prevent incorrect argument
passed to GC_add_roots_inner call in GC_register_data_segments).
* os_dep.c (GC_register_data_segments): Do not invoke
GC_add_roots_inner if upper bound (obtained from sbrk) is not upper
than DATASTART (e.g., if the latter is set to DATAEND on GC_no_dls).
Ivan Maidanski [Thu, 26 Jan 2012 17:31:37 +0000 (21:31 +0400)]
Update ChangeLog
Ivan Maidanski [Thu, 26 Jan 2012 16:36:57 +0000 (20:36 +0400)]
Fix static data roots registration on Android (if GC is shared
library) by defining GC_INIT_CONF_ROOTS
* include/gc.h (GC_INIT_CONF_ROOTS): Define to register static data
root in range from "__data_start" to "_end" on Android (unless
explicitly prohibited by client via GC_NOT_DLL macro) since the client
data root is not registered automatically if GC is build as a shared
library.
* tests/test.c (GC_COND_INIT): Invoke GC_INIT also on Android.
Ivan Maidanski [Thu, 26 Jan 2012 05:16:10 +0000 (09:16 +0400)]
Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
(causing pthread_attr_getstack to be used to get main stack base
even in single-threaded mode instead of GC_linux_main_stack_base)
* include/private/gcconfig.h (USE_GET_STACKBASE_FOR_MAIN): Define if
PLATFORM_ANDROID.
Ivan Maidanski [Thu, 26 Jan 2012 05:13:48 +0000 (09:13 +0400)]
Add debug logging on data roots addition or removal (enabled by
DEBUG_ADD_DEL_ROOTS new macro)
* mark_rts.c (GC_add_roots_inner): Debug logging at adding new entry
to GC_static_roots (only if DEBUG_ADD_DEL_ROOTS).
* mark_rts.c (GC_clear_roots, GC_remove_root_at_pos): Add debug
logging (only if DEBUG_ADD_DEL_ROOTS).
Ivan Maidanski [Thu, 26 Jan 2012 04:44:15 +0000 (08:44 +0400)]
Adjust OK_DISCLAIM_INITZ definition
* include/private/gc_priv.h (OK_DISCLAIM_INITZ): Replace NULL with
0 for function pointer (in case of ENABLE_DISCLAIM).
Daniel R. Grayson [Thu, 26 Jan 2012 04:42:33 +0000 (08:42 +0400)]
Fix GC_add_roots_inner for Mac OS X (enable GC_dyld_image_add to
pass unaligned segment start to GC_add_roots)
* mark_rts.c (GC_add_roots_inner): Round "b" pointer up to word
boundary.
* include/gc.h (GC_add_roots): Update the comment.
Petter Urkedal [Wed, 25 Jan 2012 19:30:02 +0000 (03:30 +0800)]
Remove closure data from GC_register_disclaim_proc.
* include/gc_disclaim.h, fnlz_mlc.c (GC_disclaim_proc, GC_register_disclaim_proc):
Remove CD from typedef and function.
* reclaim.c (GC_reclaim_uninit, GC_reclaim_block): Adjust calls.
* include/private/gc_priv.h, misc.c: Remove CD from object kind struct and
initializers.
Ivan Maidanski [Wed, 25 Jan 2012 15:18:39 +0000 (19:18 +0400)]
Remove Android-specific code inside Solaris-specific code in dyn_load
* dyn_load.c (GC_register_dynamic_libraries): Remove PLATFORM_ANDROID
macro check from Solaris-specific code.
Ivan Maidanski [Wed, 25 Jan 2012 15:12:36 +0000 (19:12 +0400)]
Move GC_register_disclaim_proc to fnlz_mlc
* misc.c (GC_register_disclaim_proc): Move definition to fnlz_mlc.c
(to minimize linked code size in case "disclaim" finalization is
unused).
* misc.c: Do not include gc_disclaim.h.
* fnlz_mlc.c (GC_register_disclaim_proc): Add GC_ASSERT for kind
passed by the client.
Ivan Maidanski [Wed, 25 Jan 2012 15:01:02 +0000 (19:01 +0400)]
Code refactoring of GC_init_real_syms (GC_USE_DLOPEN_WRAP case)
* pthread_support.c (GC_init_real_syms): Remove LIBPTHREAD_NAME,
LIBPTHREAD_NAME_LEN, len, namebuf, libpthread_name and simplify the
code invoking dlopen (if RTLD_NEXT not defined).
Ivan Maidanski [Tue, 24 Jan 2012 15:31:53 +0000 (19:31 +0400)]
Workaround some Linux/arm kernels bug to get correct GC_nprocs value
* pthread_support.c (STAT_READ, STAT_BUF_SIZE): Move the definition
out of PLATFORM_ANDROID condition.
* pthread_support.c (GC_get_nprocs_present): New static function
obtaining number of avalable CPUs from
"/sys/devices/system/cpu/present" (only Linux/arm excluding NaCl).
* pthread_support.c (GC_thr_init): Invoke GC_get_nprocs_present
(unless set from the environment variable) to workaround a bug in
some Linux/arm kernels (including Android).
Ivan Maidanski [Tue, 24 Jan 2012 04:39:47 +0000 (08:39 +0400)]
Fix GC_get_nprocs (Linux) returned variable type
* pthread_support.c (GC_get_nprocs): Change "result" local variable
type to int from word (to match returned value type); remove redundant
cast; initialize "result" variable just before its use.
Ivan Maidanski [Tue, 24 Jan 2012 04:23:17 +0000 (08:23 +0400)]
.gitignore: Add gc.log
Ivan Maidanski [Tue, 24 Jan 2012 04:22:01 +0000 (08:22 +0400)]
Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
* misc.c (GC_init): If "GC_LOG_FILE" environment variable is unset and
GC_LOG_TO_FILE_ALWAYS macro defined then open "gc.log" file for GC
logging (only Unix and Cygwin).
Ivan Maidanski [Tue, 24 Jan 2012 04:16:14 +0000 (08:16 +0400)]
Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
* pthread_support.c (GC_thr_init): Allow to specify GC_markers
minimum value (by GC_MIN_MARKERS).
Ivan Maidanski [Mon, 23 Jan 2012 18:23:39 +0000 (22:23 +0400)]
Prevent 'unused var' warnings and adjust ABORT message in GC_DllMain
* win32_threads.c (GC_DllMain): Do not declare "sb" and "sb_result"
local variables if unused.
* win32_threads (GC_DllMain): Remove redundant test for
THREAD_LOCAL_ALLOC (since it is always off if GC_NO_THREADS_DISCOVERY);
adjust ABORT message (for DLL_PROCESS_ATTACH case if PARALLEL_MARK).
Ivan Maidanski [Mon, 23 Jan 2012 17:48:54 +0000 (21:48 +0400)]
Update TODO file
Ivan Maidanski [Mon, 23 Jan 2012 17:26:29 +0000 (21:26 +0400)]
Update ChangeLog
Patrick C. Beard [Mon, 23 Jan 2012 17:21:48 +0000 (21:21 +0400)]
Integrate ancient 'pcbeard' GC port for MacOS 9 Classic
* include/private/gc_priv.h (bcopy, bzero, BCOPY_EXISTS): Add
definition for ancient MacOS/ppc.
* mach_dep.c (PushMacRegisters): Add implementation for MacOS/ppc.
* mach_dep.c (GC_push_regs): Fix to work on MacOS/ppc.
Ivan Maidanski [Mon, 23 Jan 2012 16:58:01 +0000 (20:58 +0400)]
Remove unused USE_GENERIC_PUSH_REGS macro (avr32)
* include/private/gcconfig.h (USE_GENERIC_PUSH_REGS): Remove.
Ivan Maidanski [Mon, 23 Jan 2012 16:38:03 +0000 (20:38 +0400)]
configure: Enable parallel mark by default (only Linux, Solaris,
Darwin, Win32)
Ivan Maidanski [Mon, 23 Jan 2012 16:08:30 +0000 (20:08 +0400)]
Split GC_abort with GC_on_abort and abort() invoked from ABORT
(to let ABORT inherit 'noreturn' attribute of abort)
* misc.c (GC_abort): Replace with GC_on_abort (return from GC_on_abort
instead of abort); update the comment.
* include/private/gc_priv.h (GC_abort): Likewise.
* include/private/gc_priv.h (GC_on_abort): Define as empty macro in
case of SMALL_CONFIG.
* include/private/gc_priv.h (ABORT): Always call GC_on_abort (unless
PCR) and abort (or _exit, or ExitProcess or DebugBreak, depending on
the target).
Ivan Maidanski [Mon, 23 Jan 2012 15:14:15 +0000 (19:14 +0400)]
Prevent compiler warning in GC_print_callers (regarding 'pipe' variable)
* os_dep.c (GC_print_callers): Declare "pipe" local variable only if
used.
Ivan Maidanski [Mon, 23 Jan 2012 04:17:19 +0000 (08:17 +0400)]
Replace ABORTs followed by statement with ABORT_RET having dummy
condition (to suppress 'statement unreachable' compiler warnings
caused by abort tagged as 'no-return')
* dbg_mlc.c (GC_debug_realloc): Replace ABORT() with ABORT_RET().
* gcj_mlc.c (mark_stack_limit): Likewise.
* os_dep.c (catch_exception_raise_state,
catch_exception_raise_state_identity): Likewise.
* typd_mlc.c (GC_descr_obj_size, GC_push_complex_descriptor): Likewise.
* include/private/gc_priv.h (ABORT_RET): New macro.
* mark.c (GC_mark_from): Put ABORT_RET instead of "cannot happen"
comment.
Ivan Maidanski [Mon, 23 Jan 2012 04:03:10 +0000 (08:03 +0400)]
Turn some unreachable return statements into reachable (to suppress
compiler warning)
* dbg_mlc.c (GC_generate_random_heap_address): Change function
algorithm structure to have reachable return statement at function end.
* mark.c (GC_mark_some): Likewise.
* os_dep.c (GC_mprotect_thread): Place a dummy return statement (which
uses function "arg"); remove unreachable return statement.
* win32_threads.c (GC_DllMain): Place GC_ASSERT before
GC_get_stack_base.
Ivan Maidanski [Mon, 23 Jan 2012 03:53:14 +0000 (07:53 +0400)]
Add missing GC_ATTR_UNUSED annotation to catch_exception_raise (Darwin)
* os_dep.c (catch_exception_raise_state,
catch_exception_raise_state_identity, catch_exception_raise): Tag
unused arguments with GC_ATTR_UNUSED.
Ivan Maidanski [Mon, 23 Jan 2012 03:48:48 +0000 (07:48 +0400)]
Fix a typo in a comment in os_dep.c
* os_dep.c (GC_sigbus_count): Fix a typo in a comment.
Ivan Maidanski [Fri, 20 Jan 2012 22:15:54 +0000 (02:15 +0400)]
Update TODO file
Ivan Maidanski [Fri, 20 Jan 2012 22:14:36 +0000 (02:14 +0400)]
Update ChangeLog
Paolo Molaro [Wed, 16 Feb 2005 21:23:39 +0000 (21:23 +0000)]
alloc: tune the code to collect instead of expanding the heap if
there are many finalizers and we reclaimed some memory from cleaning
the finalization queue (should fix Mono bugs #71001 and #70701).
(Apply commit a43aba7 from 'mono_libgc' branch)
* alloc.c (last_fo_entries, last_bytes_finalized): New static
variable.
* alloc.c (GC_collect_or_expand): Test GC_fo_entries delta (in case
of non-zero GC_bytes_finalized value) in the condition of toggling
garabage collection; update last_fo_entries and last_bytes_finalized
values.
* include/private/gc_priv.h (GC_fo_entries): Declare global variable
(for use in GC_collect_or_expand).
Ivan Maidanski [Fri, 20 Jan 2012 18:29:49 +0000 (22:29 +0400)]
Update bug reports email address (recommend GC mailing list)
* configure.ac (AC_INIT): Update bug reports email.
* doc/gcdescr.html: Likewise.
* doc/overview.html: Fix email address.
Ivan Maidanski [Thu, 19 Jan 2012 04:41:17 +0000 (08:41 +0400)]
cordprnt: Suppress 'uninitialized variable use' compiler warning
* cord/cordprnt.c (CORD_fprintf, CORD_vfprintf, CORD_printf,
CORD_vprintf): Initialize "out" local variable to prevent
"uninitialized variable use" compiler warning.
Ivan Maidanski [Thu, 19 Jan 2012 04:39:14 +0000 (08:39 +0400)]
cordtest: Add a test for CORD_cat
* cord/tests/cordtest.c (test_basics): Insert a check of CORD_cat
result to be not CORD_EMPTY (in case of a non-empty input).
Ivan Maidanski [Wed, 18 Jan 2012 04:51:16 +0000 (08:51 +0400)]
Fix GC_finalized_malloc for out-of-memory case (and for missing
'const' qualifier)
* fnlz_mlc.c (GC_finalized_disclaim): Add 'const' qualifier for "fc"
pointer.
* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc): Cast
"op" to 'const' pointer on "fclos" storing.
* fnlz_mlc.c (GC_finalized_malloc): Use GC_get_oom_fn() instead of
locked read of GC_oom_fn.
* fnlz_mlc.c (GC_core_finalized_malloc): Test GC_generic_malloc result
for NULL (return NULL in this case).
* fnlz_mlc.c (GC_core_finalized_malloc): Add assertion on GC_size
returned value (at least just to outline that it might be bigger than
"lb" value).
Ivan Maidanski [Wed, 18 Jan 2012 04:44:11 +0000 (08:44 +0400)]
Improve disclaim_bench and disclaim_test
* tests/disclaim_bench.c: Do not include assert.h.
* tests/disclaim_test.c: Likewise.
* tests/disclaim_bench.c (my_assert): New macro.
* tests/disclaim_test.c: Likewise.
* tests/disclaim_bench.c (testobj_finalize, testobj_new): Replace
assert with my_assert.
* tests/disclaim_test.c (misc_sizes_dct, test_misc_sizes, pair_dct,
pair_new, pair_check_rec): Likewise.
* tests/disclaim_test.c (misc_sizes_dct): Test "cd" value (at least to
prevent "unused argument" compiler warning).
* tests/disclaim_test.c (test_misc_sizes): Use ANSI C style of
function declaration.
* tests/disclaim_bench.c (fclos): Add 'const' qualifier (since
GC_finalized_malloc now accepts const pointer).
* tests/disclaim_test.c (test_misc_sizes, pair_new): Likewise.
* tests/disclaim_test.c (test_misc_sizes, pair_new): Test
GC_finalized_malloc result for NULL.
Ivan Maidanski [Wed, 18 Jan 2012 04:39:17 +0000 (08:39 +0400)]
Fix realloc_test to check GC_malloc result for NULL
* tests/realloc_test.c (main): Prevent NULL pointer dereference
(exit with an error message in case of NULL returned by GC_malloc).
Ivan Maidanski [Wed, 18 Jan 2012 04:36:33 +0000 (08:36 +0400)]
Use EXPECT in malloc result testing for NULL
* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Use EXPECT to test "op"
value for NULL.
* malloc.c (GC_generic_malloc_inner, GC_malloc_uncollectable):
Likewise.
* mallocx.c (GC_generic_malloc_many, GC_posix_memalign): Likewise.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Likewise.
Petter Urkedal [Mon, 16 Jan 2012 20:51:35 +0000 (04:51 +0800)]
Move finalizer closure to the end of objects.
* fnlz_mlc.c: Move finalizer closure for finalized object kinds to the end
of objects. This way, we don't require all interior pointers, and GC_base
returns the expected address.
* tests/disclaim_test.c: Improve test coverage.
Ivan Maidanski [Tue, 17 Jan 2012 15:44:39 +0000 (19:44 +0400)]
Add 'const' qualifier to pointer argument of GC_clear/set_mark_bit,
GC_finalized_malloc, GC_general_register_disappearing_link
* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
Make argument pointer const.
* finalize.c (GC_general_register_disappearing_link): Likewise.
* fnlz_mlc.c (GC_core_finalized_malloc, GC_finalized_malloc): Likewise.
* include/gc.h (GC_change_stubborn, GC_end_stubborn_change,
GC_debug_change_stubborn, GC_debug_end_stubborn_change,
GC_general_register_disappearing_link): Likewise.
* include/gc_disclaim.h (GC_finalized_malloc): Likewise.
* include/gc_mark.h (GC_clear_mark_bit, GC_set_mark_bit): Likewise.
* mark.c (GC_set_mark_bit, GC_clear_mark_bit): Likewise.
* stubborn.c (GC_end_stubborn_change, GC_change_stubborn): Likewise.
* finalize.c (GC_general_register_disappearing_link): Remove redundant
pointer type casts.
* tests/test.c (cons, print_int_list, mktree): Likewise.
* include/gc.h (GC_GENERAL_REGISTER_DISAPPEARING_LINK): Add cast
removing potential 'const' qualifier.
Ivan Maidanski [Tue, 17 Jan 2012 04:19:04 +0000 (08:19 +0400)]
Fix cordtest temporary file names for Win32
* cord/tests/cordtest.c (FNAME1, FNAME2): Do not specify folder
(platform-dependent) for temporary file; use same short file name
(DOS-compatible) for all targets.
Ivan Maidanski [Tue, 17 Jan 2012 04:02:00 +0000 (08:02 +0400)]
Update ChangeLog
Ivan Maidanski [Mon, 16 Jan 2012 05:24:57 +0000 (09:24 +0400)]
Move cord_pos.h to public headers folder (since included from cord.h)
* include/private/cord_pos.h: Rename to include/cord_pos.h.
* BCC_MAKEFILE (de_win.obj): Rename "private/cord_pos.h" entry to
"cord_pos.h".
* Makefile.direct (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* Makefile.dj (CORD_SRCS, CORD_INCLUDE_FILES): Likewise.
* NT_MAKEFILE (de_win.obj): Likewise.
* NT_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (de_win.obj): Likewise.
* NT_X64_THREADS_MAKEFILE (de_win.obj): Likewise.
* OS2_MAKEFILE (cordbscs.obj, cordxtra.obj, cordprnt.obj,
cordtest.exe): Likewise.
* gc.mak (DEP_CPP_DE_WI, DEP_CPP_DE_C2e, DEP_CPP_CORDX,
DEP_CPP_CORDB): Likewise.
* include/include.am (dist_noinst_HEADERS): Likewise.
* include/cord.h: Include "private/cord_pos.h" instead of "cord_pos.h".
* include/cord_pos.h (CORD_H): Test (skip the file if undefined).
* include/cord_pos.h (CORD_POSITION_H): Define.
Ivan Maidanski [Mon, 16 Jan 2012 12:03:34 +0000 (16:03 +0400)]
Merge branch 'libcord-visibility'
Ivan Maidanski [Mon, 16 Jan 2012 05:13:23 +0000 (09:13 +0400)]
configure: improve GCC '-fvisibility' option support checking
* configure.ac (GC_DLL): Add "-Werror" to CFLAGS (to treat warnings
as errors) when checking for "-fvisibility=hidden" support (useful for
Cygwin).
Ivan Maidanski [Mon, 16 Jan 2012 04:55:33 +0000 (08:55 +0400)]
Remove dependency on cord in gc_config_macros.h (libcord visibility fix)
* include/cord.h: Do not include gc_config_macros.h.
* include/cord.h (CORD_API): Define similar to GC_API definition in
gc_config_macros.h.
* include/gc_config_macros.h: Revert changes done in
"libcord visibility fix" (do not test CORD_H, do not define
GC_API_EXPORT and GC_API_IMPORT).
Ivan Maidanski [Mon, 16 Jan 2012 04:42:33 +0000 (08:42 +0400)]
Minor adjustment of libcord visibility fix
* cord/cord.am (libcord_la_CPPFLAGS): Do not define CORD_BUILD and
GC_DLL here (same approach as for GC_BUILD).
* cord/cordbscs.c: Include config.h if HAVE_CONFIG_H (for GC_DLL) and
define CORD_BUILD (before including cord.h).
* cord/cordprnt.c: Likewise.
* cord/cordxtra.c: Likewise.
Petter Urkedal [Sat, 14 Jan 2012 10:11:12 +0000 (11:11 +0100)]
Fix visibility of symbols in libcord.
* include/gc_config_macros.h: Make the export specifications usable also to
the cord library.
* include/cord.h, include/private/cord_pos.h: Define CORD_API and annotate
the public API.
Ivan Maidanski [Fri, 13 Jan 2012 16:30:23 +0000 (20:30 +0400)]
Add 'const' qualifier for GC_is_marked argument pointer
* include/gc_mark.h (GC_is_marked): Refine comment.
* include/gc_mark.h (GC_is_marked): Make passed pointer const.
* mark.c (GC_is_marked): Likewise.
* mark.c (GC_is_marked): Cast result to int (instead of GC_bool).
Petter Urkedal [Sun, 8 Jan 2012 09:30:42 +0000 (17:30 +0800)]
Export mark-bit manipulation functions.
* include/private/gc_priv.h, include/gc_mark.h: Move GC_is_marked,
GC_clear_mark_bit and GC_set_mark_bit to a public header and adjust
prototypes and comment.
* mark.c: Adjust prototypes accordingly.
Ivan Maidanski [Fri, 13 Jan 2012 15:53:47 +0000 (19:53 +0400)]
Fix extra/gc.c to enable GC source inclusion from multi-threaded app
* extra/gc.c: Include gc_pthread_redirects.h (unless
GC_NO_THREAD_REDIRECTS) to restore thread calls macro-based
redirection after the corresponding undef's in pthread_support.c.
* win32_threads.c: Restore thread calls macro-based redirection
(unless GC_NO_THREAD_REDIRECTS) at the file end.
* extra/gc.c: Remove "file not well tested" comment.
Ivan Maidanski [Fri, 13 Jan 2012 04:55:21 +0000 (08:55 +0400)]
Add setter and getter for GC_on_heap_resize;
change GC_on_heap_resize argument type from size_t to GC_word
* include/gc.h (GC_on_heap_resize_proc): Declare new type.
* alloc.c (GC_on_heap_resize): Change type to GC_on_heap_resize_proc
(which uses GC_word argument instead of size_t and GC_CALLBACK calling
conventions).
* include/gc.h (GC_on_heap_resize): Likewise.
* alloc.c (GC_expand_hp_inner): Do not cast GC_heapsize value in
GC_on_heap_resize call.
* include/gc.h (GC_on_heap_resize): Refine comment.
* include/gc.h (GC_set_on_heap_resize, GC_get_on_heap_resize): New
API functions.
* misc.c (GC_set_on_heap_resize, GC_get_on_heap_resize): Likewise.
Paolo Molaro [Mon, 24 Jan 2005 15:29:23 +0000 (15:29 +0000)]
Add on-heap-resize event notification to API
(Apply part of commit 3f1314a from 'mono_libgc' branch)
* include/gc.h (GC_on_heap_resize): New API variable declaration.
* alloc.c (GC_on_heap_resize): New global variable.
* alloc.c (GC_finish_collection): Invoke GC_on_heap_resize (if
non-zero) on returning true.
Ivan Maidanski [Thu, 12 Jan 2012 04:39:37 +0000 (08:39 +0400)]
Update AUTHORS file
Ivan Maidanski [Thu, 12 Jan 2012 03:51:16 +0000 (07:51 +0400)]
Replace repeating '==' sequences in documentation with double '=' mark
* TODO: Replace sequences of repeating '==' identifying section
titles (which is also used by git-apply) with two '=' symbols at the
beginning and at the end of each title.
* ChangeLog: Likewise.
* doc/README.Mac: Likewise.
* doc/README.darwin: Likewise.
* configure.ac: Remove sequences of repeating '==' (in a comment).
* doc/README.amiga: Likewise.
Ivan Maidanski [Thu, 12 Jan 2012 03:37:15 +0000 (07:37 +0400)]
Update TODO file
Ivan Maidanski [Thu, 12 Jan 2012 03:29:56 +0000 (07:29 +0400)]
.gitignore: Ignore *.gc.log files
Ivan Maidanski [Thu, 12 Jan 2012 03:25:56 +0000 (07:25 +0400)]
Improve GC_thread_is_registered implementation and testing
* pthread_support.c (GC_thread_is_registered): Call pthread_self
outside LOCK; add DCL_LOCK_STATE declaration; replace "ptr" local
variable with "GC_thread me" (and remove cast).
* win32_threads.c (GC_thread_is_registered): Fix implementation by
calling GC_lookup_thread_inner (now works the same as in
pthread_support.c).
* tests/test.c (run_one_test): Test GC_thread_is_registered (only if
THREADS).
Zoltan Varga [Thu, 3 Mar 2005 21:09:34 +0000 (21:09 +0000)]
Add GC_thread_is_registered API function
(Apply commit 9b40e5d from 'mono_libgc' branch)
* include/gc.h (GC_thread_is_registered): Declare new API function
(only if GC_THREADS).
* pthread_support.c (GC_thread_is_registered): New API function
implementation.
* win32_threads.c (GC_thread_is_registered): Likewise.
Ivan Maidanski [Tue, 10 Jan 2012 18:03:20 +0000 (22:03 +0400)]
Optimization: move pthread_self calls out of LOCK section
* pthread_support.c (GC_do_blocking_inner, GC_call_with_gc_active,
pthread_exit): Move pthread_self call out of LOCK section (declare
"self" local variable).
* win32_threads.c (GC_call_with_gc_active): Move GetCurrentThreadId
call out of LOCK section (declare "thread_id" local variable).
Ivan Maidanski [Tue, 10 Jan 2012 17:00:59 +0000 (21:00 +0400)]
Fix GC_restart_handler to preserve errno if needed
* pthread_stop_world.c (GC_restart_handler): Preserve errno value in
case of sem_post or GC_log_printf invocation inside.
Ivan Maidanski [Tue, 10 Jan 2012 16:33:57 +0000 (20:33 +0400)]
Eliminate code in GC_suspend_handler
* pthread_stop_world.c (GC_suspend_handler): Eliminate code
duplication (regarding errno save/restore).
Zoltan Varga [Tue, 23 May 2006 15:23:37 +0000 (15:23 +0000)]
Add assertion on result alignment to GC_unix_mmap_get_mem
(Apply commit 3e56070 from 'mono_libgc' branch)
* os_dep.c (GC_unix_mmap_get_mem): Add an assert to bail out early if
run on a machine with smaller page size than HBLKSIZE.
Ivan Maidanski [Tue, 10 Jan 2012 13:18:10 +0000 (17:18 +0400)]
FreeBSD: Add comment to SIG_SUSPEND/THR_RESTART definitions
* include/private/gcconfig.h (SIG_SUSPEND, SIG_THR_RESTART): Add
comment (suggest alternate value) for FreeBSD/i386, FreeBSD/alpha and
FreeBSD/x86_64.
Zoltan Varga [Mon, 23 Feb 2009 21:26:49 +0000 (21:26 +0000)]
Avoid unnecessary GC_find_limit invocation if GC_no_dls
(Apply commit f5d47a1 from 'mono_libgc' branch)
* os_dep.c (GC_init_linux_data_start): Avoid the call to
GC_find_limit() if GC_no_dls is TRUE, as it is not needed and
it complicates debugging since it causes a SIGSEGV.
* os_dep.c (GC_register_data_segments): Add assertion for DATASTART.