12011-05-23 Ivan Maidanski <ivmai@mail.ru> 2 3 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if 4 defined; explicitly define for some targets. 5 62011-05-23 Ivan Maidanski <ivmai@mail.ru> 7 8 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB). 9 * stubborn.c (GC_dirty): Ditto. 10 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB, 11 PROC_VDB): Undefine if MANUAL_VDB. 12 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if 13 MANUAL_VDB. 14 * os_dep.c (async_set_pht_entry_from_index): Define for 15 MANUAL_VDB. 16 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if 17 success; if ioctl() failed then just print warning instead of 18 aborting. 19 202011-05-23 Ivan Maidanski <ivmai@mail.ru> 21 22 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld) 23 for line number printing. 24 252011-05-23 Ivan Maidanski <ivmai@mail.ru> 26 27 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS 28 (for PROC_VDB only); print errors via GC_err_printf; rename "ps" 29 and "np" local variables to npages and pagesize, respectively; 30 remove "current_addr" local variable. 31 * os_dep.c: Reformat comments. 32 332011-05-22 Ivan Maidanski <ivmai@mail.ru> 34 35 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base 36 for BeOS and OS/2; define HAVE_GET_STACK_BASE. 37 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific 38 GC_get_main_stack_base implementation is defined. 39 * os_dep.c (GC_get_main_stack_base): Define that based on 40 GC_get_stack_base() in a single place (only if 41 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base() 42 result. 43 442011-05-20 Ivan Maidanski <ivmai@mail.ru> 45 46 * mark.c (GC_push_selected): Remove "push_fn" argument (use 47 GC_push_all directly); update the documentation; reformat the 48 comment. 49 * mark.c (GC_push_conditional): Simplify the code (for better 50 readability). 51 522011-05-20 Ivan Maidanski <ivmai@mail.ru> 53 54 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for 55 boolean local variables. 56 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update. 57 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty, 58 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single 59 place. 60 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute 61 PHT_HASH(h) only once (store result to a local variable). 62 632011-05-20 Ivan Maidanski <ivmai@mail.ru> 64 65 * doc/README.solaris2: Update. 66 672011-05-19 Ivan Maidanski <ivmai@mail.ru> (really Jie Liu) 68 69 * include/private/gcconfig.h (end, InitStackBottom): Declare 70 extern variable for RTEMS. 71 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM): 72 Update (for RTEMS). 73 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro 74 name (for RTEMS). 75 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER): 76 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS). 77 782011-05-18 Ivan Maidanski <ivmai@mail.ru> 79 80 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in 81 single-threaded environment. 82 832011-05-18 Ivan Maidanski <ivmai@mail.ru> 84 85 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB. 86 * tests/test.c (NUMBER_ROUND_UP): New macro. 87 * tests/test.c (check_heap_stats): Round up total expected heap 88 size to the nearest 4 MiB bound. 89 * tests/test.c (check_heap_stats): Print the current and expected 90 heap sizes in case of failure. 91 922011-05-18 Ivan Maidanski <ivmai@mail.ru> 93 94 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing 95 only if GC_print_stats; print errors using GC_err_printf. 96 * checksums.c (GC_check_blocks): Join adjacent printf() calls into 97 a single one. 98 992011-05-17 Ivan Maidanski <ivmai@mail.ru> 100 101 * pthread_support.c (pthread_join): Add assertion (check thread is 102 finished). 103 * pthread_support.c (GC_register_my_thread): Don't detach the 104 thread if invoked from the thread destructor. 105 * win32_threads.c (GC_register_my_thread): Ditto. 106 * win32_threads.c (GC_unregister_my_thread): Don't delete the 107 thread (just set FINISHED) if the thread is not detached (only if 108 GC_PTHREADS); add assertion (check the thread is not finished). 109 * tests/threadkey_test.c (main): Join some created threads. 110 1112011-05-17 Ivan Maidanski <ivmai@mail.ru> 112 113 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local 114 variable to "t". 115 * win32_threads.c (GC_delete_gc_thread): Ditto. 116 * pthread_support.c (pthread_join, pthread_detach, 117 pthread_cancel): Rename "thread_gc_id" local variable to "t". 118 * win32_threads.c (GC_pthread_detach): Ditto. 119 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local 120 variable. 121 * win32_threads.c (GC_pthread_join): Rename "joinee" local 122 variable to "t". 123 1242011-05-16 Ivan Maidanski <ivmai@mail.ru> 125 126 * pthread_stop_world.c (pthread_sigmask): Undefine even if not 127 DEBUG_THREADS. 128 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only 129 if GC_EXPLICIT_SIGNALS_UNBLOCK). 130 * pthread_support.c (GC_unblock_gc_signals): New prototype. 131 * pthread_support.c (GC_register_my_thread_inner, 132 GC_register_my_thread): Call GC_unblock_gc_signals (only if 133 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment. 134 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New 135 macro. 136 1372011-05-16 Ivan Maidanski <ivmai@mail.ru> 138 139 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy", 140 "sig" local variables; rename my_thread local variable to "self". 141 1422011-05-13 Ivan Maidanski <ivmai@mail.ru> 143 144 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create 145 more than 30 in parallel by default). 146 1472011-05-13 Ivan Maidanski <ivmai@mail.ru> 148 149 * tests/threadkey_test.c (key_once, main): Work around for Solaris 150 PTHREAD_ONCE_INIT. 151 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris. 152 1532011-05-13 Ivan Maidanski <ivmai@mail.ru> 154 155 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local 156 variable. 157 * pthread_support.c (GC_unregister_my_thread_inner): Revert back 158 GC_remove_specific invocation; add a comment. 159 * include/private/thread_local_alloc.h (GC_remove_specific): 160 Revert back. 161 * specific.c: Expand all tabs to spaces. 162 * specific.c (slow_getspecific): Cast qtid to AO_t. 163 * include/private/specific.h (quick_thread_id): Reformat comment. 164 * include/private/specific.h (key_create, setspecific, 165 remove_specific): Remove "extern" keyword. 166 * include/private/specific.h (getspecific): Change type of "qtid" 167 local variable to unsigned long. 168 1692011-05-11 Ivan Maidanski <ivmai@mail.ru> 170 171 * pthread_support.c (GC_check_tls): Fix "#endif" comment. 172 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment. 173 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC): 174 Remove redundant test of the macro. 175 * include/private/thread_local_alloc.h: Reformat the code. 176 1772011-05-11 Ivan Maidanski <ivmai@mail.ru> 178 179 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro. 180 * os_dep.c (GC_set_and_save_fault_handler): Recognize 181 SIGACTION_FLAGS_NODEFER_HACK macro. 182 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK 183 macro. 184 * pthread_support.c (GC_acquire_mark_lock): Remove commented out 185 code. 186 * include/gc_inline.h (GC_MALLOC_WORDS, GC_MALLOC_ATOMIC_WORDS, 187 GC_CONS): Remove trailing space (before back-slash). 188 * include/private/gc_hdrs.h (GET_BI, GET_HDR_ADDR): Ditto. 189 * include/private/gc_pmark.h (PUSH_OBJ, PUSH_CONTENTS, 190 SET_MARK_BIT_EXIT_IF_SET, LONG_MULT, PUSH_CONTENTS_HDR, 191 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): Ditto. 192 * include/private/thread_local_alloc.h (GC_key_create): Ditto. 193 * include/private/gc_priv.h (SUNOS5SIGS): Don't include 194 sys/siginfo.h on Linux. 195 * include/private/gcconfig.h: Reformat comments (and some code). 196 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro 197 recognized, force PREFETCH_FOR_WRITE to be defined on x86. 198 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New 199 macro recognized (for HP/UX). 200 2012011-05-11 Ivan Maidanski <ivmai@mail.ru> 202 203 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for 204 GWW_VDB). 205 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages 206 resetting (for PROC_VDB). 207 2082011-05-11 Ivan Maidanski <ivmai@mail.ru> (mostly really Ludovic Courtes) 209 210 * tests/threadkey_test.c: New file. 211 * .cvsignore (threadkey_test): Add. 212 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'. 213 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD): 214 New variable. 215 * Makefile.in: Regenerate. 216 2172011-05-11 Ivan Maidanski <ivmai@mail.ru> 218 219 * pthread_support.c (GC_unregister_my_thread_inner): Don't call 220 GC_remove_specific. 221 * include/private/thread_local_alloc.h (GC_remove_specific): 222 Remove (since it is empty for all targets). 223 * pthread_support.c (GC_record_stack_base): New inline function. 224 * win32_threads.c (GC_record_stack_base): Ditto. 225 * pthread_support.c (GC_register_my_thread_inner): Invoke 226 GC_record_stack_base. 227 * win32_threads.c (GC_register_my_thread_inner): Ditto. 228 * pthread_support.c (GC_register_my_thread): If thread is FINISHED 229 then call GC_record_stack_base, clear FINISHED, initialize 230 thread-local list and return success. 231 * win32_threads.c (GC_register_my_thread): Ditto. 232 * include/gc.h (GC_register_my_thread): Update documentation. 233 * include/private/thread_local_alloc.h (GC_thread_key): Ditto. 234 2352011-05-10 Ivan Maidanski <ivmai@mail.ru> 236 237 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join 238 adjacent "#ifdef". 239 * thread_local_alloc.c (GC_malloc_atomic): Call 240 GC_core_malloc_atomic (instead of GC_core_malloc). 241 2422011-05-10 Ivan Maidanski <ivmai@mail.ru> 243 244 * pthread_start.c (GC_start_rtn_prepare_thread): Change return 245 type to GC_thread. 246 * pthread_start.c (GC_inner_start_routine): Pass the current 247 thread descriptor to pthread_cleanup_push (same as in 248 win32_threads.c). 249 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local 250 variable to "self". 251 * win32_threads.c (GC_push_all_stacks): Ditto. 252 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename 253 "my_thread" local variable to "self". 254 * pthread_support.c (GC_unregister_my_thread_inner): New static 255 function. 256 * pthread_support.c (GC_unregister_my_thread, 257 GC_thread_exit_proc): Use GC_unregister_my_thread_inner. 258 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread, 259 GC_do_blocking_inner): Rename "t" local variable to "thread_id". 260 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename 261 "id" local variable to "thread_id". 262 2632011-05-10 Ivan Maidanski <ivmai@mail.ru> 264 265 * pthread_support.c (GC_unregister_my_thread): Call pthread_self 266 only once. 267 * win32_threads.c (GC_pthread_start_inner): Ditto. 268 * pthread_support.c (GC_unregister_my_thread): Add debug output. 269 * win32_threads.c (GC_unregister_my_thread): Ditto. 270 * pthread_support.c (GC_register_my_thread, 271 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable 272 to "self". 273 2742011-05-10 Ivan Maidanski <ivmai@mail.ru> 275 276 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define 277 unconditionally (do not test GC_I_HIDE_POINTERS); update the 278 comment. 279 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to 280 GC_HIDE/REVEAL_POINTER, respectively. 281 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define. 282 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto. 283 2842011-05-10 Ivan Maidanski <ivmai@mail.ru> 285 286 * include/gc.h (GC_register_my_thread): Refine the comment. 287 2882011-05-08 Ivan Maidanski <ivmai@mail.ru> 289 290 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing 291 parentheses. 292 * include/gc_typed.h (GC_get_bit, GC_set_bit, 293 GC_CALLOC_EXPLICITLY_TYPED): Ditto. 294 2952011-05-07 Ivan Maidanski <ivmai@mail.ru> 296 297 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'. 298 2992011-05-07 Ivan Maidanski <ivmai@mail.ru> (really Thorsten Glaser) 300 301 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use 302 getcontext(2) on m68k because it is not implemented there. 303 3042011-05-07 Ivan Maidanski <ivmai@mail.ru> 305 306 * alloc.c (GC_clear_a_few_frames): Use BZERO(). 307 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Ditto. 308 * reclaim.c (GC_start_reclaim): Ditto. 309 * blacklst.c (total_stack_black_listed): Remove "len" local 310 variable. 311 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for" 312 statement with "do-while" one. 313 * dyn_load.c (GC_register_dynamic_libraries, 314 GC_register_dynlib_callback): Remove redundant parentheses. 315 3162011-05-06 Ivan Maidanski <ivmai@mail.ru> 317 318 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress 319 "unused result" compiler warning for fread(). 320 * cord/cordxtra.c: Expand all tabs to spaces. 321 3222011-05-06 Ivan Maidanski <ivmai@mail.ru> 323 324 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block 325 is set to true. 326 3272011-05-06 Ivan Maidanski <ivmai@mail.ru> 328 329 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int; 330 return -1 if the object has (or had) debugging info but was 331 marked deallocated. 332 * include/private/dbg_mlc.h (GC_has_other_debug_info): Ditto. 333 * dbg_mlc.c (GC_has_other_debug_info): Update documentation; 334 remove "ohdr" local variable. 335 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has 336 probably been deallocated. 337 * dbg_mlc.c (GC_debug_free): Don't actually free the object even 338 in the leak-finding mode if GC_findleak_delay_free. 339 * dbg_mlc.c (GC_print_all_smashed_proc): Print a trailing blank 340 line. 341 * dbg_mlc.c (GC_check_leaked): New function (only unless 342 SHORT_DBG_HDRS). 343 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document. 344 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Ditto. 345 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C 346 on 64-bit architectures. 347 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant 348 parentheses. 349 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to 350 GC_has_other_debug_info change). 351 * include/private/gc_priv.h (GC_findleak_delay_free): New global 352 variable declaration (unless SHORT_DBG_HDRS). 353 * misc.c (GC_findleak_delay_free): New global variable; recognize 354 GC_FINDLEAK_DELAY_FREE. 355 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment 356 variable (unless SHORT_DBG_HDRS). 357 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS). 358 * reclaim.c (GC_add_leaked): Don't add the object to leaked list 359 if marked as deallocated. 360 3612011-05-05 Ivan Maidanski <ivmai@mail.ru> 362 363 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the 364 comment. 365 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro. 366 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER. 367 * dbg_mlc.c (GC_smashed): Refine documentation. 368 * mark.c (GC_push_selected): Change dirty_fn return type to 369 GC_bool. 370 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER. 371 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind" 372 local variable. 373 * reclaim.c (GC_reclaim_block): Pass true constant to 374 GC_reclaim_small_nonempty_block (instead of report_if_found). 375 * doc/README.autoconf: Update; fix a typo. 376 * include/private/gcconfig.h (GC_WORD_C): New macro. 377 3782011-05-03 Ivan Maidanski <ivmai@mail.ru> 379 380 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum". 381 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the 382 comment. 383 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg" 384 argument. 385 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass 386 message to GC_print_smashed_obj. 387 * dbg_mlc.c (GC_debug_free): Call GC_size once. 388 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if 389 allocation succeeded; remove unnecessary check for object is 390 smashed (since this is done in GC_debug_free); remove "clobbered" 391 local variable. 392 3932011-05-03 Ivan Maidanski <ivmai@mail.ru> 394 395 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info): 396 Rename "integer" argument to "linenum"; change the type of the 397 argument to int. 398 * gcj_mlc.c (GC_store_debug_info): Ditto. 399 * dbg_mlc.c (GET_OH_LINENUM): New macro. 400 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use 401 GET_OH_LINENUM; adjust print format specifier. 402 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, 403 GC_debug_malloc_atomic_ignore_off_page, 404 GC_debug_generic_malloc_inner, 405 GC_debug_generic_malloc_inner_ignore_off_page, 406 GC_debug_malloc_stubborn, GC_debug_malloc_atomic, 407 GC_debug_malloc_uncollectable, 408 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of 409 "i". 410 * gcj_mlc.c (GC_debug_gcj_malloc): Ditto. 411 4122011-04-26 Ivan Maidanski <ivmai@mail.ru> 413 414 * .cvsignore (initsecondarythread, test_cpp): Add. 415 * os_dep.c (GC_linux_stack_base): Rename to 416 GC_linux_main_stack_base. 417 * os_dep.c (GC_freebsd_stack_base): Rename to 418 GC_freebsd_main_stack_base; adjust error message. 419 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED 420 as an argument for sem_init(). 421 * pthread_support.c (pthread_create): Ditto. 422 * pthread_support.c (pthread_create): Abort in case sem_init() 423 fails. 424 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define. 425 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT 426 from main() if it should be done from the primordial thread only. 427 4282011-04-26 Ivan Maidanski <ivmai@mail.ru> 429 430 * alloc.c: Don't include sys/types.h for ArmCC. 431 * dyn_load.c: Ditto. 432 * os_dep.c: Ditto. 433 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for 434 ArmCC. 435 * mark.c (GC_noop): Define specially for ArmCC. 436 * include/private/gc_priv.h (GC_noop): Ditto. 437 * misc.c (GC_init): Don't test pointers comparison for ArmCC. 438 * misc.c: Don't include unistd.h for ArmCC. 439 * os_dep.c (pages_executable): Rename to GC_pages_executable; 440 make STATIC. 441 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC. 442 * ptr_chck.c (GC_is_visible): Explicitly cast 443 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress 444 a compiler warning). 445 * include/private/gcconfig.h: Recognize __arm. 446 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC. 447 * include/private/gcconfig.h (HBLKPTR): Add parentheses for 448 "bytes" argument. 449 4502011-04-24 Ivan Maidanski <ivmai@mail.ru> 451 452 * pthread_support.c (GC_get_nprocs): Don't define for Android. 453 * pthread_support.c (GC_dummy_thread_local): Don't test 454 GC_LINUX_THREADS. 455 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR): 456 Define for Android. 457 4582011-04-24 Ivan Maidanski <ivmai@mail.ru> 459 460 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h. 461 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if 462 NO_GETCONTEXT. 463 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf 464 call for Android. 465 4662011-04-23 Ivan Maidanski <ivmai@mail.ru> 467 468 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE): 469 Define before including windows.h. 470 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE): 471 Ditto. 472 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN, 473 NOSERVICE): Ditto. 474 * include/private/gc_priv.h (CLOCKS_PER_SEC): Reformat the 475 comment. 476 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point 477 arithmetics; add a comment. 478 4792011-04-23 Ivan Maidanski <ivmai@mail.ru> 480 481 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES. 482 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS. 483 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Ditto. 484 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove 485 "mark_byte" local variable. 486 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment 487 about that AO_or() is not used by GC unless USE_MARK_BITS 488 explicitly set. 489 * include/private/gc_priv.h (OR_WORD): Ditto. 490 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';', 491 add parentheses. 492 * include/private/gc_priv.h (ONES): Define before use by 493 MAKE_COOLER. 494 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used. 495 * include/private/gc_priv.h (OR_WORD): Don't define if 496 USE_MARK_BYTES. 497 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate 498 definition; simplify expression. 499 5002011-04-22 Ivan Maidanski <ivmai@mail.ru> 501 502 * os_dep.c (GC_get_maps): Always close the file. 503 * pthread_support.c (GC_get_nprocs): Ditto. 504 * os_dep.c (READ): Define similarly across the file (without 505 parameters). 506 * pthread_support.c (GC_get_nprocs): Use signed int type for "i" 507 and "len" local variables (since read() may return -1). 508 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix 509 double underscore; add "volatile" for asm. 510 * include/private/gc_pmark.h (LONG_MULT): Add missing 511 parentheses. 512 * include/private/gc_priv.h (OR_WORD): Ditto. 513 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets 514 and ';' symbol. 515 5162011-04-22 Ivan Maidanski <ivmai@mail.ru> 517 518 * os_dep.c (GC_get_stack_base): Implement for Android (same as 519 for Linux). 520 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if 521 failed to open "stat" file (not to issue a warning twice); update 522 the comment. 523 * pthread_support.c (GC_thr_init): Call sysconf() on Android to 524 get the number of CPUs. 525 5262011-04-21 Ivan Maidanski <ivmai@mail.ru> 527 528 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the 529 recent patches regarding this macro as the macro should be set 530 (to 1) before including any other system header. 531 5322011-04-21 Ivan Maidanski <ivmai@mail.ru> 533 534 * doc/README.environment (GC_INITIAL_HEAP_SIZE, 535 GC_MAXIMUM_HEAP_SIZE): Update. 536 5372011-04-20 Ivan Maidanski <ivmai@mail.ru> 538 539 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in 540 heap size specifier; return 0 if not a valid one. 541 * include/gc_cpp.h: Explicitly define inline one-argument delete 542 operator for Cygwin (as a workaround). 543 * include/gc_cpp.h: Reformat the code. 544 * tests/test_cpp.cc: Ditto. 545 * tests/test_cpp.cc (main): Suppress compiler warnings about 546 "assigned value is unused". 547 5482011-04-19 Ivan Maidanski <ivmai@mail.ru> 549 550 * misc.c (GC_parse_mem_size_arg): New function. 551 * misc.c (GC_init): Use GC_parse_mem_size_arg(). 552 * pthread_stop_world.c (tkill): Declare for Android. 553 5542011-04-19 Ivan Maidanski <ivmai@mail.ru> 555 556 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h 557 first (except for NaCl) and then define the macro to 1 if not yet. 558 5592011-04-18 Ivan Maidanski <ivmai@mail.ru> (really Ludovic Courtes) 560 561 * tests/tests.am (TESTS, check_PROGRAMS): Add 562 'initsecondarythread'. 563 * tests/tests.am (initsecondarythread_SOURCES, 564 initsecondarythread_LDADD): New variable. 565 * Makefile.in: Regenerate. 566 * configure: Ditto. 567 5682011-04-18 Ivan Maidanski <ivmai@mail.ru> 569 570 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add 571 "const" to its string argument. 572 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner. 573 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of 574 smashed or previously deallocated found. 575 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for 576 one. 577 * reclaim.c (GC_reclaim_check): Ditto. 578 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word. 579 * os_dep.c (GC_get_stack_base): Don't initialize 580 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus 581 calling GC_INIT() from a non-primordial thread is possible now). 582 * reclaim.c (GC_add_leaked): Turn into an inline one. 583 * reclaim.c (GC_reclaim_small_nonempty_block): 584 Change report_if_found type from int/word to boolean. 585 * include/private/gc_priv.h (GC_start_reclaim): Ditto. 586 * include/private/gc_priv.h (set_mark_bit_from_hdr, 587 clear_mark_bit_from_hdr): Place closing parenthesis properly; 588 reformat the code. 589 5902011-04-16 Ivan Maidanski <ivmai@mail.ru> 591 592 * os_dep.c (GC_get_main_stack_base): Try to use 593 pthread_attr_getstack first for Linux if THREADS. 594 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text 595 alignment. 596 5972011-04-13 Ivan Maidanski <ivmai@mail.ru> 598 599 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message 600 typo. 601 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size). 602 * dbg_mlc.c (GC_debug_generic_malloc_inner): Reformat the comment. 603 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in 604 case of NULL argument). 605 * dbg_mlc.c (GC_free): In case of NULL argument, just return 606 (without any warning printed); eliminate "uncollectable" local 607 variable. 608 6092011-04-13 Ivan Maidanski <ivmai@mail.ru> (mostly really Rainer Orth) 610 611 * configure.ac (THREADDLLIBS): Use alternate thread library on 612 Solaris 8. 613 * configure.ac (need_atomic_ops_asm): Set to true only for Sparc 614 Solaris. 615 * configure.ac: Don't use libdl on mips-sgi-irix6. 616 * configure: Regenerate. 617 6182011-04-11 Ivan Maidanski <ivmai@mail.ru> (really Jie Liu) 619 620 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS. 621 * mach_dep.c (GC_with_callee_saves_pushed): Don't call 622 __builtin_unwind_init() for RTEMS; use setjmp() without the 623 leading underscore (for RTEMS). 624 * tests/test.c (BIG): Use smaller value for RTEMS. 625 * tests/test.c (main): Customize for RTEMS. 626 6272011-04-11 Ivan Maidanski <ivmai@mail.ru> (mostly really Jim Meyering) 628 629 * configure.host: Remove doubled words in comments. 630 * os_dep.c: Ditto. 631 * doc/README: Ditto. 632 * extra/setjmp_t.c: Ditto. 633 * tests/huge_test.c: Ditto. 634 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the 635 K&R-style function definition with the ANSI C one. 636 * extra/setjmp_t.c: Expand all tabs to spaces. 637 * extra/setjmp_t.c (nested_sp): Implement in the same way as 638 GC_approx_sp. 639 6402011-04-10 Ivan Maidanski <ivmai@mail.ru> (really Iain Sandoe, Mike Stump) 641 642 * dyn_load.c (GC_dyld_sections): Add more sctions. 643 * dyn_load.c (GC_dyld_add_sect_fmts): New static varaible. 644 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro. 645 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve 646 logging; add support for on-demand sections. 647 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Reformat 648 the code. 649 6502011-04-10 Ivan Maidanski <ivmai@mail.ru> 651 652 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless 653 GC_ASSERTIONS. 654 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't 655 declare (as external) unless GC_ASSERTIONS. 656 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for 657 Cygwin; add FIXME. 658 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS. 659 * include/private/gcconfig.h: Add "#error" for every "-->" mark. 660 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into 661 an expression. 662 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag 663 (which existed previously as SUSPENDED and still exists in GCJ). 664 * include/private/pthread_support.h (DISABLED_GC): Change the 665 value (as it is already used by SUSPENDED_EXT). 666 6672011-04-10 Ivan Maidanski <ivmai@mail.ru> (mostly really Iain Sandoe) 668 669 * tests/test.c (reverse_test): Modify count (BIG) for 670 ppc64-darwin. 671 6722011-04-09 Ivan Maidanski <ivmai@mail.ru> 673 674 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK 675 macro and environment variable; abort if any error has been 676 printed provided the environment variable (or macro) is set. 677 * doc/README.environment (GC_ABORT_ON_LEAK): Document. 678 * doc/README.macros (GC_ABORT_ON_LEAK): Ditto. 679 * doc/README.macros (FIND_LEAK, SUNOS5SIGS, PCR, 680 USE_COMPILER_TLS): Reformat the text. 681 6822011-04-09 Ivan Maidanski <ivmai@mail.ru> (really Jie Liu) 683 684 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define 685 for RTEMS. 686 * include/private/gcconfig.h (RTEMS): Add support for. 687 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS. 688 6892011-04-09 Ivan Maidanski <ivmai@mail.ru> 690 691 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since 692 it is used internally in some places). 693 6942011-04-09 Ivan Maidanski <ivmai@mail.ru> 695 696 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant 697 declaration. 698 * dbg_mlc.c (GC_debug_malloc_replacement, 699 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA. 700 * malloc.c (GC_debug_malloc_replacement): Ditto. 701 * mallocx.c (GC_debug_realloc_replacement): Ditto. 702 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h. 703 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c. 704 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant 705 includes of string.h. 706 * mallocx.c: Include string.h (for GC_strdup). 707 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration 708 to dbg_mlc.c. 709 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove 710 redundant trailing ';'. 711 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Ditto. 712 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{' 713 properly. 714 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c, 715 malloc.c, mallocx.c. 716 7172011-04-07 Ivan Maidanski <ivmai@mail.ru> 718 719 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the 720 definition from misc.c. 721 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as 722 public. 723 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare. 724 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public 725 macro. 726 * dbg_mlc.c (MAX_SMASHED): Don't define if already set. 727 * reclaim.c (MAX_LEAKED): Ditto. 728 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent 729 access to the global array. 730 * reclaim.c (GC_add_leaked): Ditto. 731 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT 732 (new macro) is defined. 733 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document. 734 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for 735 GC_dump_regularly and GC_print_back_height variables with 736 FALSE/TRUE. 737 * reclaim.c (GC_print_all_errors): Refine the comment. 738 7392011-04-04 Ivan Maidanski <ivmai@mail.ru> 740 741 * tests/test.c (reverse_test_inner): Undo one of the previous 742 patches which shifts "c" and "d" pointers only if 743 ALL_INTERIOR_POINTERS (since interior pointers are always 744 recognized in stacks). 745 7462011-04-03 Ivan Maidanski <ivmai@mail.ru> 747 748 * misc.c (GC_stdout, GC_stderr): Move the definition to the place 749 where GC_log is defined (Unix only). 750 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment 751 variable and the similar macro; redirect GC_stdout and GC_stderr 752 to GC_log if "GC_LOG_FILE" environment variable is set unless 753 prohibited by GC_ONLY_LOG_TO_FILE (Unix only). 754 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document. 755 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Ditto. 756 7572011-04-03 Ivan Maidanski <ivmai@mail.ru> 758 759 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32 760 only). 761 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE() 762 accordingly. 763 * misc.c (GC_write): Reformat code (Unix only). 764 * misc.c (GC_printf): Check GC_quiet before va_start(). 765 7662011-04-03 Ivan Maidanski <ivmai@mail.ru> 767 768 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf 769 inside "if (GC_print_stats)" branch. 770 * alloc.c (GC_collect_or_expand): Ditto. 771 * dyn_load.c (GC_register_dynamic_libraries): Ditto. 772 * headers.c (GC_scratch_alloc): Ditto. 773 * os_dep.c (GC_get_maps, GC_remap, PROTECT, 774 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Ditto. 775 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of 776 GC_printf for DEBUG_THREADS output. 777 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list, 778 GC_stop_world, GC_thread_resume, GC_start_world): Ditto. 779 * pthread_start.c (GC_inner_start_routine): Ditto. 780 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler, 781 GC_push_all_stacks, GC_suspend_all, GC_stop_world, 782 GC_start_world): Ditto. 783 * pthread_support.c (GC_mark_thread, GC_get_nprocs, 784 GC_start_rtn_prepare_thread, pthread_create): Ditto. 785 * alloc.c (GC_adj_bytes_allocd, GC_maybe_gc, GC_stopped_mark, 786 GC_finish_collection): Reformat code. 787 * pthread_stop_world.c (GC_print_sig_mask): Ditto. 788 * pthread_support.c (GC_thr_init): Ditto. 789 * checksums.c (GC_update_check_page): Use GC_printf() instead of 790 GC_err_printf() for error printing. 791 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf 792 instead of GC_printf for logging purposes. 793 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of 794 external variable outside from GC_register_dynamic_libraries. 795 * dyn_load.c (GC_register_dynamic_libraries): Don't use 796 sys_errlist value if errno equals to sys_nerr. 797 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf 798 instead of GC_printf for DL_VERBOSE output. 799 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove, 800 GC_init_dyld): Use GC_log_printf instead of GC_printf for 801 DARWIN_DEBUG output. 802 * os_dep.c (catch_exception_raise): Use GC_log_printf 803 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output. 804 * reclaim.c (GC_print_free_list): Move "n" increment out of 805 GC_printf() call. 806 8072011-04-03 Ivan Maidanski <ivmai@mail.ru> 808 809 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS, 810 DEBUG_WIN32_THREADS): Remove. 811 * win32_threads.c (GC_register_my_thread_inner, 812 GC_win32_start_inner): Use GC_log_printf instead of GC_printf 813 inside "if (GC_print_stats)" branch. 814 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if 815 GC_PTHREADS). 816 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID, 817 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL 818 macro. 819 * win32_threads.c (GC_push_stack_for, GC_mark_thread, 820 GC_CreateThread, GC_beginthreadex, GC_pthread_join, 821 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc, 822 GC_mark_thread_local_free_lists): Use GC_log_printf instead of 823 GC_printf for DEBUG_THREADS output. 824 * win32_threads.c (GC_win32_start_inner, GC_CreateThread, 825 GC_beginthreadex, GC_pthread_join, GC_pthread_create, 826 GC_pthread_start_inner, GC_thread_exit_proc): Cast 827 GetCurrentThreadId result to long; don't cast value of pthread_t 828 type to int; adjust printf format specifiers. 829 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete 830 information. 831 8322011-04-03 Ivan Maidanski <ivmai@mail.ru> 833 834 * tests/test.c (cons, small_cons, gcj_cons, check_ints, 835 check_uncollectable_ints, print_int_list, check_marks_int_list, 836 fork_a_thread, finalizer, mktree, chktree, alloc8bytes, 837 alloc_small, tree_test, typed_test, check_heap_stats, WinMain, 838 test, main): Remove unnecessary casts of GC_printf calls to void. 839 8402011-04-02 Ivan Maidanski <ivmai@mail.ru> 841 842 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across 843 BDWGC) printed message (adjust letters case, terminating dot and 844 new line symbols). 845 * alloc.c (GC_check_fl_marks): Ditto. 846 * backgraph.c (new_back_edges): Ditto. 847 * checksums.c (GC_check_dirty): Ditto. 848 * darwin_stop_world.c (GC_push_all_stacks, 849 GC_suspend_thread_list): Ditto. 850 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc, 851 store_old): Ditto. 852 * dyn_load.c (GC_register_dynamic_libraries): Ditto. 853 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all, 854 GC_push_selected, GC_push_next_marked_dirty): Ditto. 855 * mark_rts.c (GC_exclude_static_roots_inner): Ditto. 856 * os_dep.c (GC_remap, GC_default_push_other_roots, 857 GC_push_thread_structures, GC_dirty_init, GC_read_dirty, 858 catch_exception_raise_state, catch_exception_raise_state_identity, 859 GC_mprotect_thread_notify, GC_mprotect_thread, 860 catch_exception_raise): Ditto. 861 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks, 862 GC_stop_world, GC_stop_init): Ditto. 863 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner, 864 GC_start_routine): Ditto. 865 * win32_threads.c (GC_register_my_thread_inner, 866 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join, 867 GC_pthread_start_inner): Ditto. 868 * alloc.c (GC_expand_hp_inner): Realign the code. 869 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark): 870 Ditto. 871 * misc.c (GC_init): Ditto. 872 * os_dep.c (GC_dirty_init, GC_read_dirty): Ditto. 873 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Ditto. 874 * tests/test.c (run_one_test): Ditto. 875 * misc.c (GC_err_puts): Document. 876 * misc.c (GC_err_write): Remove. 877 * os_dep.c (dump_maps): Ditto. 878 * include/private/gc_priv.h (GC_err_write): Ditto. 879 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of 880 dump_maps() and GC_err_write(). 881 * os_dep.c (GC_read_dirty): Remove redundant brackets. 882 8832011-04-02 Ivan Maidanski <ivmai@mail.ru> 884 885 * tests/test.c (reverse_test_inner): Test interior pointer 886 recognition only if ALL_INTERIOR_POINTERS. 887 * tests/test.c (run_one_test): Replace GC_all_interior_pointers 888 with GC_get_all_interior_pointers(); simplify the expression. 889 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and 890 GC_bytes_allocd_before_gc with GC_get_total_bytes(). 891 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no(). 892 8932011-03-27 Ivan Maidanski <ivmai@mail.ru> 894 895 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability 896 warning if the argument is NULL and GC is in leaks detection mode. 897 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public 898 function definition. 899 * malloc.c (GC_strndup, GC_wcsdup, strndup): Ditto. 900 * mallocx.c (GC_posix_memalign): Ditto. 901 * malloc.c (strdup): Fix string size value; rename "len" to "lb". 902 * mallocx.c: Include errno.h unless WinCE (otherwise include 903 windows.h for Win32 error constants). 904 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before 905 windows.h inclusion. 906 * misc.c (GC_init): Register at-exit callback if GC_find_leak 907 (even if GC_FIND_LEAK macro is unset). 908 * pthread_stop_world.c (NACL_STORE_REGS, 909 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread): 910 Use BCOPY() instead of memcpy(). 911 * pthread_support.c (GC_init_real_syms): Ditto. 912 * doc/README: Update year in copyright. 913 * include/gc.h: Ditto. 914 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP): 915 Document new macro. 916 * doc/README.macros (REDIRECT_MALLOC): Update documentation. 917 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup): 918 New API function prototype. 919 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to 920 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT. 921 * include/gc.h (GC_STRDUP): Remove redundant parentheses. 922 * include/leak_detector.h (realloc, strdup): Ditto. 923 * include/gc.h (GC_STRNDUP): New API macro. 924 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN, 925 GC_NEW_UNCOLLECTABLE): Add missing parentheses. 926 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function 927 prototype (only if GC_REQUIRE_WCSDUP). 928 * include/gc.h (GC_WCSDUP): New API macro (only if 929 GC_REQUIRE_WCSDUP). 930 * include/leak_detector.h: Add copyright header; add usage 931 comment; include stdlib.h and string.h after gc.h (unless 932 GC_DONT_INCLUDE_STDLIB). 933 * include/leak_detector.h (malloc, calloc, free, realloc): 934 Undefine symbol before its redefinition. 935 * include/leak_detector.h (strndup, memalign, posix_memalign): 936 Redefine to the corresponding GC function. 937 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only 938 if GC_REQUIRE_WCSDUP). 939 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define 940 the macro if already defined. 941 9422011-03-22 Ivan Maidanski <ivmai@mail.ru> 943 944 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32 945 when doing code static analysis (to inform the tool that the 946 function is a no-return one). 947 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation 948 of the length of "stat" file; use signed int type for "i", 949 "buf_offset" and "len" local variables (since read() may 950 return -1). 951 9522011-03-20 Ivan Maidanski <ivmai@mail.ru> 953 954 * blacklst.c (GC_bl_init_no_interiors): New function (the code 955 moved from GC_bl_init). 956 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless 957 GC_all_interior_pointers mode; remove unnecessarily parameter cast 958 for GC_scratch_alloc call. 959 * include/private/gc_priv.h (GC_bl_init): Move the function 960 declaration to misc.c file. 961 * misc.c (GC_bl_init_no_interiors): Add a prototype. 962 * misc.c (GC_set_all_interior_pointers): Allow values other than 0 963 and 1; allow altering GC_set_all_interior_pointers value even 964 after GC initialization. 965 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and 966 GC_modws_valid_offsets if GC_all_interior_pointers is off. 967 * misc.c (GC_init): Don't call GC_initialize_offsets() unless 968 GC_all_interior_pointers mode. 969 9702011-03-20 Ivan Maidanski <ivmai@mail.ru> 971 972 * alloc.c (GC_finish_collection): Remove redundant brackets; 973 adjust code indentation. 974 * blacklst.c (GC_add_to_black_list_normal): Simplify expression 975 (to improve code readability). 976 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single 977 conditional expression); initialize "nblocks" just before the loop 978 beginning. 979 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already 980 initialized. 981 * include/private/gc_priv.h (GC_initialize_offsets): Move the 982 function declaration to misc.c file. 983 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized 984 static variable since the function is called only once. 985 * tests/middle.c: Include "gc.h" instead of <gc.h>; expand all 986 tabs to spaces; adjust code indentation; replace the K&R-style 987 function definition with the ANSI C one. 988 * tests/smash_test.c: Ditto. 989 * tests/middle.c (main): Use setter for GC_all_interior_pointers; 990 adjust printf format specifier (and cast the value passed to). 991 9922011-03-15 Ivan Maidanski <ivmai@mail.ru> 993 994 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the 995 documentation. 996 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG 997 if LARGE_CONFIG is defined. 998 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Ditto. 999 10002011-03-15 Ivan Maidanski <ivmai@mail.ru> 1001 1002 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with 1003 "#elif". 1004 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES, 1005 MAX_ROOT_SETS, MAX_HEAP_SECTS): Ditto. 1006 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize 1007 overflow even if not LARGE_CONFIG. 1008 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if 1009 SMALL_CONFIG. 1010 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment. 1011 * new_hblk.c (GC_build_fl_clear2, GC_build_fl_clear4, GC_build_fl2, 1012 GC_build_fl4): Reformat the comment; adjust code indentation. 1013 * new_hblk.c (GC_build_fl): Fix indentation. 1014 * include/private/gc_hdrs.h: Ditto. 1015 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS, 1016 GC_FULL_FREQUENCY): Refine the documentation. 1017 10182011-03-13 Ivan Maidanski <ivmai@mail.ru> 1019 1020 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for 1021 GC_word); reformat the code; expand all tabs to spaces. 1022 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define 1023 as word. 1024 10252011-03-13 Ivan Maidanski <ivmai@mail.ru> 1026 1027 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj, 1028 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a 1029 LINT-like tool to instruct it that the function is invoked only 1030 with valid parameters (otherwise a SEGV is ok); recognize LINT2 1031 new macro. 1032 * misc.c (GC_abort): Instruct a LINT-like tool that the function 1033 never returns in fact. 1034 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow; 1035 close the file immediately after read; use STRTOULL() instead of 1036 decoding the address number manually. 1037 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a 1038 LINT-like tool. 1039 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a 1040 LINT-like tool that the value is restricted to zero and one only 1041 (required since the variable is global and its value is used as a 1042 part of array index expression is some places). 1043 10442011-03-13 Ivan Maidanski <ivmai@mail.ru> 1045 1046 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns 1047 NULL. 1048 * dbg_mlc.c (GC_debug_register_finalizer, 1049 GC_debug_register_finalizer_no_order, 1050 GC_debug_register_finalizer_unreachable, 1051 GC_debug_register_finalizer_ignore_self): Handle out of memory 1052 case properly (similar to GC_register_finalizer_inner). 1053 * headers.c (GC_install_header): Handle the case when alloc_hdr() 1054 returns NULL. 1055 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file. 1056 * pthread_support.c (GC_mark_thread): Place a dummy return 1057 statement (which uses "id" argument) before the actual use of "id" 1058 as an array index (to suppress a warning produced by some static 1059 code analysis tools). 1060 * win32_threads.c (GC_mark_thread): Ditto. 1061 * pthread_support.c (GC_thr_init): Abort (with the appropriate 1062 message) if out of memory. 1063 10642011-03-13 Ivan Maidanski <ivmai@mail.ru> 1065 1066 * finalize.c (GC_register_finalizer_inner): Fix a typo in a 1067 comment. 1068 *include/private/gcconfig.h (STACKBOTTOM): Ditto. 1069 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in 1070 EXPECT (the 2nd argument). 1071 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free): 1072 Ditto. 1073 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Ditto. 1074 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Ditto. 1075 * include/private/gc_hdrs.h (HC_GET_HDR): Ditto. 1076 * include/private/gc_priv.h (SMALL_OBJ): Ditto. 1077 * include/private/specific.h (getspecific): Ditto. 1078 * pthread_support.c (LOCK_STATS): Add a comment. 1079 10802011-03-08 Ivan Maidanski <ivmai@mail.ru> 1081 1082 * include/gc_pthread_redirects.h (GC_NO_DLOPEN, 1083 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST, 1084 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the 1085 definition to gc_config_macros. 1086 10872011-03-08 Ivan Maidanski <ivmai@mail.ru> 1088 1089 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t, 1090 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and 1091 GC_PTHREAD_EXIT_ATTRIBUTE). 1092 * include/gc_pthread_redirects.h (GC_pthread_cancel, 1093 pthread_cancel): Ditto. 1094 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, 1095 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign 1096 code. 1097 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): 1098 Define as empty for NaCl. 1099 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro 1100 defined. 1101 11022011-03-07 Ivan Maidanski <ivmai@mail.ru> 1103 1104 * dyn_load.c (GC_init_dyld): Do not invoke 1105 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is 1106 not required to register the main data segment in that case). 1107 * include/gc.h (GC_no_dls): Adjust the comment. 1108 11092011-03-07 Ivan Maidanski <ivmai@mail.ru> 1110 1111 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test 1112 GC_NO_DLOPEN. 1113 * gc_dlopen.c: Ditto. 1114 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Ditto. 1115 * gc_dlopen.c: Don't include dlfcn.h (as it is included in 1116 gc_pthread_redirects.h). 1117 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t, 1118 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of 1119 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL). 1120 * include/gc_pthread_redirects.h (GC_pthread_sigmask, 1121 pthread_sigmask): Ditto. 1122 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test 1123 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS); reformat the 1124 comment. 1125 * pthread_support.c (pthread_create, GC_pthread_create_t, 1126 GC_pthread_create): Rename GC_PTHREAD_CONST to 1127 GC_PTHREAD_CREATE_CONST. 1128 * win32_threads.c (GC_pthread_create): Ditto. 1129 * include/gc_pthread_redirects.h: Ditto. 1130 * include/gc_pthread_redirects.h (GC_NO_DLOPEN, 1131 GC_NO_PTHREAD_SIGMASK): New macro defined. 1132 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to 1133 empty for NaCl. 1134 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do 1135 not define for Android (as CANCEL_SAFE is not defined). 1136 11372011-03-07 Ivan Maidanski <ivmai@mail.ru> 1138 1139 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR, 1140 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move 1141 definition to gc_config_macros.h file. 1142 * include/gc_config_macros.h: Check the file is included from gc.h 1143 file. 1144 * include/gc_version.h: Ditto. 1145 * include/gc_config_macros.h: Reformat comments. 1146 * include/gc_version.h: Reformat code. 1147 11482011-02-20 Ivan Maidanski <ivmai@mail.ru> (mostly really Elijah Taylor) 1149 1150 * gc_dlopen.c: Empty unit for NaCl. 1151 * os_dep.c: Include fcntl.h for NaCl. 1152 * os_dep.c (GC_get_main_stack_base): Ignore 1153 USE_GET_STACKBASE_FOR_MAIN macro for NaCl. 1154 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl. 1155 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl. 1156 * pthread_start.c (GC_inner_start_routine): Don't invoke 1157 pthread_cleanup_push/pop for NaCl. 1158 * pthread_stop_world.c (GC_nacl_num_gc_threads, 1159 GC_nacl_thread_idx, GC_nacl_park_threads_now, 1160 GC_nacl_thread_parker, GC_nacl_gc_thread_self, 1161 GC_nacl_thread_parked, GC_nacl_thread_used, 1162 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New 1163 variable (fo NaCl only). 1164 * pthread_stop_world.c (GC_suspend_handler): Reformat the code. 1165 * pthread_stop_world.c (GC_remove_allowed_signals, 1166 suspend_handler_mask, GC_stop_count, GC_world_is_stopped, 1167 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem, 1168 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, 1169 GC_restart_handler): Don't define for NaCl. 1170 * pthread_support.c (GC_get_nprocs): Ditto. 1171 * include/private/gc_priv.h (SIG_SUSPEND): Ditto. 1172 * include/private/gcconfig.h (LINUX): Ditto. 1173 * pthread_stop_world.c (GC_push_all_stacks): Push register storage 1174 for NaCl. 1175 * pthread_stop_world.c (GC_suspend_all, GC_stop_world, 1176 GC_start_world): Implement for NaCl. 1177 * pthread_stop_world.c (GC_stop_world): Don't define unused "i" 1178 local variable for OpenBSD (and NaCl). 1179 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for 1180 NaCl. 1181 * pthread_stop_world.c (nacl_pre_syscall_hook, 1182 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook, 1183 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New 1184 function (for NaCl only). 1185 * pthread_stop_world.c (GC_stop_init): Empty for NaCl. 1186 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't 1187 redirect for NaCl. 1188 * include/gc_pthread_redirects.h (pthread_cancel, 1189 pthread_sigmask): Ditto. 1190 * pthread_support.c (GC_nacl_initialize_gc_thread, 1191 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only). 1192 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize 1193 and shutdown thread for NaCl. 1194 * pthread_support.c (GC_thr_init): Call sysconf for NaCl. 1195 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc 1196 for NaCl. 1197 * include/gc.h: Don't include features.h for NaCl. 1198 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro. 1199 * include/gc_pthread_redirects.h (GC_pthread_create): Use 1200 GC_PTHREAD_CONST instead of const. 1201 * win32_threads.c (GC_pthread_create): Ditto. 1202 * pthread_support.c (GC_pthread_create_t, GC_pthread_create, 1203 pthread_create): Ditto. 1204 * include/private/gcconfig.h (NACL): Recognize NaCl. 1205 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl. 1206 * include/private/pthread_stop_world.h (thread_stop_info): Add 1207 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for 1208 NaCl only). 1209 * include/private/pthread_support.h (GC_nacl_gc_thread_self): 1210 Declare internal variable (for NaCl only). 1211 12122011-02-19 Ivan Maidanski <ivmai@mail.ru> 1213 1214 * aclocal.m4: Regenerate (by autoreconf -vif using autoconf-2.68, 1215 automake-1.11.1 and libtool-2.4). 1216 * configure: Ditto. 1217 * ltmain.sh: Ditto. 1218 * makefile.in: Ditto. 1219 * m4/libtool.m4: Ditto. 1220 * m4/ltversion.m4: Ditto. 1221 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT 1222 macro. 1223 12242011-02-13 Ivan Maidanski <ivmai@mail.ru> 1225 1226 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile" 1227 keywords with double underscore. 1228 * os_dep.c (GC_unix_get_mem): Reformat the code. 1229 * os_dep.c (catch_exception_raise, catch_exception_raise_state, 1230 catch_exception_raise_state_identity): Add GC_API_OSCALL to 1231 function definition. 1232 * os_dep.c (catch_exception_raise_state, 1233 catch_exception_raise_state_identity): Move definition to be 1234 before GC_ports. 1235 * os_dep.c (catch_exception_raise): Declare to have the symbol 1236 defined before GC_ports. 1237 * os_dep.c (GC_ports): Store references to catch_exception_raise, 1238 catch_exception_raise_state, catch_exception_raise_state_identity 1239 (to prevent stripping these symbols as dead). 1240 * os_dep.c (catch_exception_raise, catch_exception_raise_state, 1241 catch_exception_raise_state_identity): Mark these symbols as 1242 "referenced dynamically" via an assembler directive (unless 1243 NO_DESC_CATCH_EXCEPTION_RAISE). 1244 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined 1245 similar to GC_API but as if GC_DLL is always defined). 1246 12472011-02-10 Ivan Maidanski <ivmai@mail.ru> (with input from Dimitry Andric) 1248 1249 * os_dep.c: Don't include signal.h for GC_write_fault_handler on 1250 Win32. 1251 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on 1252 FreeBSD. 1253 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define 1254 SEGV_ACCERR for older FreeBSD releases). 1255 * os_dep.c (SIG_OK, CODE_OK, GC_write_fault_handler): Reformat the 1256 code. 1257 12582011-02-10 Ivan Maidanski <ivmai@mail.ru> 1259 1260 * dyn_load.c (GC_register_map_entries, 1261 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate 1262 DATASTART only once if DATASTART_IS_FUNC. 1263 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): 1264 Calculate DATAEND only once if DATAEND_IS_FUNC. 1265 * dyn_load.c: Add comment to some endif; realign some code. 1266 * dyn_load.c (GC_init_dyld): Don't use 1267 _dyld_bind_fully_image_containing_address if 1268 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME. 1269 * include/private/gcconfig.h (GC_data_start, GC_find_limit): 1270 Declare if used by DATASTART/DATAEND, respectively. 1271 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC): 1272 Define if DATASTART/DATAEND is a function, respectively. 1273 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK, 1274 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include 1275 unistd.h. 1276 12772011-02-10 Ivan Maidanski <ivmai@mail.ru> 1278 1279 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT): 1280 Reorder to remove redundant ifdef for Win32. 1281 * os_dep.c: Add comment to some endif. 1282 * os_dep.c: Include pthread.h (for Linux even if single-threaded) 1283 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin. 1284 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited 1285 for some reason). 1286 * os_dep.c (GC_get_main_stack_base): Allow 1287 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add 1288 assertion for the returned result. 1289 * os_dep.c (GC_get_stack_base): Define for Darwin if 1290 multi-threaded. 1291 * os_dep.c (GC_page_was_dirty): Reformat the code. 1292 * os_dep.c: Reformat some comments. 1293 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD). 1294 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads. 1295 * os_dep.c (catch_exception_raise): Remove redundant parentheses; 1296 refine the documentation. 1297 12982011-02-10 Ivan Maidanski <ivmai@mail.ru> 1299 1300 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as 1301 well. 1302 * NT_STATIC_THREADS_MAKEFILE: Ditto. 1303 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine. 1304 * include/gc.h (GC_INIT): Document. 1305 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION, 1306 GC_GETSECTBYNAME): Define depending only on the word size (i.e., 1307 define these macros also for ARM). 1308 * tests/test.c (check_heap_stats): Print main thread stack bottom 1309 as well (only if verbose mode is on). 1310 13112011-02-09 Ivan Maidanski <ivmai@mail.ru> (mostly Jean-Claude Beaudoin) 1312 1313 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code 1314 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG 1315 and X86_64). 1316 13172011-01-22 Ivan Maidanski <ivmai@mail.ru> (mostly Jean-Claude Beaudoin) 1318 1319 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix 1320 "volatile" keyword with double underscore. 1321 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and 1322 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS). 1323 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception 1324 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG. 1325 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define 1326 for Linux/amd64 (since its GLibc getcontext currently has the bug). 1327 13282011-01-17 Ivan Maidanski <ivmai@mail.ru> 1329 1330 * allchblk.c (GC_use_entire_heap): Change type to int (as declared 1331 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP 1332 macro. 1333 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to 1334 alter the default value of GC_use_entire_heap. 1335 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document. 1336 * doc/README.macros (GC_USE_ENTIRE_HEAP): Ditto. 1337 13382011-01-12 Ivan Maidanski <ivmai@mail.ru> 1339 1340 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause 1341 MPROTECT_VDB undefining. 1342 13432011-01-07 Ivan Maidanski <ivmai@mail.ru> 1344 1345 * gc_dlopen.c: Reformat the comments and adjust code indentation. 1346 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in 1347 the comment. 1348 13492011-01-07 Ivan Maidanski <ivmai@mail.ru> 1350 1351 * include/private/gc_priv.h (THREAD_FLD, MAX_HEAP_SECTS, 1352 _GC_arrays, GC_push_all_stack_sections, PRINT_BLACK_LIST, 1353 GC_add_to_black_list_stack, GC_ASSERT, SIG_SUSPEND, 1354 NEED_FIND_LIMIT): Reformat the code and comments for. 1355 * include/private/gc_priv.h (_GC_arrays): Move the conditional 1356 macro definitions (shortcuts for GC_arrays members) into the 1357 structure body. 1358 13592011-01-07 Ivan Maidanski <ivmai@mail.ru> 1360 1361 * .cvsignore: Add more auto-generated files. 1362 * include/private/.cvsignore: Ditto. 1363 * darwin_stop_world.c (GC_mach_handler_thread, 1364 GC_use_mach_handler_thread, 1365 GC_darwin_register_mach_handler_thread): Define only if 1366 MPROTECT_VDB. 1367 * darwin_stop_world.c (GC_suspend_thread_list): Use 1368 GC_mach_handler_thread and GC_use_mach_handler_thread only if 1369 MPROTECT_VDB. 1370 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count 1371 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY). 1372 * misc.c (GC_init): Fix comment for GWW_VDB. 1373 * os_dep.c (GC_mprotect_state_t): Reformat the code. 1374 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT, 1375 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros. 1376 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE, 1377 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR; 1378 reformat the comment. 1379 * pthread_support.c (GC_thr_init): Define "dummy" local variable 1380 only unless GC_DARWIN_THREADS; reformat the code. 1381 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin 1382 even in the single-threaded mode; define for iPhone/iPad. 1383 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef" 1384 around "undef". 1385 * include/private/gcconfig.h (HEURISTIC1): Remove unused for 1386 Cygwin. 1387 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for 1388 Darwin/arm (instead of HEURISTIC1). 1389 * include/private/gcconfig.h (GET_MEM): Reformat the code. 1390 13912011-01-05 Ivan Maidanski <ivmai@mail.ru> 1392 1393 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif" 1394 (for ECOS and NOSYS). 1395 * os_dep.c (GC_get_main_stack_base): Ditto. 1396 * os_dep.c (GC_get_main_stack_base): Check 1397 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one; 1398 remove "dummy" variable (use result one instead); reformat the 1399 code. 1400 * doc/README.macros (SN_TARGET_PS3): Document. 1401 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl") 1402 for Android. 1403 * include/private/pthread_support.h: Fix comment for "endif". 1404 14052010-12-26 Ivan Maidanski <ivmai@mail.ru> (mostly really Miguel de Icaza) 1406 1407 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3. 1408 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3. 1409 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3. 1410 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3. 1411 * os_dep.c (GC_default_push_other_roots, 1412 GC_push_thread_structures): Define for SN_TARGET_PS3. 1413 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define 1414 for SN_TARGET_PS3. 1415 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro 1416 (Sony PS/3 target). 1417 * include/private/gcconfig.h (THREADS): Define unconditionally if 1418 SN_TARGET_PS3. 1419 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3. 1420 14212010-12-26 Ivan Maidanski <ivmai@mail.ru> 1422 1423 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message. 1424 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page, 1425 GC_debug_malloc_atomic_ignore_off_page, 1426 GC_debug_generic_malloc_inner, 1427 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn, 1428 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, 1429 GC_debug_malloc_atomic_uncollectable): Ditto. 1430 * gcj_mlc.c (GC_debug_gcj_malloc): Ditto. 1431 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a 1432 comment. 1433 * dyn_load.c (GC_FirstDLOpenedLinkMap): Ditto. 1434 * mark_rts.c (GC_roots_present): Ditto. 1435 * doc/README: Ditto. 1436 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Ditto. 1437 * include/private/gc_priv.h (_GC_arrays): Ditto. 1438 14392010-12-26 Ivan Maidanski <ivmai@mail.ru> (mostly really Geoff Norton 1440 and Jonathan Pryor) 1441 1442 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of 1443 just blindly linking to -lpthread, as Android includes pthread 1444 support within libc and does not provide a separate libpthread. 1445 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map 1446 entry if l_addr is NULL (Android/bionic only). 1447 * pthread_stop_world.c (android_thread_kill): New internal function 1448 (Android only). 1449 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call 1450 android_thread_kill (based on tkill) instead of pthread_kill on 1451 Android (since pthread_kill cannot be used safely on the platform). 1452 * pthread_support.c (GC_new_thread): Store thread Id (obtained from 1453 gettid) for use by android_thread_kill (Android only). 1454 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id 1455 structure member (Android only). 1456 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym 1457 of __x86_64__ (Darwin); define __environ macro (Android on M68K). 1458 * configure: Regenerate. 1459 14602010-12-02 Ivan Maidanski <ivmai@mail.ru> 1461 1462 * allchblk.c (GC_freehblk): Print extended error message (done via 1463 GC_printf() before aborting with a short message) only if 1464 GC_print_stats. 1465 * dyn_load.c (GC_register_dynamic_libraries): Ditto. 1466 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap, 1467 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Ditto. 1468 * pthread_stop_world.c (GC_start_world): Ditto. 1469 * win32_threads.c (GC_register_my_thread_inner): Ditto. 1470 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments, 1471 GC_dirty_init): Remove redundant print of an error message before 1472 aborting with the same message. 1473 * os_dep.c (GC_register_data_segments): Remove format specifier 1474 from the string passed to GC_err_puts(); use ABORT instead of EXIT 1475 (if invalid executable type). 1476 * os_dep.c (GC_remap): Adjust printf format specifier (for long 1477 type). 1478 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected 1479 (for SIGSEGV/BUS) only if GC_print_stats. 1480 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf 1481 calls. 1482 14832010-11-25 Ivan Maidanski <ivmai@mail.ru> 1484 1485 * tests/test.c (main): Print the relevant message if GWW_VDB. 1486 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32 1487 on x64 if compiled by GCC. 1488 14892010-11-04 Ivan Maidanski <ivmai@mail.ru> 1490 1491 * tests/staticrootstest.c: Include string.h for memset() prototype. 1492 * tests/thread_leak_test.c (main): Fix printf() format specifiers. 1493 14942010-10-22 Ivan Maidanski <ivmai@mail.ru> 1495 1496 * CMakeLists.txt: Check enable_parallel_mark on Darwin. 1497 * configure.ac: Ditto. 1498 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, 1499 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and 1500 GC_DISCOVER_TASK_THREADS, respectively. 1501 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Ditto. 1502 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Ditto. 1503 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define 1504 (and remove FIXME). 1505 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API; 1506 comment; remove FIXME. 1507 * win32_threads.c (GC_NO_DLLMAIN): Rename to 1508 GC_NO_THREADS_DISCOVERY. 1509 * tests/test.c (GC_NO_DLLMAIN): Ditto. 1510 * doc/README.macros (GC_NO_DLLMAIN): Ditto. 1511 * doc/README.win32 (GC_NO_DLLMAIN): Ditto. 1512 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment. 1513 * win32_threads.c (GC_win32_dll_threads): Define as macro to true 1514 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY); 1515 update the comment. 1516 * win32_threads.c (GC_use_DllMain): Rename to 1517 GC_use_threads_discovery; do not set GC_win32_dll_threads if 1518 GC_DISCOVER_TASK_THREADS. 1519 * win32_threads.c (GC_started_thread_while_stopped, 1520 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread, 1521 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions 1522 which use GC_win32_dll_threads to minimize the possibility of 1523 an "unreachable code" compiler warning when GC_win32_dll_threads 1524 is defined as a macro. 1525 * win32_threads.c (GC_unregister_my_thread): Don't call 1526 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC 1527 (since can't happen); use "t" local variable only if not 1528 GC_win32_dll_threads. 1529 * win32_threads.c (GC_register_my_thread_inner): Reformat the 1530 comment. 1531 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document. 1532 * include/gc.h (GC_use_DllMain): Rename to 1533 GC_use_threads_discovery but keep old name as a macro definition. 1534 * include/gc.h (GC_use_threads_discovery): Declare also for 1535 Darwin; update the comment. 1536 * tests/test.c (main): Call GC_use_threads_discovery for Darwin 1537 (to test the mode if possible). 1538 * configure: Regenerate. 1539 15402010-10-16 Ivan Maidanski <ivmai@mail.ru> 1541 1542 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS, 1543 DARWIN_QUERY_TASK_THREADS): New macro recognized. 1544 * darwin_stop_world.c (GC_query_task_threads): add STATIC; 1545 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS 1546 or DARWIN_QUERY_TASK_THREADS; remove FIXME. 1547 * darwin_stop_world.c (GC_use_threads_discovery): New function 1548 (for setting GC_query_task_threads value). 1549 * darwin_stop_world.c (GC_mach_handler_thread, 1550 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS, 1551 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list, 1552 GC_darwin_register_mach_handler_thread): Define only if not 1553 DARWIN_SUSPEND_GC_THREADS. 1554 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude 1555 the code for GC_query_task_threads case from compilation unless 1556 DARWIN_SUSPEND_GC_THREADS. 1557 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only 1558 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS. 1559 * os_dep.c (GC_mprotect_thread): Call 1560 GC_darwin_register_mach_handler_thread only if THREADS and not 1561 DARWIN_SUSPEND_GC_THREADS. 1562 * pthread_support.c (marker_mach_threads): Don't define if 1563 DARWIN_SUSPEND_GC_THREADS. 1564 * pthread_support.c (GC_mark_thread): Don't fill in 1565 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS. 1566 * include/private/gc_locks.h (GC_need_to_lock): Always declare for 1567 THREADS case. 1568 15692010-10-15 Ivan Maidanski <ivmai@mail.ru> 1570 1571 * darwin_stop_world.c (GC_query_task_threads): Don't define to 1572 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize 1573 the variable to false (for now). 1574 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads() 1575 only if not DARWIN_DONT_PARSE_STACK. 1576 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the 1577 approach based on task_threads() only if GC_query_task_threads 1578 else use GC_threads table. 1579 15802010-10-15 Ivan Maidanski <ivmai@mail.ru> 1581 1582 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier. 1583 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to 1584 really clear GC_mach_threads[]). 1585 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count 1586 (instead of calling GC_stop_init). 1587 * include/private/pthread_support.h (GC_stop_init): Remove proto. 1588 * pthread_support.c (GC_stop_init): Add proto (unless Darwin). 1589 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if 1590 GC_DARWIN_THREADS. 1591 15922010-10-14 Ivan Maidanski <ivmai@mail.ru> 1593 1594 * darwin_stop_world.c (GC_stack_range_for): New static function 1595 (move the code from GC_push_all_stacks). 1596 * darwin_stop_world.c (GC_push_all_stacks): Call 1597 GC_stack_range_for(); rename kern_return local variable to 1598 kern_result. 1599 * darwin_stop_world.c (GC_is_mach_marker): Change argument type 1600 from mach_port_t to thread_act_t. 1601 * pthread_support.c (GC_is_mach_marker): Ditto. 1602 16032010-10-12 Ivan Maidanski <ivmai@mail.ru> 1604 1605 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local 1606 variable initialization (always call current_task()). 1607 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner): 1608 Don't set thread's stop_info.stack_ptr value for Darwin. 1609 * include/private/darwin_stop_world.h (thread_stop_info): Update 1610 the comment for stack_ptr. 1611 16122010-10-10 Ivan Maidanski <ivmai@mail.ru> 1613 1614 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local 1615 variables to "kern_return" and "my_thread" ones, respectively; 1616 call mach_port_deallocate() unconditionally. 1617 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self 1618 if DEBUG_THREADS. 1619 16202010-10-09 Ivan Maidanski <ivmai@mail.ru> 1621 1622 * darwin_stop_world.c (GC_mach_thread): Move from 1623 darwin_stop_world.h. 1624 * include/private/darwin_stop_world.h (GC_mach_thread): Remove. 1625 * win32_threads.c (GC_start_world): Define "thread_id" local 1626 variable only if GC_ASSERTIONS; decide whether to resume a thread 1627 based on its "suspended" field value; assert that suspended thread 1628 stack_base is non-zero and the thread is not our one. 1629 16302010-10-08 Ivan Maidanski <ivmai@mail.ru> 1631 1632 * darwin_stop_world.c (GC_thread_resume): New inline function 1633 (move code from GC_thread_resume). 1634 * darwin_stop_world.c (GC_start_world): Check result of 1635 task_threads(); call GC_thread_resume(). 1636 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define 1637 only if not CYGWIN32. 1638 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only 1639 if not CYGWIN32. 1640 16412010-10-06 Ivan Maidanski <ivmai@mail.ru> 1642 1643 * darwin_stop_world.c (FindTopOfStack): Change return type to 1644 ptr_t (from long); make GC_INNER; add GC_ prefix. 1645 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked 1646 local variable (initialized from the corresponding GC_thread 1647 field unless GC_query_task_threads); add assertion that our 1648 thread is not blocked; prefix FindTopOfStack with GC_ and remove 1649 no longer needed cast to ptr_t of the result; handle thread 1650 blocked case (and remove FIXME); use GC_push_all_stack_sections 1651 unless GC_query_task_threads (and remove FIXME). 1652 * pthread_support.c (GC_FindTopOfStack): Declare (if needed). 1653 * pthread_support.c (GC_do_blocking_inner): Call 1654 GC_save_regs_in_stack (if needed) before acquiring the lock. 1655 * win32_threads.c (GC_do_blocking_inner): Ditto. 1656 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack 1657 field of GC_thread (Darwin only). 1658 * include/private/pthread_support.h (GC_thread): Add topOfStack 1659 field for Darwin (unless DARWIN_DONT_PARSE_STACK). 1660 16612010-10-05 Ivan Maidanski <ivmai@mail.ru> 1662 1663 * finalize.c (GC_check_finalizer_nested): Change return type to 1664 char pointer (instead of int pointer); use explicit cast for 1665 GC_finalizer_nested assignment. 1666 * pthread_support.c (GC_check_finalizer_nested): Ditto. 1667 * win32_threads.c (GC_check_finalizer_nested): Ditto. 1668 * finalize.c (GC_finalizer_nested): Change type to unsigned char. 1669 * finalize.c (GC_notify_or_invoke_finalizers): Change type of 1670 "pnested" local variable to char pointer. 1671 * pthread_support.c (GC_do_blocking_inner, 1672 GC_call_with_gc_active): Use explicit cast for "thread_blocked" 1673 field assignment. 1674 * win32_threads.c (GC_lookup_pthread): Use explicit cast for 1675 "suspended" field assignment. 1676 * win32_threads.c (GC_Thread_Rep): Use short type for 1677 finalizer_skipped; use char type for finalizer_nested and flags 1678 fields and reorder some fields (to minimize GC_Thread_Rep 1679 structure size). 1680 * include/private/pthread_support.h (GC_Thread_Rep): Ditto. 1681 * win32_threads.c (GC_Thread_Rep): Use char type for suspended 1682 field (instead of GC_bool). 1683 * include/private/pthread_support.h (GC_Thread_Rep): Use char type 1684 for thread_blocked field (instead of short). 1685 16862010-09-30 Ivan Maidanski <ivmai@mail.ru> 1687 1688 * darwin_stop_world.c (GC_query_task_threads): New variable (or 1689 macro). 1690 * darwin_stop_world.c (GC_push_all_stacks): Use 1691 GC_query_task_threads (to choose between algorithms based on 1692 kernel task_threads and based on GC_threads table); update FIXME; 1693 remove commented out GC_push_one statements. 1694 * pthread_support.c (GC_thr_init, GC_do_blocking_inner, 1695 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize 1696 stack_ptr field for all platforms. 1697 * pthread_support.c (GC_call_with_gc_active): Initialize 1698 saved_stack_ptr field for all platforms. 1699 * include/private/darwin_stop_world.h (thread_stop_info): Add 1700 stack_ptr field; change type of already_suspended from int to 1701 GC_bool. 1702 17032010-09-29 Ivan Maidanski <ivmai@mail.ru> 1704 1705 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro. 1706 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use 1707 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ. 1708 * darwin_stop_world.c (GC_mach_threads): Add FIXME. 1709 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list, 1710 GC_stop_world): Use FALSE and TRUE for already_suspended field and 1711 "changed", "found" variables. 1712 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if 1713 PARALLEL_MARK). 1714 * darwin_stop_world.c (GC_suspend_thread_list): Change return type 1715 to GC_bool; change type of "changed", "found" to GC_bool; make 1716 "my_thread" as an argument (instead of acquiring/deallocating it 1717 locally); do not add my_thread, GC_mach_handler_thread and marker 1718 threads to GC_mach_threads table; check for overflow of 1719 GC_mach_threads table; increase GC_mach_threads_count if "found" 1720 is true and info.suspend_count is non-zero. 1721 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world): 1722 Adjust "thread" format specifiers for GC_printf(); search thread 1723 in "old_list" starting from the previous found one. 1724 * darwin_stop_world.c (GC_stop_world): Rename "changes" to 1725 "changed" local variable; remove "result" variable; adjust 1726 GC_printf debugging message. 1727 * darwin_stop_world.c (GC_start_world): Do not check for 1728 my_thread and GC_use_mach_handler_thread (since they are not added 1729 to GC_mach_threads table); call thread_info() only if 1730 DEBUG_THREADS or GC_ASSERTIONS. 1731 * pthread_support.c (marker_mach_threads): New static variable (if 1732 Darwin). 1733 * pthread_support.c (GC_is_mach_marker): New function (if Darwin). 1734 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads 1735 table (if Darwin). 1736 17372010-09-26 Ivan Maidanski <ivmai@mail.ru> 1738 1739 * alloc.c (GC_parallel): Define only if THREADS. 1740 * misc.c (GC_get_parallel): Ditto. 1741 * include/gc.h (GC_parallel, GC_get_parallel, 1742 GC_get_suspend_signal, GC_allow_register_threads, 1743 GC_register_my_thread, GC_unregister_my_thread): Define only if 1744 GC_THREADS. 1745 * include/gc.h (GC_get_heap_size): Fix a typo in a comment. 1746 17472010-09-11 Ivan Maidanski <ivmai@mail.ru> (really Ludovic Courtes) 1748 1749 * configure.ac: Use `AC_C_INLINE'. 1750 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword 1751 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined. 1752 * configure.ac: Expand all tabs to spaces. 1753 * configure: Regenerate. 1754 * include/private/config.h.in: Ditto. 1755 17562010-09-11 Ivan Maidanski <ivmai@mail.ru> 1757 1758 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for 1759 FreeBSD). 1760 * dyn_load.c (GC_register_main_static_data): Move the definition 1761 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD 1762 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG. 1763 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test 1764 GC_register_main_static_data() result (instead of direct testing 1765 of dl_iterate_phdr (to prevent a compiler warning). 1766 * os_dep.c (CODE_OK): Test si_code also for the value of 2 1767 (FreeBSD case; required for FreeBSD v7+). 1768 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case). 1769 * include/private/gcconfig.h (DATASTART): Cast etext argument in 1770 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD 1771 case). 1772 17732010-09-09 Ivan Maidanski <ivmai@mail.ru> (with input from Ludovic Courtes) 1774 1775 * include/private/specific.h (quick_thread_id): Define thru 1776 GC_approx_sp(); define as a macro. 1777 * include/private/specific.h (getspecific): Use GC_INLINE instead 1778 of __inline__ (to work around Sun CC which does not recognize 1779 inline keyword surrounded with underscores). 1780 * include/private/specific.h: Expand all tabs to spaces; remove 1781 trailing spaces at EOLn. 1782 17832010-09-04 Ivan Maidanski <ivmai@mail.ru> 1784 1785 * darwin_stop_world.c (FindTopOfStack): Simplify condition 1786 expressions. 1787 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants 1788 of this function (DARWIN_DONT_PARSE_STACK). 1789 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our 1790 thread is found (same as in pthread_stop_world.c). 1791 * darwin_stop_world.c (GC_push_all_stacks): Print the number of 1792 scanned threads if verbose (same as in pthread_stop_world.c). 1793 17942010-09-04 Ivan Maidanski <ivmai@mail.ru> 1795 1796 * darwin_stop_world.c (GC_push_all_stacks): Reset 1797 thread_state_count value before every thread_get_state call; 1798 refine the comment for thread_state_count. 1799 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip, 1800 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp 1801 register pushing. 1802 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to 1803 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX). 1804 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN 1805 for i386. 1806 18072010-09-03 Ivan Maidanski <ivmai@mail.ru> 1808 1809 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo. 1810 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type 1811 to GC_bool. 1812 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world): 1813 Simplify the expressions involving GC_use_mach_handler_thread. 1814 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread): 1815 Initialize GC_use_mach_handler_thread to TRUE (instead of 1). 1816 18172010-09-02 Ivan Maidanski <ivmai@mail.ru> 1818 1819 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen, 1820 pthread_sigmask, dlopen): Don't define for Win32 pthreads (and 1821 don't include signal.h and dlfcn.h). 1822 18232010-08-25 Ivan Maidanski <ivmai@mail.ru> (with help from Hans Boehm) 1824 1825 * dyn_load.c (GC_register_dynlib_callback): Add FIXME. 1826 18272010-08-18 Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler) 1828 1829 * include/private/gcconfig.h: Add support for FreeBSD on ppc64. 1830 18312010-08-18 Ivan Maidanski <ivmai@mail.ru> (with help from Andreas Tobler) 1832 1833 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to 1834 VM_PROT_EXECUTE. 1835 18362010-08-14 Ivan Maidanski <ivmai@mail.ru> 1837 1838 * aclocal.m4: Regenerate (by autoreconf -vif using autoconf-2.67, 1839 automake-1.11.1 and libtool-2.2.8). 1840 * configure: Ditto. 1841 * ltmain.sh: Ditto. 1842 * Makefile.in: Ditto. 1843 * include/private/config.h.in: Ditto. 1844 * m4/libtool.m4: Ditto. 1845 * m4/ltoptions.m4: Ditto. 1846 * m4/ltversion.m4: Ditto. 1847 * m4/lt~obsolete.m4: Ditto. 1848 18492010-08-14 Ivan Maidanski <ivmai@mail.ru> 1850 1851 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless 1852 pages_executable is on. 1853 * os_dep.c (os2_alloc): Add FIXME (for recursion). 1854 * os_dep.c (UNPROTECT): Abort with a more informative message if 1855 pages_executable is on ("mprotect" case). 1856 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if 1857 pages_executable is on (Darwin case). 1858 * pthread_support.c (GC_init_real_syms): Abort with an informative 1859 message if libgc is linked after libpthread. 1860 18612010-08-14 Ivan Maidanski <ivmai@mail.ru> 1862 1863 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer 1864 for 64-bit targets. 1865 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE 1866 macro. 1867 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS() 1868 since REAL(pthread_create) is used. 1869 * pthread_support.c (PTHREAD_CREATE): Remove unused. 1870 18712010-08-14 Ivan Maidanski <ivmai@mail.ru> 1872 1873 * extra/threadlibs.c (main): Remove --wrap for "read" (since not 1874 wrapped anymore). 1875 * doc/README.linux (GC_USE_LD_WRAP): Ditto. 1876 * os_dep.c (__wrap_read): Ditto (in the comment). 1877 18782010-08-14 Ivan Maidanski <ivmai@mail.ru> (with help from Hans Boehm) 1879 1880 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the 1881 beginning of the file. 1882 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New 1883 macro (defined only for Linux and Solaris). 1884 * include/gc_pthread_redirects.h (GC_pthread_cancel, 1885 GC_pthread_exit): Declare new API function (only if 1886 GC_PTHREAD_EXIT_ATTRIBUTE). 1887 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit): 1888 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE). 1889 * include/private/pthread_support.h (DISABLED_GC): New macro. 1890 * pthread_support.c (pthread_cancel, pthread_exit): Restore 1891 original definition or declare "real" function (if needed and 1892 GC_PTHREAD_EXIT_ATTRIBUTE). 1893 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t): 1894 Declare new types if needed. 1895 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New 1896 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE). 1897 * pthread_support.c (GC_init_real_syms): Initialize pointers to 1898 the "real" pthread_cancel and pthread_exit (only if 1899 GC_PTHREAD_EXIT_ATTRIBUTE). 1900 * pthread_support.c (GC_unregister_my_thread): Enable collections 1901 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE). 1902 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped 1903 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined). 1904 * pthread_support.c (GC_start_routine): Refine the comment. 1905 * extra/threadlibs.c (main): Adjust --wrap (add "read", 1906 "pthread_exit", "pthread_cancel" but remove "sleep"). 1907 * doc/README.linux (GC_USE_LD_WRAP): Ditto. 1908 * doc/README.linux: Expand all tabs to spaces; remove trailing 1909 spaces at EOLn. 1910 19112010-08-12 Ivan Maidanski <ivmai@mail.ru> (mostly really Mike Gran) 1912 1913 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the 1914 macro definition. 1915 * include/gc.h (GC_reachable_here): Ditto. 1916 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile" 1917 with double '_'. 1918 19192010-07-29 Ivan Maidanski <ivmai@mail.ru> (with input from NIIBE Yutaka) 1920 1921 * pthread_start.c: New file. 1922 * CMakeLists.txt (SRC): Add pthread_start.c. 1923 * Makefile.am (libgc_la_SOURCES): Ditto. 1924 * Makefile.direct (CSRCS): Ditto. 1925 * Makefile.direct (OBJS): Add pthread_start.obj. 1926 * extra/gc.c: Add a comment; include pthread_start.c. 1927 * pthread_support.c (start_info): Move the struct definition down 1928 closer to its usage. 1929 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with 1930 GC_INNER. 1931 * pthread_support.c (GC_inner_start_routine): Move to the 1932 definition to pthread_start.c; leave only the prototype; remove 1933 STATIC. 1934 * pthread_support.c (GC_start_rtn_prepare_thread): New function 1935 (contains parts of the original GC_inner_start_routine). 1936 * Makefile.in: Regenerate. 1937 * configure: Ditto. 1938 19392010-07-28 Ivan Maidanski <ivmai@mail.ru> (mostly really Noah Lavine) 1940 1941 * configure.ac (NO_EXECUTE_PERMISSION): Add comment. 1942 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the 1943 documentation. 1944 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable): 1945 New API function declaration. 1946 * include/gc.h (GC_ignore_warn_proc): Reformat the comment. 1947 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by 1948 pages_executable). 1949 * os_dep.c (pages_executable): New static variable. 1950 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by 1951 GC_get_pages_executable only). 1952 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT): 1953 Replace OPT_PROT_EXEC with pages_executable. 1954 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem, 1955 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE. 1956 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT, 1957 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on. 1958 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New 1959 API function definition. 1960 19612010-07-28 Ivan Maidanski <ivmai@mail.ru> 1962 1963 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for 1964 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64, 1965 at least). 1966 19672010-07-14 Ivan Maidanski <ivmai@mail.ru> 1968 1969 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for 1970 32-bit CPUs (to prevent "Unexpected heap growth" failure). 1971 19722010-07-13 Ivan Maidanski <ivmai@mail.ru> 1973 1974 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP. 1975 * pthread_support.c (pthread_create, pthread_join, pthread_detach, 1976 pthread_sigmask): Ditto. 1977 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype 1978 is added). 1979 * gc_dlopen.c (GC_dlopen): Fix return type. 1980 * pthread_support.c (GC_init_real_syms): Don't define 1981 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and 1982 libpthread_name if RTLD_NEXT. 1983 19842010-07-13 Ivan Maidanski <ivmai@mail.ru> 1985 1986 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment. 1987 * gc_dlopen.c (dlopen): Ditto. 1988 * include/gc.h: Update copyright header. 1989 * include/gc.h (GC_enable_incremental): Refine the comment. 1990 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if 1991 missing (only for Win32). 1992 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN. 1993 * win32_threads.c (GC_ExitThread): Ditto. 1994 * include/gc.h (GC_endthreadex): Add a comment. 1995 19962010-05-31 Ivan Maidanski <ivmai@mail.ru> (really Alexander Belchenko) 1997 1998 * include/cord.h: Fix typos. 1999 * include/cord.h: Expand all tabs to spaces; remove trailing 2000 spaces at EOLn. 2001 20022010-05-22 Ivan Maidanski <ivmai@mail.ru> 2003 2004 * Makefile.in: Regenerate. 2005 * configure: Ditto. 2006 20072010-05-22 Ivan Maidanski <ivmai@mail.ru> 2008 2009 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and 2010 "tests/CMakeLists.txt". 2011 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake". 2012 20132010-05-21 Ivan Maidanski <ivmai@mail.ru> (really Bradley Smith and 2014 Stefano Rivera) 2015 2016 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32. 2017 * include/private/gcconfig.h (AVR32): New macro (also define the 2018 supplementary macros for the target). 2019 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't 2020 define for AVR32. 2021 20222010-05-13 Ivan Maidanski <ivmai@mail.ru> (mostly really Uros Bizjak) 2023 2024 * tests/leak_test.c (main): Explicitly define as returning int 2025 (to prevent a spurious test failure on some Linux/alpha targets). 2026 * tests/thread_leak_test.c (main): Ditto. 2027 * tests/thread_leak_test.c: Initialize GC_find_leak in the main 2028 thread (before GC_INIT) only. 2029 * tests/leak_test.c (main): Use GC_set_find_leak() instead of 2030 accessing GC_find_leak directly. 2031 * tests/thread_leak_test.c (main): Ditto. 2032 20332010-05-05 Ivan Maidanski <ivmai@mail.ru> 2034 2035 * include/gc.h (GC_find_leak, GC_finalize_on_demand, 2036 GC_java_finalization, GC_dont_expand, GC_no_dls, 2037 GC_dont_precollect): Simplify the comment (remove the information 2038 about data races since the value is boolean). 2039 20402010-04-16 Ivan Maidanski <ivmai@mail.ru> (mostly really Louis Zhuang) 2041 2042 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New 2043 Solaris-specific implementation (based on thr_stksegment). 2044 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static 2045 variable used by the Solaris-specific GC_get_stack_base(). 2046 20472010-04-16 Ivan Maidanski <ivmai@mail.ru> (mostly really NIIBE Yutaka) 2048 2049 * pthread_support.c (GC_mark_thread_local_free_lists, 2050 GC_check_tls): Mark (and check) only for live threads (in case of 2051 GC_destroy_thread_local() is called already but GC_delete_thread() 2052 is not yet). 2053 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls): 2054 Ditto (matters only if GC_PTHREADS defined). 2055 20562010-04-09 Ivan Maidanski <ivmai@mail.ru> 2057 2058 * NT_MAKEFILE: Remove the comment about DLL and Win32S. 2059 * NT_STATIC_THREADS_MAKEFILE: Ditto. 2060 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 2061 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc 2062 properly on VS 2005+). 2063 * NT_MAKEFILE: Update GC log file name in comments. 2064 * NT_STATIC_THREADS_MAKEFILE: Ditto. 2065 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 2066 * NT_X64_THREADS_MAKEFILE: Ditto. 2067 * doc/README.win32: Ditto. 2068 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no 2069 longer supported by VS). 2070 * NT_STATIC_THREADS_MAKEFILE: Ditto. 2071 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp. 2072 * NT_STATIC_THREADS_MAKEFILE: Ditto. 2073 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 2074 * NT_X64_THREADS_MAKEFILE: Ditto. 2075 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option. 2076 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe. 2077 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the 2078 default stack size limit). 2079 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll". 2080 * win32_threads.c (GC_get_next_stack): Always define (since it is 2081 also used for Cygwin now). 2082 20832010-03-26 Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm) 2084 2085 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to 2086 be just before GC_clear_marks() call. 2087 * include/gc_mark.h (GC_start_callback_proc): Refine the comment. 2088 20892010-03-23 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn) 2090 2091 * Makefile.am (check_LTLIBRARIES): Initialize to empty. 2092 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest. 2093 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD, 2094 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD, 2095 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES): 2096 Define. 2097 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la. 2098 * .cvsignore: Ignore libstaticrootslib.la. 2099 * Makefile.in: Regenerate. 2100 21012010-03-20 Ivan Maidanski <ivmai@mail.ru> 2102 2103 * m4/libtool.m4: Re-add auto-generated file (for "make dist"). 2104 * m4/lt~obsolete.m4: Ditto. 2105 * m4/ltoptions.m4: Ditto. 2106 * m4/ltsugar.m4: Ditto. 2107 * m4/ltversion.m4: Ditto. 2108 21092010-03-20 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn) 2110 2111 * tests/staticrootstest.c: New file. 2112 * tests/staticrootslib.c: Ditto. 2113 21142010-03-19 Ivan Maidanski <ivmai@mail.ru> (really Dave Korn) 2115 2116 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for 2117 Cygwin as well as other win32 targets. 2118 * dyn_load.c (GC_wnt): Define to constant true. 2119 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as 2120 well as other win32 targets. 2121 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index): 2122 Don't define for Cygwin, as on other win32. 2123 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on 2124 Cygwin as for other win32 targets. 2125 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as 2126 other win32. 2127 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on 2128 other win32. 2129 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't 2130 declare on Cygwin as on other win32. 2131 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when 2132 !NO_DEBUGGING, as on other win32 targets. 2133 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on 2134 Cygwin as for other win32 targets. 2135 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32. 2136 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as 2137 other win32. 2138 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32. 2139 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other 2140 Win32, but call GC_unix_get_mem instead of GlobalAlloc. 2141 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty). 2142 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin 2143 as on other win32 platforms. 2144 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as 2145 for dynamic loading targets. 2146 * include/private/gc_priv.h (GC_INNER): Don't try to use 2147 visibility on Cygwin which does not support it. 2148 * include/private/gc_priv.h (struct roots): Don't declare r_next 2149 member on Cygwin as on other windows hosts. 2150 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define 2151 likewise. 2152 * include/private/gc_priv.h (struct _GC_arrays): Do declare 2153 _heap_bases[] member and don't declare _root_index likewise. 2154 * include/private/gc_priv.h (GC_heap_bases): Do define likewise. 2155 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare 2156 likewise. 2157 * include/private/gc_priv.h (GC_sysinfo): Do declare extern 2158 likewise. 2159 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do 2160 prototype on Cygwin as other win32 platforms. 2161 21622010-03-13 Ivan Maidanski <ivmai@mail.ru> 2163 2164 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and 2165 pthread_attr_getstack() instead of GC_get_stack_base() (and check 2166 returned stackaddr for NULL); output a warning on failure. 2167 21682010-03-12 Ivan Maidanski <ivmai@mail.ru> 2169 2170 * alloc.c (GC_start_call_back): Replace the definition type to 2171 GC_start_callback_proc. 2172 * alloc.c (GC_set_start_callback, GC_get_start_callback): New 2173 setter/getter function. 2174 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc() 2175 unconditionally (because GC_try_to_collect_inner always does full 2176 GC). 2177 * include/gc_mark.h (GC_start_callback_proc): New type. 2178 * include/gc_mark.h (GC_set_start_callback, 2179 GC_get_start_callback): New API function declaration. 2180 21812010-03-12 Ivan Maidanski <ivmai@mail.ru> 2182 2183 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document. 2184 * os_dep.c (GC_get_main_stack_base): Recognize 2185 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM) 2186 and use GC_get_stack_base() in this case. 2187 21882010-03-05 Ivan Maidanski <ivmai@mail.ru> (really Burkhard Linke) 2189 2190 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since 2191 GC_find_limit_with_bound() should be called with the lock held). 2192 * backgraph.c (FOR_EACH_PRED): Fix a typo. 2193 21942010-03-05 Ivan Maidanski <ivmai@mail.ru> 2195 2196 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add 2197 DCL_LOCK_STATE. 2198 * finalize.c (GC_notify_or_invoke_finalizers): Ditto. 2199 * gc_dlopen.c (disable_gc_for_dlopen): Ditto. 2200 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Ditto. 2201 * mark.c (GC_print_trace): Ditto. 2202 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable, 2203 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc, 2204 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier, 2205 GC_get_finalizer_notifier): Ditto. 2206 * os_dep.c (GC_get_stack_base, GC_print_callers): Ditto. 2207 * pthread_support.c (GC_is_thread_tsd_valid, 2208 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner, 2209 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join, 2210 pthread_detach, GC_register_my_thread, GC_inner_start_routine, 2211 pthread_create): Ditto. 2212 * reclaim.c (GC_print_all_errors): Ditto. 2213 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread, 2214 GC_unregister_my_thread, GC_do_blocking_inner, 2215 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join, 2216 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach, 2217 GC_init_parallel): Ditto. 2218 22192010-02-25 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener) 2220 2221 * .cvsignore: New file. 2222 * include/private/.cvsignore: Ditto. 2223 22242010-02-24 Ivan Maidanski <ivmai@mail.ru> 2225 2226 * CMakeLists.txt: Change copyright header. 2227 * tests/CMakeLists.txt: Ditto. 2228 22292010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener) 2230 2231 * doc/README.darwin: Update. 2232 22332010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener) 2234 2235 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it 2236 usable on Mac OS X). 2237 * doc/README.cmake: Update. 2238 22392010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews) 2240 2241 * CMakeLists.txt: New file (adding CMake support). 2242 * tests/CMakeLists.txt: Ditto. 2243 * doc/README.cmake: Ditto. 2244 22452010-02-19 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener) 2246 2247 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE... 2248 macros. 2249 * include/private/gc_priv.h (THREAD_FLD): Recognize 2250 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros. 2251 * configure: Regenerate. 2252 * include/private/config.h.in: Ditto. 2253 22542010-02-15 Ivan Maidanski <ivmai@mail.ru> (really Alexandr Shadchin) 2255 2256 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for 2257 OpenBSD. 2258 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and 2259 OpenBSD. 2260 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin, 2261 NetBSD and OpenBSD. 2262 22632010-02-04 Ivan Maidanski <ivmai@mail.ru> 2264 2265 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even 2266 if THREADS is undefined. 2267 * include/gc.h (GC_malloc_many): Update the comment. 2268 22692010-02-03 Ivan Maidanski <ivmai@mail.ru> 2270 2271 * ChangeLog: Fix some typos. 2272 22732010-01-29 Ivan Maidanski <ivmai@mail.ru> 2274 2275 * Makefile.in: Regenerate (by autoreconf -vif using 2276 libtool-2.2.6b, automake-1.11.1, autoconf-2.65). 2277 * aclocal.m4: Ditto. 2278 * compile: Ditto. 2279 * config.guess: Ditto. 2280 * config.sub: Ditto. 2281 * configure: Ditto. 2282 * depcomp: Ditto. 2283 * install-sh: Ditto. 2284 * ltmain.sh: Ditto. 2285 * missing: Ditto. 2286 * mkinstalldirs: Ditto. 2287 22882010-01-15 Ivan Maidanski <ivmai@mail.ru> 2289 2290 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero 2291 (formerly known as Borland) C++ compiler v6.21+. 2292 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient 2293 VC++ compilers. 2294 22952009-12-18 Ivan Maidanski <ivmai@mail.ru> 2296 2297 * win32_threads.c (GC_register_my_thread_inner, 2298 GC_pthread_start_inner): Undo the previous commit changes for 2299 the thread flags and DETACHED state (since the state is only 2300 tested in GC_thread_exit_proc). 2301 23022009-12-18 Ivan Maidanski <ivmai@mail.ru> (with input from 2303 Jean-Claude Beaudoin) 2304 2305 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the 2306 comment. 2307 * pthread_support.c (GC_delete_thread): Allow to delete the main 2308 thread (don't call GC_INTERNAL_FREE for it); update the comment. 2309 * win32_threads.c (GC_delete_thread): Ditto. 2310 * pthread_support.c (GC_unregister_my_thread): Add an assertion 2311 for FINISHED flag is unset. 2312 * tests/test.c (check_heap_stats): Test the main thread 2313 unregistering (only if THREADS). 2314 * win32_threads.c (GC_register_my_thread_inner): Set flags to 2315 DETACHED (only if GC_PTHREADS). 2316 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for 2317 GC_wait_for_gc_completion). 2318 * win32_threads.c (GC_pthread_start_inner): Clear flags detached 2319 state if needed; set pthread_id and flags while holding the lock. 2320 23212009-12-17 Ivan Maidanski <ivmai@mail.ru> (with input from Andy Wingo) 2322 2323 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for 2324 OpenBSD and Darwin. 2325 23262009-12-17 Ivan Maidanski <ivmai@mail.ru> 2327 2328 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_). 2329 23302009-12-10 Hans-J. Boehm <Hans.Boehm@hp.com> 2331 2332 * test.c (main, WinMain): Consistently don't invoke 2333 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but 2334 do invoke it even if parallel marking is enabled. 2335 23362009-12-08 Ivan Maidanski <ivmai@mail.ru> 2337 2338 * tests/test.c (reverse_test): Comment out a check for MSWIN32 2339 (when determing BIG value) assuming outdated win32S. 2340 * tests/test.c (reverse_test): Rename to reverse_test_inner; 2341 change the declaration (to be of GC_fn_type); call itself thru 2342 GC_call_with_gc_active() if the argument is zero. 2343 * tests/test.c (reverse_test): New function added calling 2344 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and 2345 GC_call_with_gc_active). 2346 23472009-12-08 Ivan Maidanski <ivmai@mail.ru> (with input from Marcos Dione) 2348 2349 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID): 2350 Document. 2351 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID. 2352 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if 2353 PLATFORM_ANDROID. 2354 * include/private/gcconfig.h (LINUX): Define also if 2355 PLATFORM_ANDROID (for the windows-based toolkit). 2356 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly 2357 define for Android/x86 platform. 2358 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize 2359 new macro (undefine DYNAMIC_LOADING in this case). 2360 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if 2361 PLATFORM_ANDROID. 2362 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the 2363 explicitly defined CANCEL_SAFE. 2364 23652009-12-08 Ivan Maidanski <ivmai@mail.ru> 2366 2367 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection() 2368 if GC_DISABLE_INCREMENTAL. 2369 * reclaim.c (GC_reclaim_generic): Ditto. 2370 * checksums.c (GC_page_was_ever_dirty): Add prototype. 2371 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare 2372 unless PARALLEL_MARK. 2373 * include/private/gc_priv.h (GC_dirty_maintained, 2374 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't 2375 declare if GC_DISABLE_INCREMENTAL. 2376 * include/private/gc_priv.h (GC_print_finalization_stats): Don't 2377 declare if SMALL_CONFIG. 2378 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if 2379 GC_DISABLE_INCREMENTAL (since nothing to check). 2380 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if 2381 GC_DISABLE_INCREMENTAL. 2382 * os_dep.c (GC_dirty_maintained): Ditto. 2383 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if 2384 GC_DISABLE_INCREMENTAL. 2385 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty): 2386 Uncomment; define only if CHECKSUMS. 2387 23882009-12-08 Ivan Maidanski <ivmai@mail.ru> 2389 2390 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call 2391 GC_push_all_stack() instead of GC_push_all_stack_frames()). 2392 * include/private/gc_priv.h (GC_push_all_stack_frames, 2393 GC_push_all_register_frames): Rename to 2394 GC_push_all_stack_sections and GC_push_all_register_sections, 2395 respectively. 2396 * mark_rts.c (GC_push_all_stack_frames, 2397 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames, 2398 GC_push_current_stack): Ditto. 2399 * pthread_stop_world.c (GC_push_all_stacks): Ditto. 2400 * win32_threads.c (GC_push_stack_for): Ditto. 2401 * misc.c (GC_call_with_gc_active): Rename "frame" local variable 2402 to "stacksect". 2403 * pthread_support.c (GC_call_with_gc_active): Ditto. 2404 * win32_threads.c (GC_call_with_gc_active): Ditto. 2405 * pthread_support.c (GC_call_with_gc_active): Update FIXME for 2406 Darwin. 2407 * win32_threads.c (GC_Thread_Rep): Update the comment for 2408 traced_stack_sect. 2409 24102009-12-08 Ivan Maidanski <ivmai@mail.ru> (really mostly Hans Boehm) 2411 2412 * darwin_stop_world.c (GC_push_all_stacks): Rename 2413 activation_frame to traced_stack_sect. 2414 * include/private/gc_priv.h (GC_push_all_stack_frames, 2415 GC_push_all_register_frames): Ditto. 2416 * include/private/pthread_support.h (GC_Thread_Rep): Ditto. 2417 * mark_rts.c (GC_push_all_register_frames, 2418 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames, 2419 GC_push_current_stack): Ditto. 2420 * pthread_stop_world.c (GC_push_all_stacks): Ditto. 2421 * pthread_support.c (GC_call_with_gc_active): Ditto. 2422 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active, 2423 GC_push_stack_for): Ditto. 2424 * include/private/gc_priv.h (GC_activation_frame_s): Rename to 2425 GC_traced_stack_sect_s. 2426 * include/private/gc_priv.h (GC_activation_frame): Rename to 2427 GC_traced_stack_sect. 2428 * misc.c (GC_activation_frame, GC_call_with_gc_active): Ditto. 2429 * doc/README.macros (UNICODE): Document. 2430 24312009-12-07 Ivan Maidanski <ivmai@mail.ru> 2432 2433 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro). 2434 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE; 2435 declare and use GC_envfile_getenv(). 2436 * misc.c (GC_envfile_content, GC_envfile_length): New static 2437 variable (only if GC_READ_ENV_FILE). 2438 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init). 2439 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only 2440 if GC_READ_ENV_FILE). 2441 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV) 2442 if GC_READ_ENV_FILE. 2443 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32() 2444 calls to be just before GC_envfile_init() one (since the latter 2445 uses GET_MEM). 2446 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for 2447 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE). 2448 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n' 2449 from the ABORT message. 2450 * misc.c (GC_init): Ditto. 2451 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments): 2452 Ditto. 2453 * pthread_stop_world.c (GC_push_all_stacks): Ditto. 2454 * pthread_support.c (GC_init_real_syms, start_mark_threads): 2455 Ditto. 2456 24572009-12-06 Ivan Maidanski <ivmai@mail.ru> 2458 2459 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin 2460 (since unused for now). 2461 24622009-12-06 Ivan Maidanski <ivmai@mail.ru> 2463 2464 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless 2465 GC_register_main_static_data() is defined. 2466 * dyn_load.c (GC_register_dynamic_libraries): Define only if used 2467 (if DYNAMIC_LOADING or PCR or Win32/CE). 2468 * dyn_load.c (GC_register_main_static_data): Define the default 2469 one only if DYNAMIC_LOADING. 2470 * include/private/gc_priv.h (GC_register_dynamic_libraries): 2471 Declare only if used (to prevent compiler warning). 2472 24732009-12-04 Ivan Maidanski <ivmai@mail.ru> 2474 2475 * mark_rts.c (GC_approx_sp): Add a comment (for GCC). 2476 24772009-12-04 Ivan Maidanski <ivmai@mail.ru> 2478 2479 * include/gc_version.h, configure.ac, doc/README: Change to 2480 version 7.2alpha5. 2481 * configure: Regenerate. 2482 2483[7.2alpha4] 2484 24852009-12-01 Ivan Maidanski <ivmai@mail.ru> 2486 2487 * include/gc_version.h, configure.ac, doc/README: Change to 2488 version 7.2alpha4. 2489 * configure: Regenerate. 2490 24912009-11-21 Ivan Maidanski <ivmai@mail.ru> 2492 2493 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value. 2494 * configure: Regenerate. 2495 24962009-11-18 Ivan Maidanski <ivmai@mail.ru> (really mostly Zoltan Varga) 2497 2498 * include/gc.h (GC_get_suspend_signal): New function declaration. 2499 * misc.c (GC_get_suspend_signal): New API function (only if 2500 THREADS). 2501 25022009-11-16 Ivan Maidanski <ivmai@mail.ru> 2503 2504 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by 2505 two if GC_incremental (instead of TRUE_INCREMENTAL). 2506 25072009-11-10 Ivan Maidanski <ivmai@mail.ru> 2508 2509 * sparc_mach_dep.S (GC_push_regs): Remove the reference. 2510 25112009-11-09 Ivan Maidanski <ivmai@mail.ru> 2512 2513 * os_dep.c (SIZE_T, PULONG_PTR): Remove. 2514 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC 2515 "word"); add the comment. 2516 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch, 2517 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_". 2518 25192009-11-07 Ivan Maidanski <ivmai@mail.ru> 2520 2521 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two 2522 const value (for speed). 2523 * win32_threads.c (THREAD_TABLE_INDEX): New macro. 2524 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner, 2525 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use 2526 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ. 2527 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX. 2528 25292009-11-07 Ivan Maidanski <ivmai@mail.ru> 2530 2531 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime. 2532 25332009-11-06 Ivan Maidanski <ivmai@mail.ru> 2534 2535 * backgraph.c: Remove apostrophe char from "#error". 2536 25372009-11-06 Ivan Maidanski <ivmai@mail.ru> 2538 2539 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document. 2540 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize 2541 new macro; implicitly define it if SMALL_CONFIG. 2542 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for 2543 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG. 2544 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL, 2545 GC_push_conditional): Ditto. 2546 * mark.c (GC_push_next_marked_dirty, GC_push_selected, 2547 GC_push_conditional, GC_block_was_dirty): Ditto. 2548 * misc.c (GC_enable_incremental): Ditto. 2549 * misc.c (GC_init): Ditto (for "GC_PAUSE_TIME_TARGET" and 2550 "GC_ENABLE_INCREMENTAL" environment variables). 2551 * misc.c (GC_enable_incremental): Reformat the code. 2552 25532009-11-06 Ivan Maidanski <ivmai@mail.ru> 2554 2555 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef. 2556 * misc.c (WIN32_LEAN_AND_MEAN): Ditto. 2557 * os_dep.c (WIN32_LEAN_AND_MEAN): Ditto. 2558 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't) 2559 in a comment. 2560 * backgraph.c: Ditto. 2561 * dyn_load.c (GC_register_dynamic_libraries): Ditto. 2562 * extra/threadlibs.c (main): Ditto. 2563 * pthread_support.c (pthread_join): Ditto. 2564 * tests/test.c (main): Ditto. 2565 25662009-11-06 Ivan Maidanski <ivmai@mail.ru> 2567 2568 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch 2569 a duplicate symbol definition linker error). 2570 * misc.c (GC_clear_stack_inner): Ditto. 2571 * sparc_mach_dep.S (GC_push_regs): Comment out the reference. 2572 * sparc_mach_dep.S: Remove trailing spaces at EOLn; remove 2573 multiple trailing blank lines. 2574 25752009-11-06 Ivan Maidanski <ivmai@mail.ru> 2576 2577 * include/private/gc_priv.h (GC_write_disabled): New variable 2578 declaration (only if GC_ASSERTIONS and Win32 threads). 2579 * misc.c (GC_write): Add assertion for GC_write_disabled value is 2580 not on (only if THREADS). 2581 * win32_threads.c (GC_write_disabled): New variable (only if 2582 GC_ASSERTIONS and not Cygwin). 2583 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled 2584 (while holding GC_write_cs). 2585 25862009-11-05 Ivan Maidanski <ivmai@mail.ru> 2587 2588 * win32_threads.c (GC_please_stop): If DllMain-based thread 2589 registration is not compiled in then define GC_please_stop as 2590 a non-volatile variable for assertion only. 2591 * win32_threads.c (GC_stop_world): Set and clear only if defined. 2592 * win32_threads.c (GC_stop_world): Add the comment for GC_printf() 2593 usage (while holding GC_write_cs). 2594 * win32_threads.c (GC_delete_gc_thread): Ditto. 2595 * os_dep.c (GC_remove_protection): Ditto. 2596 25972009-11-05 Ivan Maidanski <ivmai@mail.ru> 2598 2599 * pthread_support.c (GC_inner_start_routine): Join 3 sequential 2600 GC_printf() calls into a single one (for DEBUG_THREADS). 2601 26022009-11-05 Ivan Maidanski <ivmai@mail.ru> 2603 2604 * include/private/gc_priv.h (GC_total_stacksize): New variable 2605 declaration (only if THREADS). 2606 * alloc.c (GC_total_stacksize): New variable (only if THREADS). 2607 * alloc.c (min_bytes_allocd): Calculate stack_size using 2608 GC_stackbottom only in the single-threaded case; otherwise use 2609 GC_total_stacksize; print GC_total_stacksize value if 2610 DEBUG_THREADS. 2611 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type 2612 specifier for lo/hi values (instead of "%lx"). 2613 * darwin_stop_world.c (GC_push_all_stacks): Use 2614 GC_push_all_stack_frames() instead of GC_push_all_stack(). 2615 * darwin_stop_world.c (GC_push_all_stacks): Recalculate 2616 GC_total_stacksize value. 2617 * pthread_stop_world.c (GC_push_all_stacks): Ditto. 2618 * win32_threads.c (GC_push_all_stacks): Ditto. 2619 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return 2620 stack size; don't check for non-zero value of thread->stack_base. 2621 * win32_threads.c (GC_push_all_stacks): Don't call 2622 GC_push_stack_for() and don't check for "t->id == me" if 2623 thread->stack_base is zero. 2624 26252009-11-05 Ivan Maidanski <ivmai@mail.ru> 2626 2627 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier 2628 with "0x". 2629 * os_dep.c (PROTECT): Ditto. 2630 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to 2631 int (to match printf type specifier). 2632 26332009-11-05 Ivan Maidanski <ivmai@mail.ru> 2634 2635 * tests/test.c (check_heap_stats): Take into account the unmapped 2636 memory size when checking for "Unexpected heap growth"; remove 2637 FIXME. 2638 26392009-11-03 Hans Boehm <Hans.Boehm@hp.com> 2640 2641 * alloc.c: Revert last change. 2642 26432009-11-02 Ivan Maidanski <ivmai@mail.ru> 2644 2645 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check 2646 for eCos/NOSYS. 2647 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no 2648 longer defined in GCJ). 2649 26502009-11-02 Ivan Maidanski <ivmai@mail.ru> 2651 2652 * os_dep.c (brk): Rename to ecos_gc_brk. 2653 26542009-11-01 Ivan Maidanski <ivmai@mail.ru> 2655 2656 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute 2657 stack_size even if THREADS. 2658 * doc/README.macros (DEBUG_THREADS): Document. 2659 * pthread_support.c (DEBUG_THREADS): Remove the commented out 2660 definition. 2661 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate 2662 definition. 2663 * win32_threads.c: Include errno.h (except for WinCE). 2664 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param" 2665 to local variables, and free "arg" parameter before "start" 2666 invocation. 2667 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error 2668 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)). 2669 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead 2670 of -1). 2671 26722009-10-23 Ivan Maidanski <ivmai@mail.ru> 2673 2674 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread): 2675 Use GC_INNER for the function definition. 2676 * include/private/darwin_stop_world.h 2677 (GC_darwin_register_mach_handler_thread): Remove the prototype. 2678 * include/private/darwin_stop_world.h: Add copyright header. 2679 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER 2680 for the function prototype. 2681 * include/private/gc_priv.h (NDEBUG): Explicitly define if 2682 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers 2683 inclusion). 2684 26852009-10-22 Ivan Maidanski <ivmai@mail.ru> 2686 2687 * include/private/gcconfig.h: Move DebugBreak() workaround (for 2688 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion). 2689 26902009-10-22 Ivan Maidanski <ivmai@mail.ru> 2691 2692 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk, 2693 GC_freehblk): Use GC_INNER for the function definition. 2694 * alloc.c (GC_never_stop_func, GC_should_collect, 2695 GC_try_to_collect_inner, GC_collect_a_little_inner, 2696 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap, 2697 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Ditto. 2698 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph): 2699 Ditto. 2700 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init, 2701 GC_promote_black_lists, GC_unpromote_black_lists, 2702 GC_add_to_black_list_normal, GC_add_to_black_list_stack, 2703 GC_is_black_listed): Ditto. 2704 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks, 2705 GC_stop_init, GC_stop_world, GC_start_world): Ditto. 2706 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer, 2707 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc, 2708 GC_store_debug_info, GC_start_debugging, 2709 GC_debug_generic_malloc_inner, 2710 GC_debug_generic_malloc_inner_ignore_off_page, 2711 GC_debug_malloc_uncollectable, GC_debug_free_inner): Ditto. 2712 * dyn_load.c (GC_register_dynamic_libraries, 2713 GC_register_main_static_data, GC_init_dyld): Ditto. 2714 * finalize.c (GC_push_finalizer_structures, GC_finalize, 2715 GC_notify_or_invoke_finalizers, GC_print_finalization_stats): 2716 Ditto. 2717 * gcj_mlc.c (GC_core_gcj_malloc): Ditto. 2718 * headers.c (GC_find_header, GC_header_cache_miss, 2719 GC_scratch_alloc, GC_init_headers, GC_install_header, 2720 GC_install_counts, GC_remove_header, GC_remove_counts, 2721 GC_next_used_block, GC_prev_block): Ditto. 2722 * mach_dep.c (GC_with_callee_saves_pushed): Ditto. 2723 * malloc.c (GC_collect_or_expand, GC_alloc_large, 2724 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page, 2725 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Ditto. 2726 * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto. 2727 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks, 2728 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit, 2729 GC_clear_marks, GC_initiate_gc, GC_mark_some, 2730 GC_mark_stack_empty, GC_invalidate_mark_state, 2731 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker, 2732 GC_mark_init, GC_push_all, GC_push_conditional, 2733 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack): 2734 Ditto. 2735 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp, 2736 GC_exclude_static_roots_inner, GC_push_all_register_frames, 2737 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries, 2738 GC_push_roots): Ditto. 2739 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write): 2740 Ditto. 2741 * new_hblk.c (GC_build_fl, GC_new_hblk): Ditto. 2742 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry, 2743 GC_initialize_offsets): Ditto. 2744 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping, 2745 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize, 2746 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler, 2747 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32, 2748 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap, 2749 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init, 2750 GC_dirty_init, GC_read_dirty, GC_page_was_dirty, 2751 GC_page_was_ever_dirty, GC_remove_protection, 2752 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume, 2753 GC_save_callers, GC_print_callers): Ditto. 2754 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world, 2755 GC_start_world, GC_stop_init): Ditto. 2756 * pthread_support.c (GC_mark_thread_local_free_lists, 2757 GC_lookup_thread, GC_reset_finalizer_nested, 2758 GC_check_finalizer_nested, GC_segment_is_thread_stack, 2759 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel, 2760 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock, 2761 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder, 2762 GC_wait_marker, GC_notify_all_marker): Ditto. 2763 * reclaim.c (GC_print_all_errors, GC_block_empty, 2764 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim, 2765 GC_reclaim_all): Ditto. 2766 * thread_local_alloc.c (GC_init_thread_local, 2767 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto. 2768 * win32_threads.c (GC_reset_finalizer_nested, 2769 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world, 2770 GC_start_world, GC_push_all_stacks, GC_get_next_stack, 2771 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim, 2772 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker, 2773 GC_thr_init, GC_init_parallel, GC_lock, 2774 GC_mark_thread_local_free_lists): Ditto. 2775 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph, 2776 GC_traverse_back_graph): Use GC_INNER for the function prototype. 2777 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume): 2778 Ditto. 2779 * dbg_mlc.c (GC_default_print_heap_obj_proc): Ditto. 2780 * dyn_load.c (GC_parse_map_entry, GC_get_maps, 2781 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base, 2782 GC_get_next_stack): Ditto. 2783 * finalize.c (GC_reset_finalizer_nested, 2784 GC_check_finalizer_nested): Ditto. 2785 * gcj_mlc.c (GC_start_debugging): Ditto. 2786 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers, 2787 GC_has_other_debug_info, GC_store_debug_info): Ditto. 2788 * include/private/gc_hdrs.h (GC_header_cache_miss): Ditto. 2789 * include/private/gc_locks.h (GC_lock): Ditto. 2790 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow, 2791 GC_mark_from): Ditto. 2792 * include/private/pthread_support.h (GC_lookup_thread, 2793 GC_stop_init): Ditto. 2794 * include/private/thread_local_alloc.h (GC_init_thread_local, 2795 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto. 2796 * malloc.c (GC_extend_size_map, GC_text_mapping): Ditto. 2797 * mark.c (GC_page_was_ever_dirty): Ditto. 2798 * mark_rts.c (GC_mark_thread_local_free_lists): Ditto. 2799 * misc.c (GC_register_main_static_data, GC_init_win32, 2800 GC_setpagesize, GC_init_linux_data_start, 2801 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf, 2802 GC_do_blocking_inner): Ditto. 2803 * os_dep.c (GC_greatest_stack_base_below): Ditto. 2804 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init): 2805 Ditto. 2806 * include/private/gc_priv.h: Ditto (for most prototypes). 2807 * include/private/gc_priv.h (GC_INNER): Update the comment. 2808 * doc/README.macros (GC_DLL): Update. 2809 28102009-10-22 Ivan Maidanski <ivmai@mail.ru> 2811 2812 * alloc.c (GC_collection_in_progress): Move the prototype to 2813 gc_priv.h. 2814 * gc_dlopen.c (GC_collection_in_progress): Ditto. 2815 * pthread_support.c (GC_collection_in_progress): Ditto. 2816 * misc.c (GC_init_parallel): Ditto. 2817 * pthread_support.c (GC_init_parallel): Ditto. 2818 * win32_threads.c (GC_init_parallel): Ditto. 2819 * darwin_stop_world.c (GC_thr_init): Ditto. 2820 * misc.c (GC_thr_init): Ditto. 2821 * pthread_stop_world.c (GC_thr_init): Ditto. 2822 * pthread_support.c (GC_thr_init): Ditto. 2823 * blacklst.c (GC_clear_bl, GC_copy_bl, 2824 GC_number_stack_black_listed): Make STATIC. 2825 * dbg_mlc.c (GC_print_obj, GC_make_closure, 2826 GC_debug_invoke_finalizer): Ditto. 2827 * malloc.c (GC_alloc_large_and_clear): Ditto. 2828 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2, 2829 GC_push_marked4, GC_push_marked, GC_push_next_marked, 2830 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable): 2831 Ditto. 2832 * misc.c (GC_clear_stack_inner): Ditto. 2833 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Ditto. 2834 * darwin_stop_world.c (FindTopOfStack): Make static; define only 2835 if not DARWIN_DONT_PARSE_STACK. 2836 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL. 2837 * dyn_load.c (GC_repeat_read): Remove unused prototype. 2838 * include/private/gc_pmark.h (GC_find_start): Ditto. 2839 * misc.c (GC_read, GC_register_finalizer_no_order): Ditto. 2840 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if 2841 THREADS). 2842 * dyn_load.c (GC_register_main_static_data): Define only if 2843 DYNAMIC_LOADING. 2844 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail 2845 "return" statement. 2846 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies 2847 GC_PTHREADS). 2848 * include/gc.h: Fix a typo. 2849 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since 2850 the header is public. 2851 * include/gc_inline.h (GC_generic_malloc_many): New public 2852 function declaration. 2853 * mallocx.c (GC_generic_malloc_many): Make public. 2854 * include/private/gc_priv.h (GC_INNER): Use visibility attribute 2855 (if available). 2856 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER. 2857 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and 2858 MPROTECT_VDB. 2859 * os_dep.c: Don't include atomic_ops.h 2860 * win32_threads.c: Ditto. 2861 * include/private/gc_priv.h (GC_push_selected, GC_push_regs, 2862 GC_push_marked, GC_number_stack_black_listed, 2863 GC_alloc_large_and_clear, GC_reclaim_or_delete_all, 2864 GC_generic_malloc_many, GC_make_closure, 2865 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty): 2866 Remove the prototype. 2867 * mark.c (GC_page_was_ever_dirty): Add prototype (only if 2868 PROC_VDB). 2869 * include/private/gc_priv.h (GC_push_next_marked_dirty, 2870 GC_push_next_marked, GC_push_next_marked_uncollectable): Move 2871 the prototype to mark.c. 2872 * include/private/gc_priv.h (GC_is_static_root): Declare only if 2873 not THREADS. 2874 * include/private/gc_priv.h (GC_free_inner): Declare only if 2875 THREADS. 2876 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if 2877 THREADS and DBG_HDRS_ALL. 2878 * include/private/gc_priv.h (GC_markers): Declare GC_markers only 2879 if PARALLEL_MARK. 2880 * include/private/gc_priv.h (GC_register_main_static_data): Move 2881 the prototype to misc.c. 2882 * mach_dep.c (GC_push_regs): Make STATIC; define only along with 2883 HAVE_PUSH_REGS definition. 2884 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function 2885 definition with the ANSI C one. 2886 * mark.c (GC_started_thread_while_stopped): Declared only if not 2887 GNU C. 2888 * win32_threads.c (GC_started_thread_while_stopped): Don't define 2889 if GNU C. 2890 * mark.c (GC_mark_from): Avoid unbalanced brackets in 2891 #if-#else-#endif blocks. 2892 * mark_rts.c (GC_is_static_root): Define only if not THREADS. 2893 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD). 2894 * os_dep.c (GC_page_was_ever_dirty): Comment out the function 2895 except for PROC_VDB. 2896 * tests/test.c (main): Don't reference GC_print_obj, 2897 GC_make_closure, GC_debug_invoke_finalizer, 2898 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop). 2899 * thread_local_alloc.c: Don't include "gc_inline.h". 2900 * win32_threads.c (GC_write_fault_handler): Declare only if 2901 MPROTECT_VDB. 2902 29032009-10-21 Ivan Maidanski <ivmai@mail.ru> 2904 2905 * allchblk.c (DEBUG): Remove macro (since unused). 2906 * allchblk.c: Include private/gc_priv.h before other includes and 2907 definitions. 2908 * alloc.c: Ditto. 2909 * gc_dlopen.c: Ditto. 2910 * headers.c: Ditto. 2911 * mallocx.c: Ditto. 2912 * mark_rts.c: Ditto. 2913 * new_hblk.c: Ditto. 2914 * reclaim.c: Ditto. 2915 * mark.c: Include private/gc_pmark.h before other includes. 2916 * misc.c: Ditto. 2917 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h. 2918 * pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto. 2919 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since 2920 already defined in gc_config_macros.h). 2921 * dyn_load.c (GC_init_dyld): Remove parameter cast for 2922 _dyld_register_func_for_add_image() and 2923 _dyld_register_func_for_remove_image(); add the comment about 2924 possible warnings; add FIXME for the deprecated 2925 _dyld_bind_fully_image_containing_address(). 2926 * include/private/gc_priv.h: Include gc.h before the standard 2927 headers inclusion. 2928 * tests/test.c: Ditto. 2929 * include/private/gcconfig.h (DebugBreak): Update the comment. 2930 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'. 2931 * alloc.c: Reformat the code (partly adjust indentation). 2932 * backgraph.c: Ditto. 2933 * blacklst.c: Ditto. 2934 * checksums.c: Ditto. 2935 * finalize.c: Ditto. 2936 * gcj_mlc.c: Ditto. 2937 * mach_dep.c: Ditto. 2938 * mark_rts.c: Ditto. 2939 * obj_map.c: Ditto. 2940 * os_dep.c: Ditto. 2941 * ptr_chck.c: Ditto. 2942 * stubborn.c: Ditto. 2943 * thread_local_alloc.c: Ditto. 2944 * typd_mlc.c: Ditto. 2945 29462009-10-20 Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors) 2947 2948 * configure.ac (openbsd): Define GC_OPENBSD_THREADS. 2949 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS). 2950 * configure.ac: Add sparc-openbsd case. 2951 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS): 2952 Document. 2953 * tests/test.c (main): Handle OpenBSD case. 2954 * extra/threadlibs.c: Add the copyright header; expand all tabs to 2955 spaces; remove trailing spaces at EOLn. 2956 * include/private/pthread_stop_world.h: Ditto. 2957 * extra/threadlibs.c (main): Replace K&R-style function definition 2958 with the ANSI C one. 2959 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case. 2960 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD). 2961 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize; 2962 define it for OpenBSD. 2963 * include/gc_pthread_redirects.h (GC_pthread_sigmask, 2964 pthread_sigmask): Don't declare and redefine for OpenBSD. 2965 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386, 2966 amd64, powerpc). 2967 * mach_dep.c (NO_GETCONTEXT): Ditto. 2968 * include/private/pthread_stop_world.h (thread_stop_info): Don't 2969 define last_stop_count field if OpenBSD. 2970 * misc.c (GC_init_dyld): Add declaration (if NetBSD). 2971 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD. 2972 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD. 2973 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable 2974 (only if OpenBSD). 2975 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd, 2976 GC_skip_hole_openbsd): New static function (only if OpenBSD). 2977 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base, 2978 GC_register_data_segments): Define specially for OpenBSD case. 2979 * os_dep.c (GC_fault_handler_lock): Initialize to 2980 AO_TS_INITIALIZER (instead of 0). 2981 * pthread_support.c (GC_allocate_lock): Ditto. 2982 * pthread_stop_world.c (NSIG, GC_print_sig_mask, 2983 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count, 2984 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART, 2985 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler, 2986 GC_restart_handler): Don't define and use if OpenBSD. 2987 * pthread_stop_world.c (GC_suspend_all, GC_stop_world, 2988 GC_start_world): Handle OpenBSD case. 2989 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD. 2990 * pthread_support.c (pthread_sigmask): Don't undefine the macro and 2991 don't define the wrapper function if OpenBSD. 2992 * pthread_support.c (GC_thr_init): Handle OpenBSD case. 2993 * configure: Regenerate. 2994 * include/private/config.h.in: Ditto. 2995 29962009-10-20 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 2997 2998 * dyn_load.c: Move the inclusion of private/gc_priv.h below 2999 definition of a feature macro (_GNU_SOURCE). 3000 30012009-10-20 Ivan Maidanski <ivmai@mail.ru> 3002 3003 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses. 3004 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros 3005 (only if GC_I_HIDE_POINTERS). 3006 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_". 3007 * dbg_mlc.c (GC_get_back_ptr_info): Ditto. 3008 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize, 3009 GC_enqueue_all_finalizers): Ditto. 3010 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_". 3011 * finalize.c (GC_general_register_disappearing_link, 3012 GC_unregister_disappearing_link, GC_register_finalizer_inner, 3013 GC_finalize): Ditto. 3014 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Ditto. 3015 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead 3016 of I_HIDE_POINTERS. 3017 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto. 3018 * include/gc.h (_GC_H): Strip leading underscore. 3019 * include/gc_backptr.h (_GC_H): Ditto. 3020 * include/gc_gcj.h (_GC_H): Ditto. 3021 * include/gc_mark.h (_GC_H): Ditto. 3022 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Ditto. 3023 * include/javaxfc.h (_GC_H): Ditto. 3024 * include/new_gc_alloc.h (__GC_SPECIALIZE): Ditto. 3025 * include/private/dbg_mlc.h (_GC_H): Ditto. 3026 * include/private/gc_priv.h (_GC_H): Ditto. 3027 * include/gc_backptr.h: Reformat the code (adjust indentation, 3028 comment out function parameter names). 3029 * include/gc_gcj.h: Ditto. 3030 * include/gc_mark.h: Ditto. 3031 * include/gc_typed.h: Ditto. 3032 * include/javaxfc.h: Ditto. 3033 * include/private/dbg_mlc.h: Ditto. 3034 * include/private/gc_priv.h: Ditto. 3035 30362009-10-19 Ivan Maidanski <ivmai@mail.ru> 3037 3038 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>. 3039 30402009-10-19 Ivan Maidanski <ivmai@mail.ru> 3041 3042 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope 3043 variable definitions). 3044 * include/private/gc_priv.h (GC_EXTERN): Update the comment. 3045 * allchblk.c (GC_unmap_threshold): Define as GC_INNER. 3046 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects, 3047 GC_n_memory, GC_fail_count): Ditto. 3048 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Ditto. 3049 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Ditto. 3050 * mach_dep.c (GC_save_regs_ret_val): Ditto. 3051 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds, 3052 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size, 3053 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small, 3054 GC_mark_no, GC_markers): Ditto. 3055 * mark_rts.c (GC_root_size, GC_push_typed_structures): Ditto. 3056 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap, 3057 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly, 3058 GC_backtraces, GC_force_unmap_on_gcollect, 3059 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs, 3060 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Ditto. 3061 * os_dep.c (GC_page_size, GC_dont_query_stack_min, 3062 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots, 3063 GC_dirty_maintained, GC_fault_handler_lock): Ditto. 3064 * pthread_support.c (GC_allocate_ml, GC_lock_holder, 3065 GC_need_to_lock, GC_thr_initialized, GC_threads, 3066 GC_in_thread_creation, GC_collecting, GC_allocate_lock, 3067 GC_mark_lock_holder): Ditto. 3068 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors): 3069 Ditto. 3070 * win32_threads.c (GC_allocate_ml, GC_lock_holder, 3071 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Ditto. 3072 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC. 3073 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}. 3074 * os_dep.c (GC_init_win32): Reformat the comment. 3075 30762009-10-19 Ivan Maidanski <ivmai@mail.ru> 3077 3078 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist, 3079 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS 3080 case (since they are not defined inside GC at present). 3081 * include/private/gc_priv.h (GC_objects_are_marked): Remove the 3082 declaration (since made static). 3083 * mark.c (GC_objects_are_marked): Define as STATIC. 3084 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation): 3085 Ditto. 3086 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used 3087 to initialize GC_n_kinds). 3088 * win32_threads.c (start_mark_threads): Adjust the comment. 3089 30902009-10-19 Ivan Maidanski <ivmai@mail.ru> 3091 3092 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static 3093 function. 3094 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto. 3095 * mark_rts.c (add_roots_to_index): Ditto. 3096 30972009-10-19 Ivan Maidanski <ivmai@mail.ru> 3098 3099 * extra/gc.c: New file. 3100 * Makefile.am (EXTRA_DIST): Add "extra/gc.c". 3101 * configure: Regenerate. 3102 * Makefile.in: Ditto. 3103 31042009-10-19 Ivan Maidanski <ivmai@mail.ru> 3105 3106 * misc.c (GC_log): Remove the declaration; move the definition (to 3107 the place where it is used); make STATIC. 3108 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf() 3109 to print open log failure. 3110 * misc.c (GC_write): Don't abort on open log failure if the GC is 3111 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE). 3112 31132009-10-19 Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler) 3114 3115 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef. 3116 31172009-10-18 Ivan Maidanski <ivmai@mail.ru> 3118 3119 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move 3120 the variable declaration to gc_priv.h. 3121 * alloc.c (GC_bytes_found, GC_unmap_threshold, 3122 GC_force_unmap_on_gcollect): Ditto. 3123 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto. 3124 * finalize.c (GC_fail_count): Ditto. 3125 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 3126 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Ditto. 3127 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size, 3128 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack, 3129 GC_mark_stack_too_small, GC_mark_state): Ditto. 3130 * include/private/pthread_support.h (GC_threads, 3131 GC_thr_initialized, GC_in_thread_creation): Ditto. 3132 * mallocx.c (GC_bytes_found): Ditto. 3133 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto. 3134 * misc.c (GC_unmap_threshold): Ditto. 3135 * os_dep.c (GC_unmap_threshold): Ditto. 3136 * pthread_support.c (GC_markers): Ditto. 3137 * thread_local_alloc.c (GC_gcjobjfreelist, 3138 GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. 3139 * win32_threads.c (GC_fault_handler_lock, GC_write_cs, 3140 GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto. 3141 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as 3142 a tag for now); defined after "gcconfig.h" inclusion. 3143 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern" 3144 keyword for most global variables. 3145 * alloc.c (GC_copyright): Add the comment about the symbol 3146 visibility. 3147 * finalize.c (GC_fo_entries): Ditto. 3148 * include/private/gc_priv.h (GC_print_stats): Ditto. 3149 * misc.c (GC_quiet): Ditto. 3150 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable 3151 STATIC. 3152 * pthread_support.c (GC_threads): Add explicit zero initializer 3153 (to make the variable definition differ from the declaration). 3154 31552009-10-18 Ivan Maidanski <ivmai@mail.ru> 3156 3157 * backgraph.c (GC_quiet): Remove the declaration (not needed 3158 anymore since gc_priv.h is always included). 3159 * checksums.c (GC_quiet): Ditto. 3160 * gcj_mlc.c (GC_quiet): Ditto. 3161 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the 3162 comment. 3163 * include/private/gc_hdrs.h (GC_hdr_cache_hits, 3164 GC_hdr_cache_misses): Ditto. 3165 * mark.c (GC_first_nonempty): Make the volatile variable STATIC. 3166 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped): 3167 Ditto. 3168 * win32_threads.c (GC_please_stop, GC_max_thread_index, 3169 GC_mark_mutex_waitcnt): Ditto. 3170 31712009-10-18 Ivan Maidanski <ivmai@mail.ru> 3172 3173 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and 3174 'D') in the name. 3175 31762009-10-17 Ivan Maidanski <ivmai@mail.ru> 3177 3178 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen 3179 redirection is turned off; turn it on later when dlopen real 3180 symbol is no longer needed (according to the comment and the same 3181 as in dyn_load.c). 3182 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and 3183 REAL_DLFUNC, respectively (to have unique names since the 3184 definitions may differ from that of the similar ones in 3185 pthread_support.c). 3186 * mark.c (source): Undefine the macro when no longer needed. 3187 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to 3188 have the unique name across the project). 3189 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the 3190 comment. 3191 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Ditto. 3192 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no 3193 longer needed. 3194 31952009-10-17 Ivan Maidanski <ivmai@mail.ru> 3196 3197 * pthread_stop_world.c (pthread_sigmask): Undefine before using 3198 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment. 3199 * win32_threads.c (dlopen, _beginthread): Don't undefine (since 3200 neither redirected nor used here). 3201 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to 3202 "tm" for short; remove "tm_" prefix. 3203 * win32_threads.c (in_use, next): Don't define the macros; use 3204 tm.in_use and tm.next fields, respectively (to ease debugging). 3205 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have 3206 unique name across the project). 3207 32082009-10-17 Ivan Maidanski <ivmai@mail.ru> 3209 3210 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h 3211 inclusion. 3212 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is 3213 not included yet. 3214 * finalize.c (I_HIDE_POINTERS): Don't define. 3215 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto. 3216 * misc.c (I_HIDE_POINTERS): Ditto. 3217 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER, 3218 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined. 3219 * include/private/gc_pmark.h: Remove the comment about gc_priv.h 3220 inclusion order. 3221 32222009-10-17 Ivan Maidanski <ivmai@mail.ru> 3223 3224 * dyn_load.c: Include gc_priv.h before using configuration 3225 information (MACOS). 3226 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to 3227 GC_MUST_RESTORE_REDEFINED_DLOPEN. 3228 32292009-10-17 Ivan Maidanski <ivmai@mail.ru> 3230 3231 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis 3232 properly. 3233 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with 3234 "ifdef DEBUG_THREADS". 3235 * pthread_stop_world.c: Ditto. 3236 * pthread_support.c: Ditto. 3237 * include/gc_inline.h: Guard with GC_INLINE_H. 3238 32392009-10-17 Ivan Maidanski <ivmai@mail.ru> 3240 3241 * alloc.c (GC_copyright): Define as const. 3242 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC" 3243 (since the name starts with "GC_" prefix). 3244 * dbg_mlc.c (GC_describe_type_fns): Ditto. 3245 * dyn_load.c (GC_FirstDLOpenedLinkMap, 3246 GC_register_dynlib_callback, GC_dyld_sections, 3247 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove): 3248 Ditto. 3249 * malloc.c (GC_libpthread_start, GC_libpthread_end, 3250 GC_libld_start, GC_libld_end): Ditto. 3251 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index): 3252 Ditto. 3253 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty, 3254 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify, 3255 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus, 3256 GC_forward_exception): Ditto. 3257 * pthread_support.c (GC_syms_initialized): Ditto. 3258 * typd_mlc.c (GC_push_typed_structures_proc): Ditto. 3259 * win32_threads.c (GC_win32_dll_threads, 3260 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min, 3261 GC_waitForSingleObjectInfinite): Ditto. 3262 * darwin_stop_world.c (GC_use_mach_handler_thread, 3263 GC_use_mach_handler_thread, GC_mach_threads_count): Replace 3264 "static" with "STATIC" and add zero initializer. 3265 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state, 3266 GC_sigbus_count): Ditto. 3267 * headers.c (free_hdr): Replace "static" with GC_INLINE. 3268 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res. 3269 * os_dep.c (memory): Rename static variable to ecos_gc_memory. 3270 * os_dep.c (async_set_pht_entry_from_index): Make static (for 3271 MPROTECT_VDB case). 3272 * pthread_support.c (GC_real_pthread_create, 3273 GC_real_pthread_sigmask, GC_real_pthread_join, 3274 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro 3275 for static GC_real_XXX symbols. 3276 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix. 3277 32782009-10-17 Ivan Maidanski <ivmai@mail.ru> 3279 3280 * alloc.c (GC_never_stop_func, GC_check_fl_marks, 3281 GC_finish_collection): Reformat the code (make opening bracket 3282 style uniform across the file). 3283 * allchblk.c (GC_allochblk): Ditto. 3284 * backgraph.c (add_edge): Ditto. 3285 * dbg_mlc.c (GC_marked_for_finalization): Ditto. 3286 * dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto. 3287 * finalize.c (GC_null_finalize_mark_proc): Ditto. 3288 * gc_dlopen.c (GC_dlopen): Ditto. 3289 * mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4): 3290 Ditto. 3291 * misc.c (looping_handler, GC_call_with_gc_active, 3292 GC_do_blocking_inner, GC_do_blocking): Ditto. 3293 * os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto. 3294 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, 3295 GC_pthread_join, GC_pthread_detach, GC_check_tls, 3296 GC_do_blocking_inner, GC_call_with_gc_active): Ditto. 3297 * reclaim.c (GC_reclaim_clear, GC_reclaim_block, 3298 GC_print_free_list): Ditto. 3299 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty, 3300 GC_remove_protection): Reformat the code (wrap long lines). 3301 33022009-10-16 Ivan Maidanski <ivmai@mail.ru> 3303 3304 * alloc.c (GC_finish_collection): Replace getenv() with GETENV(). 3305 * dyn_load.c (GC_init_dyld): Ditto. 3306 * os_dep.c (GC_print_callers): Ditto. 3307 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name() 3308 result (since it's always of "struct mach_header" type). 3309 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and 3310 GC_dyld_image_remove (to always have the first argument of 3311 "struct mach_header" pointer type). 3312 33132009-10-16 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3314 3315 * configure.ac: Add threads support for OpenBSD case (threads may 3316 not work correctly for it). 3317 * configure: Regenerate. 3318 33192009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3320 3321 * acinclude.m4: Rename to m4/gc_set_version.m4. 3322 * aclocal.m4: Regenerate. 3323 * configure: Ditto. 3324 * Makefile.in: Ditto. 3325 * m4/libtool.m4: Delete the file. 3326 * m4/lt~obsolete.m4: Ditto. 3327 * m4/ltoptions.m4: Ditto. 3328 * m4/ltsugar.m4: Ditto. 3329 * m4/ltversion.m4: Ditto. 3330 33312009-10-15 Ivan Maidanski <ivmai@mail.ru> 3332 3333 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for 3334 x86mingw32ce toolchain to workaround the incorrect DebugBreak() 3335 declaration in winbase.h (the workaround would turn into a no-op 3336 when DebugBreak() will be defined as a macro in the toolchain). 3337 33382009-10-15 Ivan Maidanski <ivmai@mail.ru> 3339 3340 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for 3341 x86mingw32ce toolchain). 3342 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC 3343 toolchain (or if already defined). 3344 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always 3345 defined for WinCE or if NO_GETENV is defined). 3346 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of 3347 NO_GETENV one. 3348 33492009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3350 3351 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]). 3352 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4". 3353 * libtool.m4: Remove. 3354 * aclocal.m4: Regenerate. 3355 * configure: Ditto. 3356 * Makefile.in: Ditto. 3357 * m4/libtool.m4: New file (generated). 3358 * m4/lt~obsolete.m4: Ditto. 3359 * m4/ltoptions.m4: Ditto. 3360 * m4/ltsugar.m4: Ditto. 3361 * m4/ltversion.m4: Ditto. 3362 33632009-10-10 Ivan Maidanski <ivmai@mail.ru> 3364 3365 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro; 3366 prefix GC_CreateThread and GC_ExitThread with '_' if defined. 3367 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document. 3368 33692009-10-09 Ivan Maidanski <ivmai@mail.ru> 3370 3371 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the 3372 comments; don't use "default" stop_func on a retry if 3373 GC_dont_expand. 3374 * alloc.c (GC_collect_or_expand): Reformat the code (make the 3375 indentation style uniform across the function). 3376 * alloc.c (GC_allocobj): Pass "retry" argument to 3377 GC_collect_or_expand(). 3378 * malloc.c (GC_alloc_large): Ditto. 3379 * include/private/gc_priv.h (GC_collect_or_expand): Move the 3380 declaration to malloc.c; add "retry" argument. 3381 33822009-10-09 Ivan Maidanski <ivmai@mail.ru> 3383 3384 * alloc.c (GC_start_call_back): Move the variable definition from 3385 misc.c. 3386 * include/private/gc_priv.h (GC_start_call_back): Remove the 3387 declaration. 3388 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0. 3389 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the 3390 beginning of the function. 3391 * include/gc.h (GC_try_to_collect): Refine the comment about 3392 stop_func. 3393 33942009-10-08 Ivan Maidanski <ivmai@mail.ru> 3395 3396 * alloc.c (GC_default_stop_func, GC_try_to_collect_general, 3397 GC_gcollect): Add the comment. 3398 * alloc.c (GC_try_to_collect_general): Move the assertion on 3399 stop_func != 0 to GC_try_to_collect(). 3400 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use 3401 GC_default_stop_func instead (holding the lock). 3402 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of 3403 GC_default_stop_func (to prevent data races). 3404 34052009-10-08 Ivan Maidanski <ivmai@mail.ru> 3406 3407 * Makefile.direct: Move "define arguments" documentation to 3408 doc/README.macros; add reference to doc/README.macros. 3409 * Makefile.dj: Change the documentation reference to 3410 doc/README.macros. 3411 * README.QUICK: Ditto. 3412 * configure.ac: Ditto. 3413 * allchblk.c: Remove unnecessary "-D" from the comment. 3414 * doc/README.macros: Ditto. 3415 * README.environment: Ditto. 3416 * include/gc.h: Ditto. 3417 * include/gc_inline.h: Ditto. 3418 * include/private/gcconfig.h: Ditto. 3419 * README.QUICK: Fix a typo. 3420 * README.QUICK: Expand all tabs to spaces. 3421 * configure: Regenerate. 3422 * include/private/config.h.in: Ditto. 3423 34242009-10-07 Ivan Maidanski <ivmai@mail.ru> 3425 3426 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for 3427 CreateFile(); don't immediately flush every write if very verbose. 3428 34292009-10-07 Ivan Maidanski <ivmai@mail.ru> 3430 3431 * doc/README.win32: Replace ".exe.log" to ".gc.log". 3432 * doc/README.win64: Ditto. 3433 * doc/README.win64: Fix a typo. 3434 * misc.c (GC_CreateLogFile): Strip executable file extension for 3435 the log file; use ".gc.log" extension (instead of ".log"). 3436 34372009-10-07 Ivan Maidanski <ivmai@mail.ru> 3438 3439 * include/gc_config_macros.h: Avoid the redefinition of 3440 GC_xxx_THREADS macros. 3441 34422009-10-06 Ivan Maidanski <ivmai@mail.ru> 3443 3444 * alloc.c (GC_try_to_collect_general): Change the type of "result" 3445 local variable to GC_bool. 3446 34472009-10-06 Ivan Maidanski <ivmai@mail.ru> 3448 3449 * include/gc_config_macros.h: Use old behavior for FreeBSD and 3450 NetBSD platform detection code (check that other GC_xxx_THREADS 3451 are undefined); add FIXME. 3452 34532009-10-06 Ivan Maidanski <ivmai@mail.ru> 3454 3455 * include/gc_config_macros.h: Rearrange the platform detection 3456 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define 3457 GC_THREADS first if GC_XXX_THREADS already set; define proper 3458 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single 3459 place; define _REENTRANT if posix threads except for Win32). 3460 * include/gc_config_macros.h: Reformat the code (make the 3461 indentation style uniform across the file). 3462 34632009-10-06 Ivan Maidanski <ivmai@mail.ru> 3464 3465 * alloc.c (GC_try_to_collect_general): New function (move the code 3466 from GC_try_to_collect, pass force_unmap argument). 3467 * alloc.c (GC_try_to_collect, GC_gcollect): Call 3468 GC_try_to_collect_general(). 3469 * alloc.c (GC_gcollect_and_unmap): New public function. 3470 * include/gc.h (GC_gcollect_and_unmap): New function declaration. 3471 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on 3472 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect() 3473 and GC_gcollect()). 3474 34752009-10-06 Ivan Maidanski <ivmai@mail.ru> 3476 3477 * include/gc.h (GC_allow_register_threads, GC_register_my_thread, 3478 GC_unregister_my_thread, GC_malloc_many): Refine the comment. 3479 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally 3480 (that is, don't depend on GC_THREADS macro). 3481 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along 3482 with a check for GC_PTHREADS (since the former implies the 3483 latter). 3484 34852009-10-06 Ivan Maidanski <ivmai@mail.ru> 3486 3487 * include/gc.h: Reformat the code (make the indentation style 3488 uniform across the file). 3489 * include/gc.h (GC_SOLARIS_THREADS): Don't check for. 3490 * include/gc.h (GC_MIN, GC_MAX): Don't define. 3491 * mallocx.c (GC_malloc_many): Add comment to #endif. 3492 34932009-10-02 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3494 3495 * configure.ac: Drop the subdir-objects Automake option, since 3496 it's incompatible with picking source files from libatomic_ops. 3497 * Makefile.in: Regenerate. 3498 34992009-10-01 Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler) 3500 3501 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add 3502 "extern" keyword to a global variable declaration (some compilers 3503 require it). 3504 * alloc.c (GC_bytes_found, GC_unmap_threshold, 3505 GC_force_unmap_on_gcollect): Ditto. 3506 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto. 3507 * finalize.c (GC_fail_count): Ditto. 3508 * include/private/gc_hdrs.h (GC_hdr_cache_hits, 3509 GC_hdr_cache_misses): Ditto. 3510 * mallocx.c (GC_bytes_found): Ditto. 3511 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto. 3512 * misc.c (GC_unmap_threshold): Ditto. 3513 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Ditto. 3514 * pthread_support.c (GC_markers): Ditto. 3515 * thread_local_alloc.c (GC_gcjobjfreelist, 3516 GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. 3517 * win32_threads.c (GC_fault_handler_lock, GC_write_cs, 3518 GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto. 3519 35202009-10-01 Ivan Maidanski <ivmai@mail.ru> 3521 3522 * Makefile.in: Regenerate (by autoreconf -vif, deleting libtool.m4 3523 first and using libtool-2.2, automake-1.10.2, autoconf-2.64). 3524 * aclocal.m4: Ditto. 3525 * config.guess: Ditto. 3526 * config.sub: Ditto. 3527 * configure: Ditto. 3528 * depcomp: Ditto. 3529 * install-sh: Ditto. 3530 * ltmain.sh: Ditto. 3531 * missing: Ditto. 3532 * mkinstalldirs: Ditto. 3533 * include/private/config.h.in: Ditto. 3534 35352009-10-01 Ivan Maidanski <ivmai@mail.ru> 3536 3537 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to 3538 suppress misleading GC "Out of Memory!" warning printed on every 3539 GC_MALLOC(LONG_MAX) call. 3540 * tests/huge_test.c: Include "gc.h" instead of <gc.h>. 3541 * tests/huge_test.c (main): Replace K&R-style function definition 3542 with the ANSI C one. 3543 * tests/huge_test.c: Expand all tabs to spaces. 3544 35452009-10-01 Ivan Maidanski <ivmai@mail.ru> 3546 3547 * dyn_load.c (GC_register_dynamic_libraries): Always use 3548 lpMaximumApplicationAddress value for WinCE (even for old 3549 versions). 3550 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h. 3551 * os_dep.c (GC_dont_query_stack_min): New global variable (only if 3552 WinCE and THREADS). 3553 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress 3554 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set 3555 GC_dont_query_stack_min for older WinCE (prior to version 5). 3556 * win32_threads.c (GC_dont_query_stack_min): Declare. 3557 * win32_threads.c (GC_get_stack_min): Rename the macro to 3558 GC_wince_evaluate_stack_min for WinCE; update the comment. 3559 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use 3560 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for 3561 WinCE and don't update thread's last_stack_min value (only if 3562 GC_dont_query_stack_min). 3563 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if 3564 GC_dont_query_stack_min (since the evaluated stack_min value may 3565 be incorrect if the stack is bigger than 64 KiB). 3566 35672009-10-01 Ivan Maidanski <ivmai@mail.ru> 3568 3569 * gc_dlopen.c (GC_dlopen): Add function redirector (only if 3570 GC_USE_LD_WRAP). 3571 * include/gc.h: Include "gc_pthread_redirects.h" even if 3572 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. 3573 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't 3574 define and check for (since included only from gc.h). 3575 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if 3576 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS. 3577 * include/gc_pthread_redirects.h: Include signal.h only to get 3578 sigset_t definition. 3579 35802009-09-30 Ivan Maidanski <ivmai@mail.ru> 3581 3582 * configure: Regenerate (by autoreconf -vif, deleting libtool.m4 3583 first). 3584 * Makefile.in: Ditto. 3585 * aclocal.m4: Ditto. 3586 * include/private/config.h.in: Ditto. 3587 35882009-09-30 Ivan Maidanski <ivmai@mail.ru> 3589 3590 * Makefile.direct: Remove trailing spaces at EOLn. 3591 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE. 3592 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless 3593 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE). 3594 * os_dep.c (GC_sysinfo): Remove explicit global variable 3595 initialization to "{0}" (revert back the previous change) since it 3596 might produce a warning. 3597 35982009-09-30 Ivan Maidanski <ivmai@mail.ru> 3599 3600 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from 3601 gc_priv.h. 3602 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition 3603 from misc.c; define as STATIC. 3604 * include/private/gc_priv.h (GC_large_alloc_warn_interval, 3605 GC_large_alloc_warn_suppressed): Remove declaration. 3606 * alloc.c (GC_bytes_found): Add "defined in" comment. 3607 * mallocx.c (GC_bytes_found): Ditto. 3608 * misc.c (GC_unmap_threshold): Ditto. 3609 * os_dep.c (GC_old_allocator): Ditto. 3610 * pthread_support.c (GC_markers): Ditto. 3611 * thread_local_alloc.c (GC_gcjobjfreelist, 3612 GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. 3613 * win32_threads.c (GC_markers): Ditto. 3614 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to 3615 be distinctive from a variable declaration). 3616 * backgraph.c (GC_max_height, GC_deepest_obj): Ditto. 3617 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl, 3618 GC_old_stack_bl, GC_incomplete_stack_bl): Ditto. 3619 * checksums.c (GC_faulted, GC_n_dirty_errors, 3620 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean, 3621 GC_n_dirty, GC_bytes_in_used_blocks): Ditto. 3622 * dbg_mlc.c (GC_smashed): Ditto. 3623 * finalize.c (GC_old_dl_entries): Ditto. 3624 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist, 3625 GC_gcjdebugobjfreelist): Ditto. 3626 * mach_dep.c (GC_save_regs_ret_val): Ditto. 3627 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit, 3628 GC_mark_stack_top): Ditto. 3629 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset): 3630 Ditto. 3631 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo, 3632 GC_old_segv_handler, GC_old_bus_handler, 3633 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si, 3634 GC_proc_buf, GC_proc_fd, GC_vd_base): Ditto. 3635 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Ditto. 3636 * reclaim.c (GC_leaked): Ditto. 3637 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors, 3638 GC_typed_mark_proc_index, GC_array_mark_proc_index, 3639 GC_eobjfreelist, GC_arobjfreelist): Ditto. 3640 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv, 3641 GC_marker_Id): Ditto. 3642 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC. 3643 * gcj_mlc.c (GC_gcjdebugobjfreelist): Ditto. 3644 * os_dep.c (GC_vd_base): Ditto. 3645 * pthread_support.c (GC_mark_threads): Ditto. 3646 * reclaim.c (GC_leaked): Ditto. 3647 * typd_mlc.c (GC_bm_table): Ditto. 3648 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to 3649 that of definition; add "defined in" comment. 3650 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for 3651 GC_save_regs_ret_val. 3652 * misc.c (GC_check_heap, GC_print_all_smashed, 3653 GC_start_call_back): Remove unnecessary cast (of 0). 3654 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro. 3655 * misc.c (GC_large_alloc_warn_interval): Initialize to 3656 GC_LARGE_ALLOC_WARN_INTERVAL value. 3657 * misc.c (GC_tmp): Change to "static". 3658 * os_dep.c (GC_setpagesize): Reformat the code (collapse multiple 3659 function definitions). 3660 * os_dep.c (GC_mprotect_state): Define as static. 3661 * pthread_support.c (dummy_thread_local): Prefix with "GC_". 3662 * win32_threads.c (WinMain): Remove FIXME for WinCE. 3663 36642009-09-30 Ivan Maidanski <ivmai@mail.ru> (really Hans Boehm) 3665 3666 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages. 3667 36682009-09-30 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3669 3670 * configure.ac: Rewrite the tests for external or internal 3671 libatomic_ops. 3672 * configure.ac: In particular, drop the symbolic links. Add option 3673 --with-libatomic-ops for forced selection. 3674 * Makefile.am: Adjust the path of source files from libatomic_ops 3675 to not use the links. 3676 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will 3677 be empty if we use the bundled AO sources. 3678 * configure: Regenerate. 3679 * Makefile.in: Ditto. 3680 36812009-09-29 Ivan Maidanski <ivmai@mail.ru> 3682 3683 * Makefile.am: Strip version suffix for libatomic_ops directory. 3684 * build_atomic_ops.sh: Ditto. 3685 * build_atomic_ops.sh.cygwin: Ditto. 3686 * configure_atomic_ops.sh: Ditto. 3687 * Makefile.direct: Remove AO_VERSION definition; strip version 3688 suffix for libatomic_ops directory. 3689 * NT_STATIC_THREADS_MAKEFILE: Ditto. 3690 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 3691 * NT_X64_THREADS_MAKEFILE: Ditto. 3692 * gc.mak: Ditto. 3693 * Makefile.in: Regenerate. 3694 36952009-09-29 Ivan Maidanski <ivmai@mail.ru> 3696 3697 * libatomic_ops: Rename from "libatomic_ops-1.2". 3698 36992009-09-28 Ivan Maidanski <ivmai@mail.ru> 3700 3701 * alloc.c (GC_version): Add "const" keyword. 3702 * alloc.c (GC_get_version): New public function. 3703 * include/gc.h (GC_get_version): New function declaration; update 3704 the comment for the GC version. 3705 37062009-09-27 Ivan Maidanski <ivmai@mail.ru> 3707 3708 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 3709 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern" 3710 (for the global variable declaration) again. 3711 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size, 3712 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack, 3713 GC_mark_stack_too_small, GC_mark_state): Ditto. 3714 * include/private/gcconfig.h (GC_register_stackbottom): Ditto. 3715 * include/private/pthread_support.h (GC_threads, 3716 GC_thr_initialized, GC_in_thread_creation): Ditto. 3717 * include/private/gc_priv.h: Ditto (for all global variables). 3718 37192009-09-27 Ivan Maidanski <ivmai@mail.ru> 3720 3721 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H. 3722 37232009-09-27 Ivan Maidanski <ivmai@mail.ru> 3724 3725 * allchblk.c (GC_hblkfreelist): Define as STATIC. 3726 * blacklst.c (GC_total_stack_black_listed): Ditto. 3727 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark, 3728 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove 3729 declaration. 3730 * mark_rts.c (GC_stopped_mark): Add declaration (only if 3731 THREAD_LOCAL_ALLOC). 3732 * allchblk.c (GC_fail_count): Move the declaration out of 3733 GC_allochblk_nth(); remove "extern". 3734 * alloc.c (IF_THREADS): Remove unused macro. 3735 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC. 3736 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if 3737 THREAD_LOCAL_ALLOC. 3738 * alloc.c (GC_bytes_found, GC_collection_in_progress, 3739 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect): 3740 Remove K&R-style "extern" for the declaration. 3741 * dbg_mlc.c (GC_free_inner): Ditto. 3742 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base, 3743 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Ditto. 3744 * finalize.c (GC_fail_count): Ditto. 3745 * include/private/gc_hdrs.h (GC_hdr_cache_hits, 3746 GC_hdr_cache_misses): Ditto. 3747 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder, 3748 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock): 3749 Ditto. 3750 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs, 3751 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top, 3752 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Ditto. 3753 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds, 3754 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory, 3755 GC_page_size, GC_sysinfo, GC_black_list_spacing, 3756 GC_objects_are_marked, GC_incremental, GC_dirty_maintained, 3757 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval, 3758 GC_large_alloc_warn_suppressed, GC_blocked_sp, 3759 GC_activation_frame, GC_push_other_roots, 3760 GC_push_finalizer_structures, GC_push_thread_structures, 3761 GC_push_typed_structures, GC_start_call_back, GC_is_initialized, 3762 GC_check_heap, GC_print_all_smashed, GC_print_all_errors, 3763 GC_print_heap_obj, GC_have_errors, GC_print_stats, 3764 GC_dump_regularly, GC_backtraces, GC_print_back_height, 3765 GC_debug_generic_malloc_inner, 3766 GC_debug_generic_malloc_inner_ignore_off_page, 3767 GC_fl_builder_count, GC_mark_no, GC_help_marker, 3768 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Ditto. 3769 * include/private/gcconfig.h (GC_SysVGetDataStart, 3770 GC_FreeBSDGetDataStart, GC_register_stackbottom, 3771 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Ditto. 3772 * include/private/pthread_support.h (GC_threads, 3773 GC_thr_initialized, GC_in_thread_creation): Ditto. 3774 * malloc.c (GC_text_mapping): Ditto. 3775 * mallocx.c (GC_bytes_found): Ditto. 3776 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Ditto. 3777 * mark_rts.c (GC_save_regs_ret_val): Ditto. 3778 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32, 3779 GC_setpagesize, GC_init_linux_data_start, 3780 GC_set_and_save_fault_handler, GC_unmap_threshold): Ditto. 3781 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks, 3782 GC_darwin_register_mach_handler_thread): Ditto. 3783 * pthread_support.c (GC_markers, GC_collection_in_progress): 3784 Ditto. 3785 * tests/test.c (GC_amiga_free_all_mem): Ditto. 3786 * thread_local_alloc.c (GC_gcjobjfreelist, 3787 GC_gcj_malloc_initialized, GC_gcj_kind): Ditto. 3788 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init, 3789 GC_fault_handler_lock, GC_write_cs, GC_markers): Ditto. 3790 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld): 3791 Move the declaration out of GC_init(); remove "extern". 3792 * os_dep.c (GC_abort): Add the comment; add workaround to suppress 3793 compiler "unreachable code" warnings for ABORT callers (where 3794 ABORT is followed by a dummy return statement). 3795 * os_dep.c (GC_old_allocator): Move the declaration out of 3796 GC_default_push_other_roots(); remove "extern". 3797 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume): 3798 Move the declaration out of GC_stop_world() and GC_start_world() 3799 (only if MPROTECT_VDB); remove "extern". 3800 38012009-09-27 Ivan Maidanski <ivmai@mail.ru> 3802 3803 * win32_threads.c (GC_get_stack_min, GC_push_stack_for, 3804 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for 3805 WinCE emulation and for custom WinCE 6 devices); add the comment. 3806 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead 3807 of DWORD. 3808 * win32_threads.c (GC_get_next_stack): Don't use and maintain the 3809 latest known stack_min value for WinCE (if GC_get_stack_min is 3810 defined as a macro); update the comments. 3811 * win32_threads.c (GC_wnt): Don't declare for WinCE. 3812 38132009-09-26 Ivan Maidanski <ivmai@mail.ru> 3814 3815 * Makefile.direct: Document EMPTY_GETENV_RESULTS. 3816 * gcj_mlc.c (GC_clear_stack): Remove declaration. 3817 * malloc.c (GC_clear_stack): Ditto. 3818 * mallocx.c (GC_clear_stack): Ditto. 3819 * typd_mlc.c (GC_clear_stack): Ditto. 3820 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to 3821 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively; 3822 remove "lb" unnecessary cast to word. 3823 * include/private/gc_priv.h (GC_clear_stack): Add declaration. 3824 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP): 3825 Move common declaration from typd_mlc.c and malloc.c; remove 3826 unnecessary result and "lb" parameter casts. 3827 * include/private/thread_local_alloc.h: Guard against duplicate 3828 header file inclusion. 3829 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for 3830 the case when USE_MMAP is not defined. 3831 * pthread_support.c (GC_is_thread_tsd_valid): New internal 3832 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the 3833 code from thread-local GC_malloc(); add FIXME for the condition. 3834 * win32_threads.c (GC_is_thread_tsd_valid): Ditto. 3835 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to 3836 match that of its definition). 3837 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for 3838 GC_gcjobjfreelist. 3839 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner): 3840 Remove unused declaration; don't include pthread.h. 3841 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration 3842 (only if GC_ASSERTIONS). 3843 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid() 3844 instead of GC_lookup_thread(). 3845 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC. 3846 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have 3847 id different from that in os_dep.c). 3848 38492009-09-26 Ivan Maidanski <ivmai@mail.ru> 3850 3851 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static" 3852 with GC_INLINE. 3853 * include/private/gc_priv.h (fixed_getenv): Ditto. 3854 * alloc.c (GC_max, GC_min): Replace "static INLINE" with 3855 GC_INLINE. 3856 * mark_rts.c (rt_hash): Ditto. 3857 * win32_threads.c (GC_get_max_thread_index): Ditto. 3858 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include 3859 "static"; define for Sun CC; define for VC++ (and other 3860 compilers). 3861 * pthread_support.c: Don't define __inline__ for non-GNU compilers 3862 (not needed anymore). 3863 38642009-09-26 Ivan Maidanski <ivmai@mail.ru> 3865 3866 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak). 3867 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE. 3868 * Makefile.am: Ditto. 3869 * Makefile.dj: Ditto. 3870 * Makefile.direct: Ditto. 3871 * doc/README.win32: Add reference to gc.mak. 3872 * NT_X64_THREADS_MAKEFILE: Ditto. 3873 38742009-09-26 Ivan Maidanski <ivmai@mail.ru> 3875 3876 * Makefile.in: Regenerate (by autoreconf -vif). 3877 * aclocal.m4: Ditto. 3878 * compile: Ditto. 3879 * config.guess: Ditto. 3880 * config.sub: Ditto. 3881 * configure: Ditto. 3882 * depcomp: Ditto. 3883 * install-sh: Ditto. 3884 * ltmain.sh: Ditto. 3885 * missing: Ditto. 3886 * mkinstalldirs: Ditto. 3887 * include/private/config.h.in: New file (generated). 3888 * Makefile.direct: Remove references to acinclude.m4, libtool.m4. 3889 38902009-09-26 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3891 3892 * autogen.sh: Update. 3893 38942009-09-26 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3895 3896 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST. 3897 * acinclude.m4: Fix underquoting of GC_SET_VERSION. 3898 * README.QUICK: Update information for Makefile. 3899 * Makefile.am: Do not distribute the substituted bdw-gc.pc. 3900 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS. 3901 * tests/tests.am: Use it here to conditionally enable tracetest 3902 when possible. 3903 39042009-09-26 Ivan Maidanski <ivmai@mail.ru> 3905 3906 * dyn_load.c (GC_wnt): Update the comment. 3907 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for 3908 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new 3909 macro); call GC_is_heap_base() only if check for Type succeeded. 3910 39112009-09-26 Ivan Maidanski <ivmai@mail.ru> 3912 3913 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING; 3914 update the comment. 3915 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration. 3916 39172009-09-26 Ivan Maidanski <ivmai@mail.ru> 3918 3919 * alloc.c: Expand all tabs to spaces; remove trailing spaces at 3920 EOLn; remove multiple trailing blank lines. 3921 * misc.c: Ditto. 3922 * os_dep.c: Ditto. 3923 * pthread_support.c: Ditto. 3924 * include/private/gc_priv.h: Ditto. 3925 * include/private/gcconfig.h: Ditto. 3926 39272009-09-25 Hans Boehm <Hans.Boehm@hp.com> 3928 3929 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros. 3930 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL, 3931 ASSERT_CANCEL_DISABLED): New macros. 3932 * alloc.c (GC_maybe_gc): Assert cancellation disabled. 3933 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand): 3934 Disable cancellation. 3935 (GC_add_to_our_memory): Check for overflow. 3936 * misc.c (GC_cancel_disable_count): declare. 3937 (GC_init, GC_write): Disable cancellation. 3938 (GC_init): Remove redundant GC_is_initialized test. 3939 * os_dep.c (GC_repeat_read): Assert cancellation disabled. 3940 (GC_get_stack_base): Disable cancellation. 3941 * pthread_stop_world.c (GC_suspend_handler_inner): Disable 3942 cancellation. 3943 * pthread_support.c (GC_mark_thread): Permanently disable 3944 cancellation. 3945 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker): 3946 Assert cancellation disabled. 3947 (fork handling): Disable cancellation, fix comment. 3948 (GC_pthread_create): Disable cancellation. 3949 (GC_unregister_my_thread): Disable cancellation. 3950 * Makefile.direct: Document NO_CANCEL_SAFE. 3951 39522009-09-25 Ivan Maidanski <ivmai@mail.ru> 3953 3954 * Makefile: Remove outdated file (Makefile.direct should be used 3955 instead). 3956 39572009-09-25 Ivan Maidanski <ivmai@mail.ru> 3958 3959 * win32_threads.c: Reformat the code (make indentation and 3960 opening bracket style uniform across the file; wrap long code and 3961 comment lines). 3962 39632009-09-25 Ivan Maidanski <ivmai@mail.ru> 3964 3965 * include/gc.h (GC_use_DllMain): Refine (and reformat) the 3966 comment. 3967 39682009-09-25 Ivan Maidanski <ivmai@mail.ru> (really mostly Petter Urkedal) 3969 3970 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and 3971 EMPTY_GETENV_RESULTS. 3972 * configure.ac: Fix a typo. 3973 * Makefile.am: Ditto. 3974 39752009-09-25 Ivan Maidanski <ivmai@mail.ru> 3976 3977 * checksums.c (GC_checksum, GC_update_check_page): Remove 3978 "register" keyword in local variable declarations (for the code 3979 used only for debugging or which is not time-critical). 3980 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info, 3981 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj, 3982 GC_print_smashed_obj, GC_debug_end_stubborn_change, 3983 GC_debug_invoke_finalizer): Ditto. 3984 * dyn_load.c (GC_register_dynamic_libraries): Ditto. 3985 * mallocx.c (GC_realloc): Ditto. 3986 * mark_rts.c (GC_print_static_roots, GC_is_static_root, 3987 GC_clear_roots): Ditto. 3988 * misc.c (GC_write): Ditto. 3989 * os_dep.c (GC_print_callers): Ditto. 3990 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local 3991 variable to "j" for the nested loop (just not to hide the similar 3992 variable in the outer one). 3993 * mark_rts.c (GC_print_static_roots): Output an error message 3994 using GC_err_printf() (instead of GC_printf()). 3995 39962009-09-25 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 3997 3998 * configure.ac: Move include flag from ${INCLUDE} ... 3999 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory. 4000 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]). 4001 * configure.ac: Add documentation to all AC_DEFINE either directly 4002 or using AH_TEMPLATE. 4003 40042009-09-24 Ivan Maidanski <ivmai@mail.ru> 4005 4006 * win32_threads.c (GC_waitForSingleObjectInfinite): New static 4007 function (only if GC_WINMAIN_REDIRECT). 4008 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite() 4009 thru GC_do_blocking() instead of calling WaitForSingleObject() 4010 directly. 4011 40122009-09-24 Ivan Maidanski <ivmai@mail.ru> 4013 4014 * pthread_support.c (start_mark_threads): Refine printed message. 4015 * win32_threads.c (GC_thr_init): Ditto. 4016 * win32_threads.c: Reformat some code pieces (wrap too long code 4017 lines). 4018 40192009-09-24 Ivan Maidanski <ivmai@mail.ru> 4020 (ivmai145.diff) 4021 4022 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for. 4023 * Makefile.direct (NO_GETENV): Update the comment. 4024 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro. 4025 * include/gc.h (GC_WinMain): Remove declaration. 4026 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if 4027 GC_WINMAIN_REDIRECT. 4028 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of 4029 WinCE target unless GC_WINMAIN_REDIRECT is defined. 4030 * tests/test.c (WINMAIN_LPTSTR): New macro. 4031 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR 4032 and GC_WINMAIN_WINCE_LPTSTR. 4033 * win32_threads.c (start_mark_threads): Add the comment for 4034 MARK_THREAD_STACK_SIZE. 4035 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro. 4036 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New 4037 macro (only if GC_WINMAIN_REDIRECT). 4038 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT. 4039 * win32_threads.c (GC_WinMain): Add prototype (only if 4040 GC_WINMAIN_REDIRECT). 4041 * win32_threads.c (main_thread_args, WinMain): Rename 4042 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR. 4043 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init(); 4044 use WINMAIN_THREAD_STACK_SIZE. 4045 * win32_threads.c (WinMain): Call GC_deinit() and 4046 DeleteCriticalSection() only if WinCE; add FIXME. 4047 40482009-09-24 Ivan Maidanski <ivmai@mail.ru> 4049 4050 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base 4051 value returned by GC_get_stack_base(). 4052 40532009-09-23 Ivan Maidanski <ivmai@mail.ru> 4054 (ivmai150.diff) 4055 4056 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT): 4057 Add the comment for. 4058 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect): 4059 Declare external variable (only if USE_MUNMAP). 4060 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold 4061 value to 1 if GC_force_unmap_on_gcollect and restore it before 4062 unlocking (only if USE_MUNMAP). 4063 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add 4064 information for. 4065 * include/gc.h (GC_set_force_unmap_on_gcollect, 4066 GC_get_force_unmap_on_gcollect): New public function prototype. 4067 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is 4068 recognized. 4069 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Ditto. 4070 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New 4071 internal macro (used by GC_INIT only). 4072 * misc.c (GC_force_unmap_on_gcollect): New global variable. 4073 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT" 4074 environment variable (and set GC_force_unmap_on_gcollect). 4075 * misc.c (GC_set_force_unmap_on_gcollect, 4076 GC_get_force_unmap_on_gcollect): New public function. 4077 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect 4078 to force the mode on if WM_HIBERNATE; restore the mode after 4079 GC_gcollect(). 4080 40812009-09-23 Ivan Maidanski <ivmai@mail.ru> 4082 4083 * Makefile.direct (LARGE_CONFIG): Update information. 4084 * include/gc.h (GC_stop_func): Refine the comment. 4085 40862009-09-21 Ivan Maidanski <ivmai@mail.ru> 4087 4088 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for 4089 Win32 (workaround for Wine bug). 4090 40912009-09-20 Ivan Maidanski <ivmai@mail.ru> 4092 4093 * allchblk.c (GC_freehblk): Adjust local variables indentation. 4094 * mallocx.c (GC_generic_malloc_many): Ditto. 4095 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page, 4096 GC_calloc_explicitly_typed): Ditto. 4097 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary 4098 brackets. 4099 41002009-09-20 Ivan Maidanski <ivmai@mail.ru> 4101 4102 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS. 4103 * configure.ac: Process enable_parallel_mark option for Cygwin and 4104 Win32; define THREAD_LOCAL_ALLOC for Win32. 4105 41062009-09-20 Ivan Maidanski <ivmai@mail.ru> 4107 4108 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if 4109 PARALLEL_MARK (required for VC++ x86). 4110 41112009-09-19 Ivan Maidanski <ivmai@mail.ru> 4112 (ivmai149.diff) 4113 4114 * dbg_mlc.c (GC_generate_random_backtrace): Call 4115 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect(); 4116 if GC is disabled then print error message and return. 4117 * include/gc.h (GC_try_to_collect): Refine the comment. 4118 * include/private/gc_priv.h (GC_never_stop_func): Fix return type; 4119 refine the comment. 4120 41212009-09-19 Ivan Maidanski <ivmai@mail.ru> 4122 (ivmai147.diff) 4123 4124 * add_gc_prefix.c: Move the file to the new "extra" directory. 4125 * AmigaOS.c: Ditto. 4126 * gcname.c: Ditto. 4127 * if_mach.c: Ditto. 4128 * if_not_there.c: Ditto. 4129 * MacOS.c: Ditto. 4130 * msvc_dbg.c: Ditto. 4131 * setjmp_t.c: Ditto. 4132 * threadlibs.c: Ditto. 4133 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory. 4134 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c, 4135 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c 4136 with "extra" directory. 4137 * Makefile.am: Ditto. 4138 * Makefile.direct: Ditto. 4139 * Makefile.dj: Ditto. 4140 * Makefile.in: Ditto. 4141 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory. 4142 * NT_STATIC_THREADS_MAKEFILE: Ditto. 4143 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 4144 * NT_X64_THREADS_MAKEFILE: Ditto. 4145 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory. 4146 * gc.mak: Ditto. 4147 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra" 4148 directory. 4149 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra" 4150 directory. 4151 * doc/simple_example.html: Update for threadlibs.c. 4152 * os_dep.c: Prepend included AmigaOS.c with "extra" directory. 4153 41542009-09-19 Ivan Maidanski <ivmai@mail.ru> 4155 4156 * allchblk.c: Expand all tabs to spaces; remove trailing spaces at 4157 EOLn; remove multiple trailing blank lines. 4158 * mark.c: Ditto. 4159 * mark_rts.c: Ditto. 4160 * pthread_stop_world.c: Ditto. 4161 * win32_threads.c: Ditto. 4162 * include/gc.h: Ditto. 4163 * include/private/gc_priv.h: Ditto. 4164 * pthread_stop_world.c: Add copyright header. 4165 * include/gc.h: Reformat some comments. 4166 41672009-09-19 Ivan Maidanski <ivmai@mail.ru> 4168 (ivmai130a.diff, ivmai130b.diff - superseding diff44, diff69) 4169 4170 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New 4171 function prototype. 4172 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the 4173 single-threaded case) with an assertion check for the state to be 4174 not a "do-blocking" one. 4175 * include/private/gc_priv.h (blocking_data): Move the structure 4176 definition from pthread_support.c; change "fn" return type to void 4177 pointer. 4178 * include/private/gc_priv.h (GC_activation_frame_s): New structure 4179 type. 4180 * include/private/gc_priv.h (GC_push_all_stack_frames): New 4181 function declaration (only if THREADS). 4182 * include/private/gc_priv.h (GC_world_stopped): Don't declare 4183 unless THREADS. 4184 * include/private/gc_priv.h (GC_blocked_sp, 4185 GC_activation_frame_s): New declaration (only if not THREADS). 4186 * include/private/gc_priv.h (GC_push_all_register_frames): New 4187 function declaration (only for IA-64). 4188 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove 4189 obsolete (unused) symbols. 4190 * include/private/gc_priv.h (GC_push_all_stack_partially_eager): 4191 Remove declaration (since it is static now). 4192 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c 4193 (for code locality) and make STATIC. 4194 * mark_rts.c (GC_push_all_register_frames): New function (only for 4195 IA-64). 4196 * mark_rts.c (GC_push_all_stack_frames): New function (only if 4197 THREADS). 4198 * mark_rts.c (GC_add_trace_entry): New function prototype (used by 4199 GC_push_all_stack_partially_eager(), only if TRACE_BUF). 4200 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function. 4201 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a 4202 function body (only for IA-64). 4203 * mark_rts.c (GC_push_current_stack): Call 4204 GC_push_all_stack_part_eager_frames() instead of 4205 GC_push_all_stack_partially_eager(). 4206 * mark_rts.c (GC_push_current_stack): Call 4207 GC_push_all_register_frames() instead of GC_push_all_eager() for 4208 IA-64 backing store. 4209 * misc.c (GC_do_blocking_inner): Declare function (if THREADS 4210 only). 4211 * misc.c (GC_blocked_sp, GC_blocked_register_sp, 4212 GC_activation_frame): New global variables (only if not THREADS). 4213 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API 4214 function (only if not THREADS). 4215 * misc.c (GC_do_blocking): Move the function from 4216 pthread_support.c. 4217 * include/private/pthread_support.h (GC_Thread_Rep): Add 4218 "activation_frame" field. 4219 * pthread_stop_world.c (GC_push_all_stacks): Call 4220 GC_push_all_stack_frames() and GC_push_all_register_frames instead 4221 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for 4222 STACK_GROWS_UP here. 4223 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store 4224 "fn" result back to "client_data" field. 4225 * pthread_support.c (GC_call_with_gc_active): New API function. 4226 * win32_threads.c (GC_call_with_gc_active): Ditto. 4227 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and 4228 "activation_frame" fields. 4229 * win32_threads.c (GC_new_thread): Add assertion checking for 4230 thread_blocked_sp is NULL. 4231 * win32_threads.c (GC_do_blocking_inner): New function. 4232 * win32_threads.c (GC_stop_world): Don't suspend a thread if its 4233 thread_blocked_sp is non-NULL. 4234 * win32_threads.c (GC_push_stack_for): Use thread 4235 "activation_frame" (if non-NULL); use "thread_blocked_sp" if 4236 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the 4237 thread before modifying its last_stack_min; call 4238 GC_push_all_stack_frames() instead of GC_push_all_stack(); update 4239 the comments. 4240 42412009-09-19 Ivan Maidanski <ivmai@mail.ru> 4242 (ivmai129.diff - superseding diff47) 4243 4244 * alloc.c (GC_default_stop_func): New static variable (initialized 4245 to GC_never_stop_func). 4246 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function. 4247 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func 4248 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK), 4249 else call GC_default_stop_func() before getting "current_time". 4250 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for 4251 FIXME comment). 4252 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for 4253 replacing GC_never_stop_func with GC_default_stop_func (if 4254 possible). 4255 * alloc.c (GC_gcollect): Use GC_default_stop_func. 4256 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func 4257 (instead of GC_never_stop_func) unless it is trigged due to out of 4258 memory; don't increment GC_fail_count and don't output warning 4259 (before trying to collect again) in case the collection has been 4260 interrupted (by GC_default_stop_func) and the heap expansion has 4261 failed too. 4262 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function 4263 prototypes. 4264 42652009-09-19 Ivan Maidanski <ivmai@mail.ru> 4266 4267 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for 4268 GC_get_writable_length() result. 4269 42702009-09-18 Ivan Maidanski <ivmai@mail.ru> (really Ludovic Courtes) 4271 4272 * configure.ac: Don't use -lpthread -ldl for Cygwin. 4273 42742009-09-18 Ivan Maidanski <ivmai@mail.ru> 4275 4276 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak. 4277 42782009-09-18 Ivan Maidanski <ivmai@mail.ru> 4279 (ivmai142.diff) 4280 4281 * include/private/gcconfig.h (GWW_VDB): Undefine if 4282 USE_GLOBAL_ALLOC (since incompatible). 4283 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB 4284 is defined. 4285 * os_dep.c (GC_unmap_threshold): Declare (for use in 4286 GC_init_win32) if USE_MUNMAP. 4287 * os_dep.c (GC_init_win32): Turn off memory unmapping if 4288 GlobalAlloc() is used. 4289 * os_dep.c (GC_win32_get_mem): Define and use new 4290 VIRTUAL_ALLOC_PAD macro; don't waste a extra memory page unless 4291 MPROTECT_VDB is in use. 4292 42932009-09-17 Ivan Maidanski <ivmai@mail.ru> 4294 4295 * Makefile: Replace "version.h" with "include/gc_version.h". 4296 * include/gc_version.h: Ditto. 4297 42982009-09-17 Ivan Maidanski <ivmai@mail.ru> 4299 4300 * alloc.c (GC_collect_or_expand): Output heap size in WARN() 4301 (before returning FALSE) for convenience. 4302 43032009-09-17 Ivan Maidanski <ivmai@mail.ru> 4304 (ivmai139.diff) 4305 4306 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format 4307 string. 4308 * pthread_support.c (start_mark_threads, GC_thr_init): Ditto. 4309 * win32_threads.c (GC_delete_thread): Ditto. 4310 * include/private/gc_priv.h (GC_PRIdPTR): New macro. 4311 * pthread_stop_world.c (GC_suspend_handler_inner): Remove 4312 unnecessary cast for WARN argument. 4313 * pthread_support.c (start_mark_threads): if pthread_create() 4314 failed then don't try to create other marker threads and (after 4315 printing a warning) adjust GC_markers and GC_parallel values; log 4316 GC_markers value (possibly adjusted) after that. 4317 43182009-09-16 Ivan Maidanski <ivmai@mail.ru> 4319 (ivmai140.diff) 4320 4321 * win32_threads.c (start_mark_threads): if pthread_create() is 4322 failed then don't try to create other marker threads and (after 4323 printing a warning) adjust GC_markers and GC_parallel values. 4324 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move 4325 the definition upper (to be visible in start_mark_threads()). 4326 * win32_threads.c (start_mark_threads): if CreateThread() or 4327 _beginthreadex() is failed then don't try to create other marker 4328 threads and (after printing a warning) adjust GC_markers, 4329 GC_parallel values, and destroy the event objects (either only 4330 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if 4331 not a single thread is created). 4332 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly 4333 adjusted) after start_mark_threads() call. 4334 43352009-09-16 Ivan Maidanski <ivmai@mail.ru> 4336 4337 * Makefile.am: Back remove "GC_" prefix for PTHREADS, 4338 DARWIN_THREADS, WIN32_THREADS (for configure.ac). 4339 43402009-09-16 Ivan Maidanski <ivmai@mail.ru> 4341 4342 * ChangeLog: Remove trailing spaces at EOLn; insert blank lines 4343 where missed. 4344 * doc/README: Expand all tabs to spaces; remove trailing spaces at 4345 EOLn; remove multiple trailing blank lines. 4346 * doc/README.autoconf: Ditto. 4347 * doc/README.DGUX386: Ditto. 4348 * doc/README.environment: Ditto. 4349 * doc/README.macros: Ditto. 4350 * doc/README.win32: Ditto. 4351 * tests/test.c: Ditto. 4352 * tests/test_cpp.cc: Ditto. 4353 * backgraph.c: Ditto. 4354 * blacklst.c: Ditto. 4355 * checksums.c: Ditto. 4356 * darwin_stop_world.c: Ditto. 4357 * dbg_mlc.c: Ditto. 4358 * dyn_load.c: Ditto. 4359 * finalize.c: Ditto. 4360 * gc_dlopen.c: Ditto. 4361 * gcj_mlc.c: Ditto. 4362 * headers.c: Ditto. 4363 * mach_dep.c: Ditto. 4364 * malloc.c: Ditto. 4365 * mallocx.c: Ditto. 4366 * new_hblk.c: Ditto. 4367 * obj_map.c: Ditto. 4368 * ptr_chck.c: Ditto. 4369 * real_malloc.c: Ditto. 4370 * reclaim.c: Ditto. 4371 * stubborn.c: Ditto. 4372 * thread_local_alloc.c: Ditto. 4373 * typd_mlc.c: Ditto. 4374 * gc_cpp.cc: Ditto. 4375 * include/gc_allocator.h: Ditto. 4376 * include/gc_backptr.h: Ditto. 4377 * include/gc_config_macros.h: Ditto. 4378 * include/gc_cpp.h: Ditto. 4379 * include/gc_gcj.h: Ditto. 4380 * include/gc_inline.h: Ditto. 4381 * include/gc_mark.h: Ditto. 4382 * include/gc_pthread_redirects.h: Ditto. 4383 * include/gc_typed.h: Ditto. 4384 * include/gc_version.h: Ditto. 4385 * include/javaxfc.h: Ditto. 4386 * include/new_gc_alloc.h: Ditto. 4387 * include/private/darwin_semaphore.h: Ditto. 4388 * include/private/dbg_mlc.h: Ditto. 4389 * include/private/gc_hdrs.h: Ditto. 4390 * include/private/gc_locks.h: Ditto. 4391 * include/private/gc_pmark.h: Ditto. 4392 * include/private/gcconfig.h: Ditto. 4393 * include/private/pthread_support.h: Ditto. 4394 * include/private/thread_local_alloc.h: Ditto. 4395 * darwin_stop_world.c: Add copyright header. 4396 * include/gc_backptr.h: Ditto. 4397 * include/gc_config_macros.h: Ditto. 4398 * include/gc_pthread_redirects.h: Ditto. 4399 * include/gc_version.h: Ditto. 4400 * include/javaxfc.h: Ditto. 4401 * include/private/darwin_semaphore.h: Ditto. 4402 * include/private/pthread_support.h: Ditto. 4403 * gc_cpp.cc: Make copyright header uniform across the package. 4404 * include/gc_cpp.h: Ditto. 4405 44062009-09-16 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal) 4407 (gc_config_h_6a.patch with a minor correction) 4408 4409 * include/private/gc_priv.h: Change include of config.h to 4410 private/config.h. 4411 * include/private/gc_pmark.h: Ditto. 4412 * gc_cpp.cc: Ditto. 4413 * tests/test.c: Ditto. 4414 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H); 4415 undefine GC_BUILD. 4416 44172009-09-16 Ivan Maidanski <ivmai@mail.ru> 4418 (ivmai128.diff - superseding diff62, diff66 partly) 4419 4420 * finalize.c (GC_general_register_disappearing_link): Return 4421 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2, 4422 respectively). 4423 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2). 4424 * include/gc.h (GC_register_disappearing_link, 4425 GC_general_register_disappearing_link): Update the comment. 4426 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro. 4427 * finalize.c (GC_general_register_disappearing_link, 4428 GC_register_finalizer_inner): Recalculate the hash table index 4429 after GC_oom_fn succeeded (since the table may grow while not 4430 holding the lock) and check again that the entry is still not in 4431 the table (free the unused entry otherwise unless DBG_HDRS_ALL). 4432 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr" 4433 local variable (to prevent a compiler warning). 4434 * finalize.c (GC_register_finalizer_inner): Don't modify the data 4435 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed 4436 (due to out of memory). 4437 44382009-09-16 Ivan Maidanski <ivmai@mail.ru> 4439 (ivmai124.diff - superseding diff67 partly) 4440 4441 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to 4442 suppress compiler "variable might be uninitialized" warnings. 4443 44442009-09-16 Ivan Maidanski <ivmai@mail.ru> 4445 (ivmai138.diff) 4446 4447 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for. 4448 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for 4449 WinCE. 4450 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to 4451 HANDLE thru word type (to avoid a compiler warning) for WinCE. 4452 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array 4453 (only if DONT_USE_SIGNALANDWAIT). 4454 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id 4455 and GC_marker_cv for each helper thread (only if 4456 DONT_USE_SIGNALANDWAIT). 4457 * win32_threads.c (GC_mark_mutex_state): New static variable (only 4458 if DONT_USE_SIGNALANDWAIT). 4459 * win32_threads.c (GC_mark_mutex_waitcnt, 4460 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT. 4461 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock): 4462 Use InterlockedExchange() over GC_mark_mutex_state (instead of 4463 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT. 4464 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): 4465 Implement wait/broadcast primitives using Win32 multiple events 4466 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of 4467 using Win32 SignalObjectAndWait). 4468 * win32_threads.c (GC_thr_init): Don't declare hK32 local 4469 variable, don't check for GC_wnt, and don't initialize 4470 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT. 4471 44722009-09-16 Ivan Maidanski <ivmai@mail.ru> 4473 (ivmai127.diff - superseding diff49) 4474 4475 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats 4476 if GC_print_stats (after getting "done_time"). 4477 * finalize.c (GC_old_dl_entries): New static variable (only if not 4478 SMALL_CONFIG). 4479 * finalize.c (GC_finalize): Save current GC_dl_entries value (only 4480 if not SMALL_CONFIG). 4481 * finalize.c (GC_print_finalization_stats): Define if and only if 4482 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf() 4483 instead of GC_printf(); use "%lu" (instead of "%u") print format 4484 specifier; use unsigned long type for "ready" counter (for LP64 4485 targets). 4486 * misc.c (GC_dump): No longer call GC_print_finalization_stats() 4487 here (since it is called from GC_finish_collection()). 4488 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and 4489 ECOS). 4490 44912009-09-16 Ivan Maidanski <ivmai@mail.ru> 4492 (ivmai134.diff) 4493 4494 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with 4495 GC_init() one. 4496 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Ditto. 4497 * mallocx.c (GC_generic_malloc_many): Ditto. 4498 * misc.c (GC_enable_incremental): Ditto. 4499 * alloc.c (GC_expand_hp): Update the comment. 4500 * mark.c (GC_obj_kinds): Ditto. 4501 * win32_threads.c (GC_allow_register_threads): Ditto. 4502 * private/gc_priv.h (GC_init_inner): Remove function declaration. 4503 * misc.c (GC_init_inner): Replace with public GC_init(). 4504 45052009-09-16 Ivan Maidanski <ivmai@mail.ru> 4506 (ivmai126.diff) 4507 4508 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function. 4509 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply 4510 GC_gcj_fake_mark_proc (aborting with the appropriate message) 4511 instead. 4512 45132009-09-16 Ivan Maidanski <ivmai@mail.ru> 4514 (ivmai125.diff) 4515 4516 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due 4517 to out of memory) then don't increment GC_n_heap_bases and don't 4518 call VirtualAlloc() again (with MEM_COMMIT). 4519 * os_dep.c (GC_remap): Abort with a more informatory message if 4520 VirtualAlloc() fails due to out of memory; update FIXME. 4521 45222009-09-16 Ivan Maidanski <ivmai@mail.ru> 4523 (ivmai132.diff - superseding diff41a, diff64, diff84 partly) 4524 4525 * Makefile: Fix typo for msvc_dbg.c. 4526 * Makefile.direct: Ditto. 4527 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with 4528 "GC_". 4529 * Makefile.dj: Don't reference remove files (nursery.c, 4530 gc_nursery.h, gc_copy_descr.h). 4531 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used). 4532 * NT_STATIC_THREADS_MAKEFILE: Ditto. 4533 * NT_THREADS_MAKEFILE: Ditto. 4534 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 4535 * NT_X64_THREADS_MAKEFILE: Ditto. 4536 * gc.mak: Ditto. 4537 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always 4538 defined in the source files). 4539 * NT_THREADS_MAKEFILE: Ditto. 4540 * NT_X64_THREADS_MAKEFILE: Ditto. 4541 * gc.mak: Ditto. 4542 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL. 4543 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with 4544 GC_THREADS. 4545 * NT_THREADS_MAKEFILE: Ditto. 4546 * NT_X64_STATIC_THREADS_MAKEFILE: Ditto. 4547 * NT_X64_THREADS_MAKEFILE: Ditto. 4548 * gc.mak: Ditto. 4549 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the 4550 compiler warnings. 4551 * NT_STATIC_THREADS_MAKEFILE: Ditto. 4552 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE 4553 before "$*.C" (and "$*.CPP"). 4554 * NT_X64_THREADS_MAKEFILE: Ditto. 4555 45562009-09-16 Ivan Maidanski <ivmai@mail.ru> 4557 (ivmai131.diff - superseding diff83, diff84 partly) 4558 4559 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS. 4560 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS. 4561 * doc/README.win64: Add info about mingw-w64; add note for VC++ 4562 warnings suppression. 4563 45642009-09-15 Hans Boehm <Hans.Boehm@hp.com> (Mostly Juan Jose Garcia-Ripoll) 4565 (Also similar to, but not the same as, Ivan's diff104_cvs) 4566 4567 * os_dep.c (GC_forward_exception): Fix logic in several places. 4568 (OSX-specific) 4569 45702009-09-15 Ivan Maidanski <ivmai@mail.ru> 4571 (ivmai137v2.diff) 4572 4573 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef. 4574 45752009-09-14 Ivan Maidanski <ivmai@mail.ru> 4576 (ivmai136v2.diff) 4577 4578 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS 4579 from Makefile. 4580 * Makefile: Remove the information about "define arguments" (which 4581 is incomplete and outdated compared to that in Makefile.direct); 4582 add help reference to Makefile.direct. 4583 * Makefile.dj: Ditto. 4584 45852009-09-14 Ivan Maidanski <ivmai@mail.ru> 4586 (ivmai135.diff) 4587 4588 * alloc.c (world_stopped_total_time, world_stopped_total_divisor): 4589 Replace "STATIC" with "static" in the definition (since the 4590 symbols aren't prefixed with "GC_"). 4591 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min, 4592 start_mark_threads, mark_mutex, builder_cv, mark_cv, 4593 mark_mutex_event, signalObjectAndWait_func, main_thread_start): 4594 Ditto. 4595 * pthread_support.c (GC_wait_builder): Define as STATIC. 4596 * win32_threads.c (GC_wait_builder): Ditto. 4597 45982009-09-14 Ivan Maidanski <ivmai@mail.ru> 4599 (ivmai133.diff) 4600 4601 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New 4602 API function. 4603 * include/gc_pmark.h (GC_get_heap_size_inner, 4604 GC_get_free_bytes_inner): New function declaration. 4605 46062009-09-10 Ivan Maidanski <ivmai@mail.ru> 4607 (ivmai121.diff) 4608 4609 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE). 4610 * include/gc_config_macros.h: Ditto. 4611 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro. 4612 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for 4613 internal use). 4614 * include/gc_config_macros.h: Always include stddef.h if GCC. 4615 * include/gc_config_macros.h (GC_API): Define for CeGCC in the 4616 same way as for MinGW. 4617 * include/gc_config_macros.h (GC_API): Group the definition for 4618 all cases together (check for GC_DLL only once). 4619 * include/gc_pthread_redirects.h: Group non-Darwin code together. 4620 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL). 4621 46222009-09-10 Ivan Maidanski <ivmai@mail.ru> 4623 (ivmai120a.diff, ivmai120b.diff) 4624 4625 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO, 4626 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE, 4627 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the 4628 comment for. 4629 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new 4630 macro). 4631 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add 4632 FIXME and the comment for WinCE. 4633 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO 4634 (new macro). 4635 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++ 4636 WinCE (since backtrace() is unimplemented). 4637 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration 4638 (since static). 4639 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the 4640 definition to be above GC_is_heap_base(). 4641 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM 4642 (both for MinGW and CeGCC toolchains). 4643 * include/private/gcconfig.h: Recognize __CEGCC__ and 4644 __MINGW32CE__ (as synonyms for __WIN32_WCE). 4645 * include/private/gcconfig.h: If SH4 then don't set config 4646 parameters for SH. 4647 * include/private/thread_local_alloc.h (GC_key_create): Don't 4648 abort on failures, just return -1 in these cases (this also 4649 prevents compilation error for targets where ABORT is defined 4650 indirectly as an inline assembler sequence). 4651 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for 4652 the GCC-based cross-compiler. 4653 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless 4654 WRAP_MARK_SOME is defined; define also for WinCE case; don't 4655 check for _WIN64 (since WRAP_MARK_SOME is undefined for it). 4656 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update 4657 the comment. 4658 * misc.c: Include signal.h after gc_pmark.h included; check for 4659 MSWINCE instead of _WIN32_WCE. 4660 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call. 4661 * misc.c: Don't include <crtdbg.h> for WinCE targets. 4662 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for 4663 CeGCC toolchain). 4664 * misc.c (GC_write): Use OutputDebugStringW() instead of 4665 _CrtDbgReport() for WinCE targets. 4666 * os_dep.c (GC_least_described_address): Define as STATIC. 4667 * os_dep.c (GC_register_data_segments): Fix code indentation. 4668 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable 4669 (to prevent a compiler warning). 4670 * os_dep.c (GC_dirty_init): Add comment for WinCE target. 4671 * tests/test.c: Don't include winbase.h directly if GCC for WinCE, 4672 include assert.h instead. 4673 * tests/test.c (tiny_reverse_test): Define and use 4674 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10); 4675 useful for WinCE. 4676 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field 4677 for WinCE (since thread Id is used as a "real" thread handle). 4678 * win32_threads.c (THREAD_HANDLE): New macro. 4679 * win32_threads.c (GC_register_my_thread_inner): Don't recognize 4680 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on 4681 WinCE. 4682 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for. 4683 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check 4684 for MSWINCE. 4685 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't 4686 close thread handle on WinCE (since it's a thread Id). 4687 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the 4688 MPROTECT-related code (for the case if MPROTECT_VDB would be 4689 implemented for WinCE). 4690 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for): 4691 Use THREAD_HANDLE(t) to obtain thread handle. 4692 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized; 4693 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include 4694 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace 4695 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the 4696 parallel mark support). 4697 * win32_threads.c (start_mark_threads): Use int type for "i" local 4698 variable (instead of "unsigned") to prevent a compiler warning. 4699 * win32_threads.c (start_mark_threads): Don't check CreateThread() 4700 result for -1; call CloseHandle() for the handle created by 4701 CreateThread() (on WinCE); don't use errno (since errno.h is 4702 missing on some targets like WinCE) when printing warning on a 4703 marker thread creation failure. 4704 * win32_threads.c (signalObjectAndWait_func): Define for WinCE. 4705 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion 4706 for non-zero signalObjectAndWait_func (to make the code compilable 4707 for WinCE). 4708 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE; 4709 use GC_sysinfo to get processors count if WinCE; don't check for 4710 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with 4711 GC_PTHREADS_PARAMARK. 4712 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new 4713 macro (useful for testing parallel marking on WinCE). 4714 * win32_threads.c (GC_win32_start, main_thread_start): Define as 4715 STATIC. 4716 * win32_threads.c: Don't define main_thread_args, 4717 main_thread_start(), WinMain() for WinCE if GC_DLL. 4718 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro 4719 (since the stack size parameter is ignored on WinCE). 4720 * win32_threads.c (main_thread_start): Remove forward declaration; 4721 place its definition before WinMain() one. 4722 * win32_threads.c (WinMain): Abort if GC_CreateThread() or 4723 WaitForSingleObject() failed (for the main thread). 4724 47252009-09-10 Ivan Maidanski <ivmai@mail.ru> 4726 (diff118_cvs - superseding diff53) 4727 4728 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of 4729 a function. 4730 * allchblk.c (GC_unmap_threshold): New global variable definition 4731 (initialized to MUNMAP_THRESHOLD). 4732 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of 4733 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0. 4734 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information. 4735 * misc.c (GC_unmap_threshold): New variable declaration. 4736 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD" 4737 environment variable to set GC_unmap_threshold value (only if 4738 USE_MUNMAP). 4739 47402009-09-10 Ivan Maidanski <ivmai@mail.ru> 4741 (diff117) 4742 4743 * dbg_mlc.c (OFN_UNSET): New macro (to detect 4744 GC_register_finalizer() failures). 4745 * dbg_mlc.c (store_old): Add a check for register_finalizer() 4746 failure caused by an out-of-memory event (leave *ofn and *ocd 4747 unmodified in that case). 4748 * dbg_mlc.c (GC_debug_register_finalizer, 4749 GC_debug_register_finalizer_no_order, 4750 GC_debug_register_finalizer_unreachable, 4751 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn 4752 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same 4753 as in GC_register_finalizer_inner()). 4754 47552009-09-10 Ivan Maidanski <ivmai@mail.ru> 4756 (diff116a, diff116b, diff116c) 4757 4758 * Makefile.direct (GC_DLL): Add the comment for. 4759 * doc/README.macros: Fix a typo. 4760 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info. 4761 * doc/README.macros (__STDC__): Remove info. 4762 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address, 4763 GC_generate_random_valid_address, GC_print_backtrace, 4764 GC_generate_random_backtrace, GC_register_describe_type_fn): Add 4765 GC_API and GC_CALL to function definition. 4766 * malloc.c (GC_generic_malloc): Ditto. 4767 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Ditto. 4768 * mark.c (GC_mark_and_push): Ditto. 4769 * misc.c (GC_new_free_list_inner, GC_new_free_list, 4770 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc): 4771 Ditto. 4772 * include/gc_backptr.h (GC_get_back_ptr_info, 4773 GC_generate_random_heap_address, GC_generate_random_valid_address, 4774 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and 4775 GC_CALL to function prototype. 4776 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list, 4777 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner, 4778 GC_new_proc, GC_new_proc_inner, GC_generic_malloc, 4779 GC_register_describe_type_fn): Ditto. 4780 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed, 4781 GC_generic_malloc_words_small): Ditto. 4782 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined). 4783 * include/private/gc_pmark.h: Ditto. 4784 * include/private/gc_priv.h: Ditto. 4785 * tests/test.c: Ditto. 4786 * gc_cpp.cc: Define GC_BUILD. 4787 * include/private/gc_pmark.h: Ditto. 4788 * include/private/gc_priv.h: Ditto. 4789 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro. 4790 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function 4791 definition. 4792 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask, 4793 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join, 4794 pthread_detach, pthread_create): Ditto. 4795 * win32_threads.c (GC_pthread_join, GC_pthread_create, 4796 GC_pthread_sigmask, GC_pthread_detach): Ditto. 4797 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros. 4798 * include/gc_backptr.h: Include "gc.h". 4799 * include/gc_backptr.h: Use extern "C" for the exported functions. 4800 * include/gc_mark.h: Ditto. 4801 * include/gc_config_macros.h (GC_THREADS): Define the macro if any 4802 GC_XXX_THREADS is defined. 4803 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE): 4804 Move the definitions below the place where GC_NETBSD_THREADS and 4805 GC_DGUX386_THREADS are defined. 4806 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL 4807 is defined) for GCC. 4808 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the 4809 same way as for VC++); define for GCC v4+ (other than already 4810 recognized MinGW/Cygwin) as a "default" visibility attribute if 4811 GC_DLL is defined. 4812 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE): 4813 New macro. 4814 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, 4815 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, 4816 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, 4817 GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 4818 GC_debug_malloc_atomic, GC_debug_strdup, 4819 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, 4820 GC_debug_malloc_ignore_off_page, 4821 GC_debug_malloc_atomic_ignore_off_page, 4822 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute. 4823 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, 4824 GC_gcj_malloc_ignore_off_page): Ditto. 4825 * include/gc.h (GC_malloc, GC_malloc_atomic, 4826 GC_malloc_uncollectable, GC_malloc_stubborn, 4827 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page, 4828 GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 4829 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable, 4830 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page, 4831 GC_debug_malloc_atomic_ignore_off_page, 4832 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute 4833 (for the first argument). 4834 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc, 4835 GC_gcj_malloc_ignore_off_page): Ditto. 4836 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc, 4837 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute 4838 (for the second argument). 4839 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup, 4840 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign, 4841 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size, 4842 GC_realloc, GC_expand_hp, GC_set_max_heap_size, 4843 GC_exclude_static_roots, GC_add_roots, GC_remove_roots, 4844 GC_register_displacement, GC_debug_register_displacement, 4845 GC_try_to_collect, GC_malloc_ignore_off_page, 4846 GC_malloc_atomic_ignore_off_page, GC_debug_malloc, 4847 GC_debug_malloc_atomic, GC_debug_strdup, 4848 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn, 4849 GC_debug_malloc_ignore_off_page, 4850 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free, 4851 GC_debug_realloc, GC_debug_malloc_replacement, 4852 GC_debug_realloc_replacement, GC_finalization_proc, 4853 GC_register_finalizer, GC_debug_register_finalizer, 4854 GC_register_finalizer_ignore_self, 4855 GC_debug_register_finalizer_ignore_self, 4856 GC_register_finalizer_no_order, 4857 GC_debug_register_finalizer_no_order, 4858 GC_register_finalizer_unreachable, 4859 GC_debug_register_finalizer_unreachable, 4860 GC_register_disappearing_link, 4861 GC_general_register_disappearing_link, 4862 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc, 4863 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type, 4864 GC_call_with_alloc_lock, GC_stack_base_func, 4865 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr, 4866 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc, 4867 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc, 4868 GC_malloc_many, GC_CreateThread, GC_beginthreadex, 4869 GC_endthreadex): Comment out (or remove if single and meaningless) 4870 function argument names (to avoid identifiers out of the name 4871 space). 4872 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc, 4873 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto. 4874 * include/gc.h (GC_try_to_collect): Update the comment. 4875 * include/gc.h (GC_size, GC_register_my_thread): Add const 4876 qualifier for the argument referent. 4877 * misc.c (GC_size): Ditto. 4878 * pthread_support.c (GC_register_my_thread_inner, 4879 GC_register_my_thread): Ditto. 4880 * win32_threads.c (GC_register_my_thread_inner, 4881 GC_register_my_thread): Ditto. 4882 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use 4883 (define instead of GC_INIT() for Cygwin and AIX). 4884 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES, 4885 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN, 4886 GC_INITIAL_HEAP_SIZE): Recognize new macro. 4887 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES, 4888 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ, 4889 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN, 4890 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use. 4891 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros. 4892 * include/gc_mark.h: Prefix GC_H with '_'. 4893 * include/gc_mark.h (GC_least_plausible_heap_addr, 4894 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API 4895 for the public variable declaration. 4896 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr, 4897 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Ditto. 4898 * include/gc_pthread_redirects.h (GC_pthread_create, 4899 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach): 4900 Use GC_API for the wrapper prototype. 4901 * include/gc_pthread_redirects.h (pthread_create, pthread_join, 4902 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally 4903 before redirecting. 4904 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with 4905 GC_incr_bytes_freed(); remove FIXME. 4906 * include/private/gc_priv.h (GC_make_closure, 4907 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private 4908 function. 4909 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of 4910 the target. 4911 49122009-09-10 Ivan Maidanski <ivmai@mail.ru> 4913 (diff115) 4914 4915 * finalize.c (GC_general_register_disappearing_link, 4916 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS" 4917 guard for LOCK/UNLOCK(). 4918 * finalize.c (GC_general_register_disappearing_link, 4919 GC_register_finalizer_inner): Get GC_oom_fn value before releasing 4920 the lock (to prevent data races). 4921 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc, 4922 GC_gcj_malloc_ignore_off_page): Ditto. 4923 * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto. 4924 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn() 4925 instead of GC_oom_fn (to prevent data races). 4926 * malloc.c (GC_generic_malloc): Ditto. 4927 * mallocx.c (GC_memalign): Ditto. 4928 * pthread_support.c (pthread_create): Ditto. 4929 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting 4930 last_finalized_no value to prevent data races. 4931 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn, 4932 GC_set_find_leak, GC_set_finalize_on_demand, 4933 GC_set_java_finalization, GC_set_finalizer_notifier, 4934 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes, 4935 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries, 4936 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine 4937 the comment. 4938 * misc.c (GC_set_oom_fn): Ditto. 4939 * include/gc.h (GC_general_register_disappearing_link): Refine the 4940 comment (replace "soft" word with "weak"). 4941 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel, 4942 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment. 4943 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier, 4944 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races. 4945 49462009-09-10 Ivan Maidanski <ivmai@mail.ru> 4947 (diff114a, diff114b, diff114c) 4948 4949 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include 4950 "private/dbg_mlc.h" before it. 4951 * malloc.c: Ditto. 4952 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy() 4953 for WinCE (since deprecated); evaluate strlen() only once; don't 4954 set errno for WinCE. 4955 * malloc.c (GC_strdup): Ditto. 4956 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE. 4957 * include/gc.h (GC_unregister_my_thread): Refine the comment. 4958 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex): 4959 Don't declare for WinCE. 4960 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only). 4961 * include/gc.h (GC_WinMain): Remove GC_API. 4962 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for 4963 lpCmdLine. 4964 * tests/test.c (GC_WinMain): Ditto. 4965 * win32_threads.c (main_thread_args, GC_WinMain): Ditto. 4966 * include/gc_config_macros.h (ptrdiff_t): Guard with 4967 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro. 4968 * include/private/gc_locks.h: Guard include "atomic_ops.h" with 4969 ifdef GC_PTHREADS (and not GC_WIN32_THREADS). 4970 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK. 4971 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT. 4972 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB. 4973 * include/private/gc_locks.h: Use include "atomic_ops.h" instead 4974 of include <atomic_ops.h>. 4975 * include/private/gc_priv.h: Ditto. 4976 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock): 4977 Don't export (replace GC_API to "extern"). 4978 * win32_threads.c (GC_allocate_ml): Don't export. 4979 * include/private/gc_priv.h (DebugBreak): Define as macro for 4980 WinCE (if not UNDER_CE and DebugBreak is not defined yet). 4981 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS 4982 (since "UNALIGNED" is defined in winnt.h of WinCE). 4983 * mark.c (UNALIGNED): Ditto. 4984 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_. 4985 * include/private/gcconfig.h (ALIGNMENT): Check always defined. 4986 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE. 4987 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC 4988 for WinCE (since __declspec(thread) is unsupported). 4989 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES): 4990 Define for WinCE (if undefined). 4991 * malloc.c (GC_malloc): Remove outdated comment about disabling 4992 signals. 4993 * misc.c: Don't include <tchar.h> (since not used anymore and may 4994 break TEXT() macro defined in winnt.h). 4995 * misc.c (GC_init_inner): Don't use GetModuleHandle() and 4996 InitializeCriticalSectionAndSpinCount() for WinCE. 4997 * misc.c (GC_init_inner): Replace GetModuleHandleA() with 4998 GetModuleHandle() (and use TEXT() macro controlled by UNICODE). 4999 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro. 5000 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE 5001 only); move the code from GC_write(); replace GETENV() with 5002 GetEnvironmentVariable(); replace CreateFileA() with 5003 CreateFile(); use TEXT() macro (for Unicode support); replace 5004 strcat() with memcpy() (since deprecated in WinCE). 5005 * misc.c (GC_write): Define as STATIC. 5006 * win32_threads.c (GC_attached_thread): Ditto. 5007 * misc.c (GC_write): Use GC_CreateLogFile(). 5008 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE. 5009 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically 5010 (Win32 only) if DONT_USE_USER32_DLL is defined. 5011 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and 5012 WinCE). 5013 * misc.c (GC_abort): Use a more user-friendly abort if 5014 NO_DEBUGGING (Win32 only). 5015 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and 5016 THREADS). 5017 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle 5018 (for Unicode support); check GetModuleHandle() result. 5019 * tests/test.c: Don't define assert for WinCE (since may be 5020 redefined by "assert.h" included from libatomic_ops). 5021 * tests/test.c (FAIL): Define as ABORT for all targets (except 5022 for PCR). 5023 * tests/test.c (n_tests): Don't use AO_t. 5024 * tests/test.c (check_heap_stats): Don't cast n_tests. 5025 * tests/test.c (inc_int_counter): New function (for n_tests atomic 5026 incrementation). 5027 * tests/test.c (run_one_test): Test GC_memalign() for all targets. 5028 * tests/test.c (run_one_test): Avoid unbalanced brackets in 5029 #if-#else-#endif blocks. 5030 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and 5031 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter). 5032 * tests/test.c (check_heap_stats): Replace 5033 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress 5034 "unreachable code" compiler warning. 5035 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE 5036 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE). 5037 * tests/test.c (thr_window): Replace "L" string prefix with 5038 TEXT(). 5039 * thread_local_alloc.c: Check THREADS is defined (to prevent other 5040 compiler errors and warnings otherwise). 5041 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for 5042 GC_use_DllMain()). 5043 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add 5044 the comments for. 5045 * win32_threads.c (GC_register_my_thread_inner): Recognize 5046 DONT_IMPORT_GETCURTHREAD macro. 5047 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude 5048 DllMain support if needed). 5049 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain 5050 thread registration is unsupported for a given configuration. 5051 * win32_threads.c (GC_use_DllMain): Update the comment; refine 5052 ABORT message. 5053 * win32_threads.c (GC_use_DllMain, 5054 GC_started_thread_while_stopped, GC_register_my_thread_inner, 5055 GC_lookup_thread_inner, GC_delete_gc_thread, 5056 GC_allow_register_threads, GC_lookup_pthread, 5057 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks): 5058 Check for GC_NO_DLLMAIN. 5059 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread, 5060 DllMain): Don't define if GC_NO_DLLMAIN. 5061 * win32_threads.c (GC_stop_world): Declare "i" and "max" local 5062 variables only if not GC_NO_DLLMAIN (to suppress compiler 5063 warning). 5064 * win32_threads.c (GC_mark_thread, start_mark_threads): Use 5065 CreateThread() instead of _beginthreadex() for WinCE. 5066 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE): 5067 New macros defined (used by start_mark_threads(), WinMain()). 5068 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on 5069 WinCE for now (since getenv(), GetProcessAffinityMask() and 5070 SignalObjectAndWait() are missing on WinCE). 5071 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with 5072 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use 5073 TEXT() macro (for Unicode support). 5074 50752009-09-10 Ivan Maidanski <ivmai@mail.ru> 5076 (diff113) 5077 5078 * include/gc.h (GC_has_static_roots_func): New typedef (user filter 5079 callback). 5080 * include/gc.h (GC_register_has_static_roots_callback): Use 5081 GC_has_static_roots_func type. 5082 * dyn_load.c (GC_has_static_roots, 5083 GC_register_has_static_roots_callback): Ditto. 5084 * dyn_load.c (GC_has_static_roots, 5085 GC_register_has_static_roots_callback): Define on all platforms. 5086 * dyn_load.c (GC_register_dynlib_callback, 5087 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style 5088 functions definition with the ANSI C one. 5089 * dyn_load.c (GC_register_dynlib_callback): Use new local variable 5090 "callback" (initialized from GC_has_static_roots) to minimize data 5091 races. 5092 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr, 5093 GC_cond_add_roots): Define as STATIC. 5094 * mark_rts.c (GC_remove_roots_inner): Ditto. 5095 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for 5096 sections smaller than pointer size (just to avoid acquiring the 5097 lock unnecessarily). 5098 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not 5099 only for DARWIN_DEBUG). 5100 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with 5101 LOCK + GC_add_roots_inner() + UNLOCK. 5102 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user 5103 callback (if set) holding the lock; if it returns 0 then don't call 5104 GC_add_roots_inner() for that region. 5105 * dyn_load.c (GC_register_has_static_roots_callback): Put 5106 "callback" value to GC_has_static_roots on all platforms. 5107 * dyn_load.c (GC_has_static_roots): Update the comments. 5108 * include/gc.h (GC_exclude_static_roots, GC_add_roots, 5109 GC_remove_roots, GC_register_has_static_roots_callback): Ditto. 5110 * include/private/gc_priv.h (struct roots): Ditto. 5111 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype 5112 to mark_rts.c and declare it as STATIC. 5113 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New 5114 prototype. 5115 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use 5116 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots. 5117 * misc.c (GC_init_inner): Ditto. 5118 * mark_rts.c (GC_exclude_static_roots_inner): New function (move 5119 all the code from GC_exclude_static_roots(); add the comment. 5120 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner): 5121 add alignment assertion for the lower bound; add assertion for the 5122 lower bound to be less than the upper one. 5123 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust 5124 the upper bound (round down to be of a pointer-aligned value); 5125 return in case of an empty range. 5126 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call 5127 GC_exclude_static_roots_inner(). 5128 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return 5129 in case of a do-nothing case (before acquiring the lock). 5130 51312009-09-10 Ivan Maidanski <ivmai@mail.ru> 5132 (diff112) 5133 5134 * finalize.c (GC_fail_count): New external variable declaration. 5135 * finalize.c (GC_reset_finalizer_nested, 5136 GC_check_finalizer_nested): New function declarations (if THREADS 5137 only). 5138 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New 5139 static global variables (used internally by GC_finalize() and 5140 GC_check_finalizer_nested()). 5141 * finalize.c (GC_check_finalizer_nested): New static function 5142 definition (only if not THREADS, used internally by 5143 GC_notify_or_invoke_finalizers() to minimize the probability of 5144 a deep recursion when a client finalizer tries to allocate GC 5145 memory). 5146 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or 5147 call GC_reset_finalizer_nested()) if last heap expansion failed. 5148 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no, 5149 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier, 5150 last_finalizer_notification variables holding the lock (to avoid 5151 data races). 5152 * finalize.c (GC_finalizer_notifier): Add comment. 5153 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check 5154 for an empty finalization queue (only if THREADS and not 5155 KEEP_BACK_PTRS/MAKE_BACK_GRAPH). 5156 * finalize.c (GC_notify_or_invoke_finalizers): Call 5157 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call 5158 if appropriate. 5159 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned 5160 finalizer_nested and finalizer_skipped fields (for internal use 5161 by the multi-threaded GC_check_finalizer_nested()). 5162 * win32_threads.c (GC_Thread_Rep): Ditto. 5163 * pthread_support.c (GC_reset_finalizer_nested, 5164 GC_check_finalizer_nested): New function definitions (the 5165 multi-threaded variants of that in finalize.c). 5166 * win32_threads.c (GC_reset_finalizer_nested, 5167 GC_check_finalizer_nested): Ditto. 5168 51692009-09-10 Ivan Maidanski <ivmai@mail.ru> 5170 (diff103_cvs - resembling diff78, diff88_cvs, diff99_cvs, 5171 diff100_cvs, diff101_cvs, diff102_cvs) 5172 5173 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed 5174 anymore and GCC produces a warning for it). 5175 * alloc.c (GC_stopped_mark): Adjust printf argument type 5176 specifier. 5177 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for 5178 the case when the configuration information comes from aconfig 5179 file). 5180 * checksums.c: Ditto (for gc_priv.h and CHECKSUMS, respectively). 5181 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__" 5182 keyword instead of "unused". 5183 * include/gc_allocator.h: Fix typos in comments. 5184 * thread_local_alloc.c: Ditto. 5185 * include/javaxfc.h (GC_finalize_all): Update comment. 5186 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as 5187 GC_API and serves only as a marker for the private but exported 5188 symbols used by test.c only). 5189 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked, 5190 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with 5191 GC_API_PRIV one. 5192 * include/private/gc_priv.h (GC_fo_entries): Don't export it 5193 outside a DLL. 5194 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro 5195 designated to check the arguments correctness of printf-like 5196 functions (currently works only for GCC v3+). 5197 * include/private/gc_priv.h (GC_printf, GC_err_printf, 5198 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute. 5199 52002009-09-03 Hans Boehm <Hans.Boehm@hp.com> (really Loren J. Rittle) 5201 5202 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use. 5203 Define for FreeBSD 7.0+. 5204 52052009-09-02 Hans Boehm <Hans.Boehm@hp.com> (with help from Victor Ivrii and 5206 others) 5207 5208 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT. 5209 52102009-08-19 Hans Boehm <Hans.Boehm@hp.com> 5211 5212 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive 5213 comment. 5214 52152009-08-11 Hans Boehm <Hans.Boehm@hp.com> 5216 (Replacement for Ivan Maidanski's diff99_cvs. Hopefully fixes 5217 the same bugs, and then some.) 5218 5219 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent 5220 free blocks have different mapping status. Correctly handle gap 5221 between blocks. 5222 (GC_split_block): Remove dead code setting hb_flags. Add comment. 5223 (GC_allochblk): Split blocks also in generational-only mode. 5224 * os_dep.c (GC_unmap_gap): Don't really use munmap. 5225 52262009-08-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5227 (Mistakenly omitted from last check-in) 5228 5229 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for 5230 not USE_MUNMAP case. 5231 52322009-08-07 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5233 diff111 (supersedes diff101_cvs which, in turn, resembles diff52, 5234 diff75, diff83 partly) 5235 5236 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST, 5237 USE_PROC_FOR_LIBRARIES): Fix typo in the comments. 5238 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC, 5239 PARALLEL_MARK, STATIC): Update the comments. 5240 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro 5241 recognized (only if MPROTECT_VDB). 5242 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB): 5243 Add the comments for. 5244 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH" 5245 environment variable (only if MPROTECT_VDB, if the variable is 5246 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy). 5247 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable. 5248 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for 5249 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in 5250 the future). 5251 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory 5252 space returned to OS (GC_unmapped_bytes). 5253 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the 5254 comments. 5255 * misc.c (GC_get_unmapped_bytes): New API function. 5256 * include/gc.h (GC_get_unmapped_bytes): New API prototype. 5257 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of 5258 "ifdef MSWIN32" one (for Cygwin). 5259 52602009-08-01 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5261 diff100_cvs (diff51 and diff55, partly) 5262 5263 * pthread_support.c (GC_allow_register_threads): New API function. 5264 * win32_threads.c (GC_allow_register_threads): Ditto. 5265 * include/gc.h (GC_allow_register_threads): New API prototype. 5266 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread): 5267 Update the comments. 5268 * pthread_support.c (GC_register_my_thread): Check the collector 5269 is in the multi-threaded mode. 5270 * win32_threads.c (GC_register_my_thread): Ditto. 5271 52722009-07-10 Hans Boehm <Hans.Boehm@hp.com> 5273 5274 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers 5275 instead, following Ivan's original patch. 5276 52772009-06-20 Hans Boehm <Hans.Boehm@hp.com> 5278 5279 * allchblk.c (GC_allochblk_nth): Add assertion. 5280 * checksums.c: Add GC_record_fault, GC_was_faulted, 5281 CC_n_faulted_dirty_errors. 5282 (GC_check_dirty): Remove register declarations, print 5283 dirty bit errors on faulted pages. 5284 * os_dep.c (GC_write_fault_handler): Call GC_record_fault(). 5285 * os_dep.c (GC_remove_protection): Compute index correctly. 5286 52872009-06-12 Hans Boehm <Hans.Boehm@hp.com> 5288 5289 * include/gc_version.h, configure.ac, doc/README: 5290 Change to version 7.2alpha3. 5291 * configure: Regenerate. 5292 5293[7.2alpha2] 5294 52952009-06-12 Hans Boehm <Hans.Boehm@hp.com> 5296 5297 * include/gc_version.h, configure.ac, doc/README: 5298 Change to version 7.2alpha2. 5299 * configure: Regenerate. 5300 53012009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski) 5302 diff98_cvs(resembling diff3, diff27, diff59, diff61, diff66, 5303 diff73 partly) 5304 5305 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf() 5306 calls into a single one (for output atomicity). 5307 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use 5308 GC_finalization_failures variable; check the result of 5309 GC_general_register_disappearing_link() (for lack of memory) 5310 instead. 5311 * finalize.c (GC_finalization_failures): Remove unused global 5312 variable. 5313 * finalize.c (GC_general_register_disappearing_link, 5314 GC_general_register_disappearing_link): Don't update the value of 5315 GC_finalization_failures (since unused). 5316 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK, 5317 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of 5318 word type now (as FIXUP_POINTER requires numeric argument). 5319 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP 5320 requires the first parameter of word type. 5321 * mark.c (PUSH_GRANULE): Ditto. 5322 * mark.c (GC_push_one, GC_push_all_eager): Ditto (for 5323 GC_PUSH_ONE_STACK). 5324 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or 5325 GC_finalizer_notifier directly, instead 5326 of GC_INVOKE_FINALIZERS() to prevent infinite looping. 5327 * include/javaxfc.h: Clarify GC_finalize_all comment. 5328 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not 5329 after) for configuration information. 5330 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment. 5331 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local 5332 variable for NULL before dereferencing it, return GC_oom_fn() in 5333 this case. 5334 * typd_mlc.c (GC_malloc_explicitly_typed, 5335 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to 5336 suppress compiler warning (for uninitialized "lg" variable). 5337 53382009-06-12 Hans Boehm <Hans.Boehm@hp.com> 5339 5340 * win32_threads.c (GC_unregister_my_thread): add false assertion 5341 in unreachable code. 5342 53432009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5344 diff97_cvs (resembling diff43, diff51, diff67, diff76, diff83 partly) 5345 5346 * pthread_support.c (GC_inner_start_routine): Don't release the 5347 GC lock between GC_register_my_thread_inner() and 5348 GC_init_thread_local() calls (post the "registered" even after 5349 calling GC_init_thread_local()). 5350 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread): 5351 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and 5352 acquire the GC lock only once. 5353 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner() 5354 directly instead of GC_register_my_thread() since I_HOLD_LOCK 5355 and our (main) thread is not registered yet (add assertion for it). 5356 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner() 5357 directly instead of GC_lookup_thread() (since I_HOLD_LOCK). 5358 * win32_threads.c (GC_lookup_thread): Remove unused function. 5359 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin". 5360 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro 5361 also if THREAD_LOCAL_ALLOC or GC_PTHREADS. 5362 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS 5363 (for Cygwin). 5364 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&" 5365 (inside GC_ASSERT) to prevent compiler warning. 5366 * win32_threads.c (GC_push_all_stacks): Remove FIXME for 5367 PARALLEL_MARK. 5368 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions 5369 to a place before GC_get_next_stack(). 5370 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same 5371 as in pthread_support.c). 5372 * win32_threads.c (marker_last_stack_min): New static arrays (the 5373 same semantics as for last_stack_min of GC_Thread_Rep). 5374 * win32_threads.c (GC_get_next_stack): Handle marker threads. 5375 * win32_threads.c (GC_mark_thread): Save the current stack pointer 5376 to marker_[b]sp. 5377 * win32_threads.c (start_mark_threads): Initialize 5378 marker_last_stack_min elements (to "unset" value). 5379 53802009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5381 (diff96_cvs, partly from diff45 and diff75) 5382 5383 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers, 5384 GC_set_finalize_on_demand, GC_set_java_finalization, 5385 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq, 5386 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries, 5387 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc): 5388 Change return type to void (these API functions no longer return 5389 the old value). 5390 * include/gc.h: Ditto (for prototypes). 5391 * tests/test.c (main, WinMain, test): Remove explicit cast to void 5392 for GC_set_warn_proc(). 5393 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers, 5394 GC_get_finalize_on_demand, GC_get_java_finalization, 5395 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq, 5396 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries, 5397 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New 5398 API functions (to get the current value of the corresponding R/W 5399 public variables). 5400 * include/gc.h: Ditto (for prototypes). 5401 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor): 5402 Update the comment. 5403 * misc.c (GC_ignore_warn_proc): New API call-back function. 5404 * include/gc.h (GC_ignore_warn_proc): Ditto (for the prototype). 5405 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes, 5406 GC_get_non_gc_bytes): New API setter and getter functions (for the 5407 public GC_find_leak and GC_non_gc_bytes variables, respectively). 5408 * include/gc.h: Ditto (for prototypes). 5409 * include/gc.h (GC_memalign): Add proto to GC API. 5410 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition. 5411 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too, 5412 remove GC_memalign() proto. 5413 * misc.c (GC_write): Use multi-byte (A) variants of Win32 5414 GetModuleFileName() and CreateFile(). 5415 * tests/test.c (main): Replace K&R-style function definition with the 5416 ANSI C one. 5417 54182009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski and 5419 George Talbot) 5420 (diff95_cvs) 5421 5422 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro 5423 recognized (for Linux on ARM32 without glibc). 5424 * include/private/gcconfig.h (STRTOULL): Define for all targets 5425 (define as "strtoul" for most targets except for LLP64/Win64). 5426 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol() 5427 (cast the result to word type) to decode values of "GC_TRACE", 5428 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment 5429 variables. 5430 54312009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly George Talbot) 5432 5433 * include/gc_allocator.h: Add gc_allocator_ignore_off_page. 5434 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page. 5435 54362009-06-11 Hans Boehm <Hans.Boehm@hp.com> 5437 5438 * win32_threads.c (GC_release_mark_lock): Correct misspelling of 5439 AO_load in assertion. 5440 54412009-06-11 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski) 5442 (diff93_cvs: resembling diff27, diff30, diff43, diff44, diff66, 5443 diff76, diff79, diff83 partly) 5444 5445 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads 5446 is defined as FALSE (otherwise the size of dll_thread_table is near 5447 200 KiB for 32-bit). 5448 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC. 5449 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and 5450 backing_store_ptr fields for IA64 support. 5451 * win32_threads.c (GC_register_my_thread_inner): Set 5452 backing_store_end field to reg_base value for IA64 (same as in 5453 pthread_support.c). 5454 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the 5455 "right" places, remove ';'. 5456 * win32_threads.c (GC_fault_handler_lock): Declare only 5457 if MPROTECT_VDB (and not WinCE). 5458 * win32_threads.c (GC_suspend): Acquire and release 5459 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE). 5460 * win32_threads.c (GC_suspend): Define as STATIC. 5461 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier 5462 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp. 5463 * win32_threads.c (GC_push_all_stacks): Convert a group of printf() 5464 calls into a single one (for output atomicity). 5465 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor 5466 before altering its last_stack_min ("thread" variable is added). 5467 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for 5468 "s" is non-NULL. 5469 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack 5470 if WinCE. 5471 * win32_threads.c (GC_get_next_stack): Pass current_min value to 5472 GC_get_stack_min as-is (without -1). 5473 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release" 5474 version of AO_fetch_and_sub1(). 5475 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int 5476 to pointer (and vice versa) thru word type to suppress warnings. 5477 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always 5478 access atomically. 5479 * misc.c: Change GC_THREADS tests back to THREADS. 5480 5481 54822009-06-11 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5483 (diff92_cvs: resembling diff20, diff27, diff34, diff38, diff43, diff45, 5484 diff46, diff56, diff60, diff62, diff74, diff75, diff81 partly) 5485 5486 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert 5487 a group of printf() calls into a single one (for output atomicity). 5488 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq, 5489 GC_set_time_limit): New prototypes. 5490 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq, 5491 GC_set_time_limit): New public setter/getter functions. 5492 * include/gc.h: Fix (and remove outdated) comments for thread-local 5493 allocation. 5494 * include/gc.h: Fix typos in comments. 5495 * misc.c (GC_init_inner, GC_printf): Ditto. 5496 * include/gc.h (GC_unregister_disappearing_link): Refine comment. 5497 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro. 5498 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water, 5499 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS. 5500 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water, 5501 GC_bytes_allocd_at_reset): Define as STATIC. 5502 * misc.c (GC_get_heap_size, GC_get_free_bytes, 5503 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to 5504 avoid data races. 5505 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only). 5506 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS. 5507 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to 5508 set the default initial value of initial_heap_sz. 5509 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS. 5510 * misc.c (GC_init_inner): Fix WARN() format specifier (should be 5511 word-compliant, "%p" is used w/o "0x"). 5512 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET" 5513 environment variable if SMALL_CONFIG. 5514 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment 5515 variable to set initial GC_full_freq value (if not SMALL_CONFIG). 5516 * doc/README.environment (GC_FULL_FREQUENCY): Add information. 5517 * doc/README.environment (GC_MARKERS): Refine information. 5518 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where 5519 possible. 5520 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock). 5521 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs. 5522 * misc.c (GC_abort): Don't define if SMALL_CONFIG. 5523 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf() 5524 (to prevent possible infinite recursion). 5525 55262009-06-09 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5527 diff90_cvs (resembling diff28, diff30, diff32, diff34, diff47, 5528 diff49, diff60, diff62, diff66, diff67, diff68, diff72 partly) 5529 5530 * finalize.c (finalization_mark_proc): Replace K&R-style declaration 5531 with ANSI C one. 5532 * finalize.c (GC_grow_table, GC_register_finalizer_inner, 5533 GC_enqueue_all_finalizers): Remove outdated comments about disabling 5534 signals. 5535 * finalize.c (GC_general_register_disappearing_link): Fix assertion 5536 to catch NULL "obj" value. 5537 * finalize.c (GC_unregister_disappearing_link): Check "link" 5538 alignment before gaining the lock. 5539 * finalize.c (GC_finalize): Refine comment. 5540 * finalize.c (GC_finalize): Fix WARN() format specifier (should be 5541 word-compliant, "%p" is used w/o "0x"). 5542 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before" 5543 variable (to 0) to suppress compiler warning. 5544 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h. 5545 * include/gc_gcj.h: add "extern C" header and tail. 5546 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(), 5547 GC_help_wanted, GC_helper_count, GC_active_count declarations (move 5548 the comments to the place where these symbols are defined in mark.c). 5549 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by 5550 GC_mark_some_inner, if PARALLEL_MARK only). 5551 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count, 5552 GC_active_count, GC_do_parallel_mark): Define as STATIC. 5553 * pthread_support.c (GC_mark_thread): Ditto. 5554 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind, 5555 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr, 5556 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist, 5557 GC_arobjfreelist): Ditto. 5558 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT 5559 for HBLKSIZE to GC_STATIC_ASSERT. 5560 * mark.c (GC_noop): Define for Borland C the same as for Watcom. 5561 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag. 5562 * pthread_support.c (GC_do_blocking_inner): Ditto. 5563 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default 5564 switch branch to suppress compiler warning. 5565 * mark.c (GC_return_mark_stack): Append new-line to printf message. 5566 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL(). 5567 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to 5568 suppress compiler warning. 5569 * pthread_support.c (start_mark_threads): Move the code limiting 5570 "GC_markers" value (and printing a warning) to GC_thr_init(). 5571 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value 5572 if based on the number of CPUs. 5573 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers" 5574 values as one. 5575 * pthread_support.c (GC_register_my_thread_inner): Add a check for 5576 "stack_end" is non-NULL (the same as in win32_threads.c). 5577 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up 5578 with ENOMEM. 5579 * thread_local_alloc.c (return_single_freelist): Convert "for" loop 5580 to "while" one to suppress "possible extraneous ';'" warning. 5581 55822009-06-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski 5583 and Zoltan Varga) 5584 5585 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32. 5586 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32 5587 (Darwin only). 5588 * include/private/gcconfig.h: Add machine-specific part for DARWIN. 5589 * include/private/gcconfig.h (ARM32): Define config parameters for 5590 DARWIN (iPhone). 5591 55922009-06-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5593 (diff91_cvs: resembling diff3, diff27, diff33, diff45, diff47, diff49, 5594 diff60, diff67, diff68 partly) 5595 5596 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR, 5597 GC_TIME_LIMIT): New macros (used to control the default initial 5598 values of GC_full_freq variable, GC_dont_expand, 5599 GC_free_space_divisor, GC_time_limit respectively). 5600 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced 5601 with GC_TIME_LIMIT in alloc.c). 5602 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection): 5603 Define as STATIC. 5604 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Ditto. 5605 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection): 5606 Move the prototypes to alloc.c, make STATIC. 5607 * include/private/gc_priv.h (GC_push_current_stack, 5608 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes 5609 (move the comments to the places where these functions are defined). 5610 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define 5611 as STATIC. 5612 * alloc.c (GC_timeout_stop_func, GC_stopped_mark, 5613 GC_print_heap_sects): Convert a group of printf() calls into 5614 a single one (for output atomicity). 5615 * mark_rts.c (GC_print_static_roots): Ditto. 5616 * alloc.c (GC_stopped_mark): Output blank line (when logging) for 5617 convenience to delimit collections. 5618 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS; 5619 make "frames" local variable volatile (to prevent optimization). 5620 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark, 5621 GC_finish_collection, GC_allocobj): Remove outdated comments about 5622 disabling signals. 5623 * include/private/gc_priv.h (GC_register_displacement_inner, 5624 GC_gcollect_inner): Ditto. 5625 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark, 5626 GC_finish_collection): Initialize "start_time" local variable (to 0) 5627 to suppress compiler warning. 5628 * mark_rts.c (GC_add_roots_inner): Ditto (for "old" variable). 5629 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef". 5630 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world, 5631 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder, 5632 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace 5633 K&R-style function prototypes with ANSI C one. 5634 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for 5635 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()). 5636 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused 5637 macros. 5638 * include/private/gc_priv.h (GC_noop): Declare for Borland C the 5639 same as for Watcom. 5640 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag. 5641 56422009-06-04 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5643 (diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49, 5644 diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81 5645 partly) 5646 5647 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove 5648 outdated comment about disabling signals. 5649 * mallocx.c (GC_malloc_uncollectable, 5650 GC_malloc_atomic_uncollectable): Ditto. 5651 * os_dep.c: Ditto. 5652 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change): 5653 Add ARGSUSED tag. 5654 * pthread_stop_world.c (GC_suspend_handler, 5655 GC_suspend_handler_inner): Ditto. 5656 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message. 5657 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default 5658 switch branch to suppress compiler warning. 5659 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort(). 5660 * include/private/darwin_semaphore.h (sem_init): Ditto. 5661 * include/javaxfc.h: Replace "GC_H" with "_GC_H". 5662 * include/private/dbg_mlc.h (GC_has_other_debug_info, 5663 GC_store_debug_info): Replace K&R-style function prototypes with ANSI 5664 C one. 5665 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc, 5666 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto. 5667 * include/private/pthread_support.h (GC_stop_init): Ditto. 5668 * include/private/gcconfig.h: Refine comment about setting 5669 GC_stackbottom. 5670 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the 5671 "right" places. 5672 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment 5673 for "stack_end" field. 5674 * mallocx.c (GC_malloc_uncollectable, 5675 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk". 5676 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting 5677 GC_mem_top_down to MEM_TOP_DOWN for debug purposes). 5678 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN() 5679 format specifier (should be word-compliant, "%p" is used w/o "0x"). 5680 * pthread_stop_world.c (GC_suspend_handler_inner): Ditto. 5681 * os_dep.c (GC_dirty_init): Append new-line to printf messages. 5682 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message. 5683 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT. 5684 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define 5685 as STATIC. 5686 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that 5687 "thread_blocked" is not set for the current thread. 5688 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning. 5689 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to 5690 suppress compiler warning. 5691 56922009-06-02 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5693 (adding last bit of diff86_cvs) 5694 5695 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef. 5696 56972009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5698 (diff26) 5699 5700 * win32_threads.c: restructure parallel marking mutex initialization. 5701 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c, 5702 pthread_stop_world.c, pthread_support.c: Add runtime conditions 5703 on GC_parallel were appropriate. 5704 * pthread_support.c: Condition marker_bsp on ia64. 5705 (GC_segment_is_thread_stack): Fix loop upper bound. 5706 * reclaim.c: Limit some assertions to PARALLEL_MARK. 5707 * pthread_support.c: Don't acquire mark lock for thread-local 5708 allocation. 5709 * include/private/gc_priv.h: Don't define parallel mark sync 5710 support just for THREAD_LOCAL_ALLOC. 5711 57122009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5713 (diff39) 5714 5715 * include/private/gcconfig.h: refine MINGW32 test. 5716 * mark.c: Add win64/gcc tests. 5717 57182009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5719 (diff86_cvs, resembling diff28, diff32, diff33, diff38, diff68 partly) 5720 5721 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test, 5722 typed_test, run_one_test, check_heap_stats, main, test): Replace 5723 all K&R-style function definitions with ANSI C ones. 5724 * trace_test.c (main): Ditto. 5725 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of 5726 THREAD_LOCAL_ALLOC. 5727 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS 5728 or GC_WIN32_THREADS; remove fork_a_thread() macros definition. 5729 * test.c (reverse_test): Use "volatile" when clearing "b" and "c" 5730 local variables (to suppress "assigned value is never used" 5731 compiler warning). 5732 * test.c (tree_test): Use public GC_noop1() instead of private 5733 GC_noop(). 5734 * test.c (typed_test): Ditto. 5735 * test.c (check_heap_stats): Define and assign value to 5736 "late_finalize_count" local variable only if its value is used 5737 (if FINALIZE_ON_DEMAND defined). 5738 * test.c (main): Remove DJGPP-specific initialization of 5739 GC_stackbottom (not needed anymore, handled in gcconfig.h). 5740 * trace_test.c: Guard #define GC_DEBUG with #ifndef. 5741 * trace_test.c: Include "gc_backptr.h". 5742 * trace_test.c (main): Call GC_INIT(). 5743 * trace_test.c (main): Add "return 0" statement. 5744 57452009-05-25 Hans Boehm <Hans.Boehm@hp.com> (Really Petter Urkedal) 5746 5747 * dyn_load.c (GC_register_dynlib_callback): Use new index j 5748 instead of i in the inner loop. 5749 57502009-05-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5751 (diff85) 5752 5753 * tests/test.c: Increment n_tests with fetch_and_add when possible, 5754 avoiding need to export lock. 5755 57562009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5757 (diff63,diff65) 5758 5759 * include/gc_pthread_redirects.h: 5760 - dlfcn.h is included for dlopen() proto before undefining 5761 "dlopen" (so, it's possible now to include dlfcn.h after 5762 gc.h from user code); 5763 - GC_dlopen() proto is added (except for Darwin as 5764 it's missing there); 5765 - "dlopen" is explicitly undefined (before its redefinition). 5766 * include/gc.h: 5767 - "process.h" is included besides "windows.h" 5768 (for _beginthreadex/_endthreadex); win32 only. 5769 - GC_NO_THREAD_DECLS is moved to the right place 5770 (before closing "extern C"). 5771 * pthread_support.c: Fix out of memory handling for Thread_Reps. 5772 * win32_threads.c: Don't include process.h on winCE, 5773 improve out of memory handling for thread structures, don't 5774 define GC_beginthreadex and GC_endthreadex for winCE. 5775 57762009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski 5777 (diff71) 5778 5779 * tests/test.c: Change gcj vtable decriptor type from size_t to 5780 GC_word. 5781 57822009-05-22 Hans Boehm <Hans.Boehm@hp.com> 5783 5784 * gcj_mlc.c: Add comment. 5785 * tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default. 5786 Run reverse_test a second time in each thread.Add comments. 5787 Don't rely on AO_fetch_and_add. 5788 57892009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Largely from Ludovic Cortes) 5790 5791 * dyn_load.c (GC_register_dynlib_callback, 5792 GC_register_dynamic_libraries_dl_iterate_phdr): Add support 5793 for GNU_PT_RELRO relocations. 5794 57952009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5796 (diff61) 5797 5798 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced 5799 by GC_SOLARIS_THREADS. 5800 * include/gc.h: Improve finalizer documentation. 5801 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32. 5802 * pthread_stop_world.c, Makefile.dj: Fix typos. 5803 58042009-05-21 Hans Boehm <Hans.Boehm@hp.com> 5805 5806 * win32_threads.c (GC_new_thread): Make first_thread 5807 visible to the whole file. 5808 (UNPROTECT): New macro. 5809 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect 5810 thread structures before writing. 5811 (GC_suspend): Acquire GC_fault_handler_lock before suspending 5812 thread. 5813 * os_dep.c: export GC_fault_handler_lock. 5814 (GC_remove_protection): Check if already unprotected. 5815 58162009-05-20 Hans Boehm <Hans.Boehm@hp.com> (really Ivan Maidanski) 5817 5818 * doc/README.win32: Add OpenWatcom warning. 5819 * include/private/gcconfig.h: Really check it in. 5820 58212009-05-19 Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidanski, Dave Korn) 5822 5823 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's 5824 code from gcc version. 5825 * os_dep.c: make gc compilable (optionally) for Cygwin with 5826 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file). 5827 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC. 5828 * mark.c (GC_noop): fix declaration definition mismatch for DMC. 5829 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for 5830 Watcom (Win32 only). It works. 5831 58322009-05-07 Hans Boehm <Hans.Boehm@hp.com> (and Mark Sibly) 5833 5834 * mach_dep.c: Don't use __builtin_unwind_init for register 5835 state on PowerPC/Darwin. 5836 58372009-04-24 Hans Boehm <Hans.Boehm@hp.com> 5838 5839 * doc/gcdescr.html: Improve description of object freelist 5840 structure. 5841 * include/private/gc_priv.h: Fix comment for _size_map. 5842 58432009-03-16 Hans Boehm <Hans.Boehm@hp.com> 5844 5845 * os_dep.c (GC_linux_stack_base): Relax sanity test. 5846 58472009-03-11 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 5848 5849 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for 5850 MARK_BIT_PER_OBJ): Add missing backslash before eoln. 5851 58522009-02-28 Hans Boehm <Hans.Boehm@hp.com> 5853 5854 * misc.c (GC_set_warn_proc): Implicitly intialize GC on 5855 non-Cygwin win32. 5856 58572009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Really Petr Krajca) 5858 5859 * configure.ac: Enable thread-local allocation for sparc-linux. 5860 * configure: Regenerate. 5861 58622009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5863 5864 * alloc.c (GC_try_to_collect): Remove duplicate initialization 5865 check. 5866 * malloc.c (GC_generic_malloc): Remove lw to eliminate single- 5867 threaded warnings. 5868 * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto. 5869 58702009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidansky) 5871 5872 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c, 5873 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c, 5874 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c, 5875 thread_local_alloc.c. 5876 * misc.c: Refine comment. 5877 58782009-02-28 Hans Boehm <Hans.Boehm@hp.com> 5879 5880 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME 5881 comment. 5882 58832009-02-28 Hans Boehm <Hans.Boehm@hp.com> (With input from Ivan Maidansky) 5884 5885 * win32_threads.c (GC_push_stack_for): Yet another attempt 5886 at the stack_min finding logic. Try to clean up the existing code 5887 while minimizing VirtualQuery calls. 5888 (GC_win32_start_inner): Register thread before GC_printf. 5889 Produce more output with DEBUG_THREADS. 5890 *include/gc.h: Update obsolete comments. 5891 58922009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5893 5894 * tests/test.c: 5895 (gcj_class_struct2): Use cast instead of l suffix. 5896 Cast GetLastError to int in various places. 5897 Avoid unused result warning from incr/decr macros. 5898 Add cast for fake_gcj_mark_proc. 5899 Cast GC_gc_no to unsigned in printf. 5900 59012009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5902 5903 * include/gc.h: Fix two typos in comments. 5904 59052009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5906 5907 * finalize.c: Fix typo in comment. 5908 59092008-12-03 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5910 5911 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj 5912 with lock. 5913 59142008-12-01 Hans Boehm <Hans.Boehm@hp.com> 5915 5916 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks 5917 if we are checking for leaks. 5918 59192008-11-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky) 5920 5921 * win32_threads.c: Remove mark lock spinning. 5922 * win32_threads.c, pthread_support.c: Update GC_unlocked_count, 5923 GC_spin_count, and GC_block_count using atomic operations. 5924 * tests/test.c: Declare n_tests as AO_t only if we have threads. 5925 59262008-11-11 Hans Boehm <Hans.Boehm@hp.com> 5927 (Really almost entirely Ivan Maidansky) 5928 5929 * win32_threads.c: Support PARALLEL_MARK. Make printf arg 5930 types agree with format specifiers. Add missing copyright header. 5931 Add STATIC for GC_threads. 5932 * include/private/gcconfig.h: Add FIXME comment. 5933 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with 5934 AO_fetch_and_add1_full. Declare n_tests as AO_t. 5935 (WinMain): Don't call GC_use_DllMain. 5936 with PARALLEL_MARK or THREAD_LOCAL_ALLOC. 5937 59382008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5939 5940 * alloc.c (GC_try_to_collect_inner): Don't print redundant 5941 GC_bytes_allocd and GC_gc_no. 5942 (GC_stopped_mark): Print average world stop time. 5943 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast. 5944 59452008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky) 5946 5947 * misc.c, doc/README.environment: Add support for 5948 GC_FREE_SPACE_DIVISOR and GC-disable-incremental. 5949 * include/gc.h: Make GC_set_free_space_divisor correspond to 5950 (somewhat unfortunate) reality. 5951 59522008-11-07 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5953 5954 (Mostly improves LLP64 support.) 5955 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c, 5956 misc.c, reclaim.c: Changed some int and long type to word or size_t 5957 (and vice versa where appropriate) 5958 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h, 5959 include/private/thread_local_alloc.h, mark.c, 5960 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate 5961 casts to word type when casting from int to pointer (or pointer 5962 to int, or data pointer to code pointer) - just to remove the 5963 corresponding compiler warning. 5964 * ptr_chck.c (GC_is_visible): cast int const to word type to 5965 prevent left shift overflow. 5966 * os_dep.c: change the type of GC_mem_top_down global variable 5967 (containing a flag) to DWORD. 5968 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS 5969 is defined on SunOS x86_64. 5970 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround 5971 for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug 5972 (the compiler gets hung if invoked with -Ox -D 5973 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS) 5974 * backgraph.c: cast GC_gc_no value to unsigned short when 5975 assigned/compared to height_gc_no field of back_edges. 5976 * os_dep.c (GC_remove_protection): Add ARGSUSED. 5977 * win32_threads.c (GC_thread_exit_proc): Remove unused local 5978 variable. 5979 * mark.c (GC_check_dirty): Move declaration out of func body. 5980 59812008-11-06 Hans Boehm <Hans.Boehm@hp.com> 5982 5983 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation. 5984 * include/gc.h (GC_register_my_thread): Improve comment. 5985 59862008-11-04 Hans Boehm <Hans.Boehm@hp.com> 5987 5988 * Makefile.direct: Add comment for -DCHECKSUMS. 5989 59902008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 5991 5992 * thread_local_alloc.c, include/private/thread_local_alloc.h: 5993 Fix typos in comments. 5994 * finalize.c: Declare mark_procs and GC_register_finalizer_inner 5995 STATIC. 5996 * malloc.c (GC_free): Move size calculation below assertion. 5997 59982008-10-27 Hans Boehm <Hans.Boehm@hp.com> 5999 6000 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack): 6001 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions. 6002 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support. 6003 60042008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Thanks to Klaus Treichel) 6005 6006 * finalize.c (GC_general_register_disappearing_link): Add 6007 assertion. 6008 * malloc.c (GC_generic_malloc): Round lb to granules, not words. 6009 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to 6010 granules, not words. 6011 60122008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Really Rex Dieter and 6013 Petr Krajca) 6014 6015 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux. 6016 * configure.ac: Define mach_dep for sparc-linux. 6017 * configure: Regenerate. 6018 60192008-10-25 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky) 6020 6021 * mark_rts.c (GC_approx_sp): Use volatile to avoid common 6022 warning. 6023 60242008-10-25 Hans Boehm <Hans.Boehm@hp.com> 6025 6026 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument 6027 order. 6028 60292008-10-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6030 6031 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c, 6032 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h, 6033 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h, 6034 include/javaxfc.h, include/private/gc_locks.h, 6035 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c, 6036 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c, 6037 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c 6038 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations. 6039 * test.c: Remove some old K&R code. 6040 60412008-10-24 Hans Boehm <Hans.Boehm@hp.com> 6042 (Partially based loosely on patch from Ivan Maidanski) 6043 6044 * win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep): 6045 Add last_stack_min. (GC_push_stack_for): Use last_stack_min. 6046 (GC_get_next_stack): Add limit argument, use_last_stack_min. 6047 (GC_suspend): make stack_base assignment conditional. 6048 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to 6049 GC_get_next_stack. 6050 * configure_atomic_ops.sh: Remove. 6051 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32, 6052 Makefile.direct: Partially support build directories whose path 6053 name contains blanks. 6054 * Makefile.am: Support new files (build_atomic_ops.sh, 6055 build_atomic_ops.sh.cygwin) 6056 * Makefile.in: Regenerate. 6057 60582008-10-21 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6059 6060 * include/private/gc_locks.h, include/private/gc_pmark.h, 6061 include/private/gc_priv.h, include/private/gcconfig.h, 6062 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c, 6063 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c: 6064 Fix comments. 6065 60662008-10-21 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6067 6068 * pthread_support.c: Comment out LOCK_STATS. 6069 * include/gc.h: Fix comments. 6070 60712008-10-20 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6072 6073 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin. 6074 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin. 6075 * os_dep.c (GC_get_main_stack_base): Use alternate definition 6076 with USE_MMAP. 6077 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin. 6078 60792008-10-20 Hans Boehm <Hans.Boehm@hp.com> 6080 6081 * doc/README: Make it clearer when Makefile.direct is assumed. 6082 * cord/cord.am: install include/cord.h. 6083 * Makefile.in: Regenerate. 6084 60852008-09-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6086 6087 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner): 6088 Remove unused variables. 6089 * darwin_stop_world.c: Always declare GC_thr_init(). 6090 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if 6091 SHORT_DBG_HDRS is defined. 6092 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel 6093 mark, USE_MARK_BITS version): Refer to correct parameter name. 6094 60952008-09-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski) 6096 6097 * finalize.c (GC_general_register_disappearing_link): Remove 6098 redundant code. 6099 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed. 6100 * os_dep.c: (GC_write_fault_handler): Remove remaining 6101 references to deleted variable "code". Remove redundant 6102 FREEBSD definitions. 6103 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when 6104 defined for X86. (STATIC): Define as "static" with NO_DEBUGGING. 6105 61062008-09-24 Hans Boehm <Hans.Boehm@hp.com> 6107 6108 * include/private/gc_priv.h: Update MAX_HEAP_SECTS. 6109 61102008-09-10 Hans Boehm <Hans.Boehm@hp.com> 6111 6112 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with 6113 smashed string, (GC_debug_free_inner): Mark as free. 6114 * mallocx.c (GC_malloc_many): Always clear new block if 6115 GC_debugging_started. 6116 * reclaim.c: Move GC_debugging_started from 6117 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(), 6118 which is also called directly. 6119 * doc/README: Fix spelling error. Update license summary. 6120 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts. 6121 * tests/test.c: Don't define GC_DEBUG if already defined. 6122 61232008-08-27 Hans Boehm <Hans.Boehm@hp.com> 6124 6125 * doc/simple_example.html: update --enable-full-debug reference, 6126 Make HTML formatting standards compliant. 6127 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs. 6128 * doc/gcinterface.html: specify encoding. 6129 61302008-08-27 Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi) 6131 6132 * doc/simple_example.html: Update thread-local allocation 6133 description. 6134 61352008-08-26 Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi) 6136 6137 * configure.ac: Check for gc-debug earlier; replace remaining 6138 full-debug tests. 6139 * configure: Regenerate. 6140 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr): 6141 Use signed offset type. Use ptr_t internally. 6142 * doc/gcinterface.html: Update LOCAL_MALLOC description. 6143 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386: 6144 Fix full-debug reference. 6145 * include/gc.h: Rewrite GC_..._INCR and friends. 6146 * tests/test.c: Minimally test GC_..._INCR and friends. 6147 61482008-08-21 Hans Boehm <Hans.Boehm@hp.com> 6149 6150 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty, 6151 GC_push_next_marked_uncollectable): Never invoke GC_push_marked 6152 on free hblk. 6153 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE. 6154 (GC_header_cache_miss): Always blacklist pointers for free 6155 hblks. Add assertion and comment. 6156 * pthread_support.c (GC_register_my_thread): Fix #if indentation. 6157 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested. 6158 Delete it. 6159 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion. 6160 61612008-08-21 Hans Boehm <Hans.Boehm@hp.com> 6162 6163 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments. 6164 61652008-08-01 Hans Boehm <Hans.Boehm@hp.com> (Really Klaus Treichel) 6166 6167 * configure.ac: Set win32_threads on MinGW. 6168 * configure: Regenerate. 6169 61702008-07-25 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski) 6171 6172 Ivan's description of the patch follows. Note that a few pieces like 6173 the GC_malloc(0) patch, were not applied since an alternate had been 6174 previously applied. A few differed stylistically from the rest of 6175 the code (mostly casts to void * instead of target type), 6176 or were classified as too minor to bother. Note that 6177 all of Ivan's static declarations which did not correct outright 6178 naming bugs (as a few did), where replaced by STATIC, which is 6179 ignored by default. 6180 6181 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for 6182 GC_malloc(0)); 6183 - addition of missing getter/setter functions for public variables 6184 (may be useful if compiled as Win32 DLL); 6185 - addition of missing GC_API for some exported functions; 6186 - addition of missing "static" declarator for internal functions 6187 and variables (where possible); 6188 - replacement of all remaining K&R-style definitions with ANSI 6189 C ones (__STDC__ macro is not used anymore); 6190 - addition of some Win32 macro definitions (that may be missing in 6191 the standard headers supplied with a compiler) for GWW_VDB mode; 6192 - elimination of most compiler warnings (except for 6193 "uninitialized data" warning); 6194 - several typos correction; 6195 - missing parenthesis addition in macros in some header files of 6196 "libatomic_ops" module. 6197 6198 My highlights based on reading the patch: 6199 6200 * allchblk.c: Remove GC_freehblk_ptr decl. 6201 Make free_list_index_of() static. 6202 * include/gc.h: Use __int64 on win64, define GC_oom_func, 6203 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc, 6204 add getter and setters: GC_get_gc_no, GC_get_parallel, 6205 GC_set_oom_fn, GC_set_finalize_on_demand, 6206 GC_set_java_finalization, GC_set_dont_expand, 6207 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect, 6208 GC_set_finalizer_notifier. Always define GC_win32_free_heap. 6209 gc_config_macros.h: Define _REENTRANT after processing 6210 GC_THREADS. 6211 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test, 6212 handling of operator new[] for old Windows compilers. 6213 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses 6214 around arguments. 6215 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs. 6216 * mark.c (GC_mark_and_push_stack): Fix source argument for 6217 blacklist printing. 6218 * misc.c: Fix log file naming based on environment variable 6219 for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor 6220 just return current value with 0 argument. Add DONT_USE_USER32_DLL. 6221 Add various getters and setters as in gc.h. 6222 * os_dep.c: Remove no longer used GC_disable/enable_signals 6223 implementations. (GC_get_stack_base): Add pthread_attr_destroy 6224 call. No longer set GC_old_bus_handler in DARWIN workaround. 6225 * pthread_support.c: GC_register_my_thread must also 6226 call GC_init_thread_local. 6227 62282008-07-21 Hans Boehm <Hans.Boehm@hp.com> 6229 6230 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT. 6231 * mach_dep.c: Include signal.h. 6232 * gc_priv.h: Factor out INLINE declaration. 6233 62342008-07-03 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Thiemo Seufer) 6235 6236 * include/private/gcconfig.h: Update MIPS/LINUX config. 6237 * doc/gcdescr.html: Fix typo. 6238 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext 6239 for MIPS/LINUX. 6240 62412008-05-30 Hans Boehm <Hans.Boehm@hp.com> (some really dmcmahill) 6242 6243 * configure.ac: SPARC fixes. 6244 * configure: Regenerate. 6245 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include 6246 size 0, except for gcj. 6247 * doc/gc.man: Expand C++ cautions. 6248 * include/gc_inline.h: Fix comments. 6249 62502008-05-03 Hans Boehm <Hans.Boehm@hp.com> 6251 6252 * include/gc_version.h, configure.ac, doc/README: 6253 Change to version 7.2alpha1. 6254 * configure: Regenerate. 6255 6256[7.1] 6257 62582008-05-03 Hans Boehm <Hans.Boehm@hp.com> 6259 6260 * include/gc_version.h, configure.ac, doc/README: 6261 Change to version 7.1. 6262 * configure: Regenerate. 6263 62642008-05-03 Hans Boehm <Hans.Boehm@hp.com> 6265 6266 * doc/gcinterface.html: Improve C++ interface documentation. 6267 62682008-03-10 Hans Boehm <Hans.Boehm@hp.com> 6269 6270 * allchblk.c (GC_allochblk): Check for overflow during size 6271 rounding. 6272 * tests/huge_test.c: New. 6273 * Makefile.direct, tests/tests.am: Add huge_test.c 6274 * Makefile.in: Regenerate. 6275 62762008-02-29 Hans Boehm <Hans.Boehm@hp.com> 6277 6278 * pthread_support.c: Fix typo in comment. 6279 * os_dep.c (GC_win32_get_mem): Add heap section only if 6280 allocation succeeded. 6281 62822008-02-28 Hans Boehm <Hans.Boehm@hp.com> 6283 6284 * malloc.c: (free replacement) Fix caller address space check. 6285 62862008-02-25 Hans Boehm <Hans.Boehm@hp.com> 6287 6288 * finalize.c (GC_grow_table): Dereference table in null-check. 6289 62902008-02-24 Hans Boehm <Hans.Boehm@hp.com> 6291 6292 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): 6293 Consistently call CloseHandle. (GC_suspend): Call 6294 GC_delete_gc_thread. 6295 * tests/test.c: Don't reference GC_print_stats if not exported. 6296 62972008-02-20 Hans Boehm <Hans.Boehm@hp.com> 6298 6299 * tests/test.c (run_one_test): Don't mention pthread_self(). 6300 * misc.c: Declare GC_thr_init(). 6301 63022008-02-20 Hans Boehm <Hans.Boehm@hp.com> 6303 6304 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP, 6305 and refine assertions to handle huge unmergable blocks. 6306 (GC_allochblk_nth): Add comment. 6307 63082008-02-20 Hans Boehm <Hans.Boehm@hp.com> 6309 6310 * include/private/gcconfig.h: Add missing FREEBSD macro 6311 consistency test. 6312 63132008-02-20 Hans Boehm <Hans.Boehm@hp.com> 6314 6315 * allchblk.c (GC_enough_large_bytes_left): No longer take 6316 parameters; return free list index bound. 6317 (GC_merge_unmapped): Don't access nexthdr until after null test. 6318 (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate 6319 when splitting is allowable only once here, not when considering each 6320 block. (GC_allchblk_nth): Accept new may_split parameter. 6321 Avoid some redundant tests for exact size matches. 6322 * alloc.c (GC_should_collect): Cache min_bytes_allocd. 6323 (GC_maybe_gc): Make locking assertion testable. 6324 * mark_rts.c: Fix indentation. 6325 * pthread_stop_world.c: Replace old GC_err_printf1 reference. 6326 * tests/test.c: Remove (void) casts. Optionally print some 6327 timing information. 6328 63292008-02-15 Hans Boehm <Hans.Boehm@hp.com> 6330 6331 * windows-untested/gc.def: Remove CreateThread line. 6332 * windows-untested/README: New file. 6333 * win32_threads.c (GC_use_DllMain): Force collector initialization. 6334 (GC_init_parallel): Reformat comment. 6335 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment. 6336 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code. 6337 * include/gc_cpp.h: Add matching placement delete overloads 6338 everywhere. 6339 * include/private/gc_locks.h (NO_THREAD): Add cast. 6340 * include/private/gcconfig.h: Add test for __HP_aCC. 6341 * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX. 6342 * Makefile.in, configure: Regenerate. 6343 63442008-02-11 Hans Boehm <Hans.Boehm@hp.com> (partly David Leonard) 6345 6346 * doc/README.win32: Fix typo. 6347 * configure.ac: Fix printing of enable-shared result. 6348 * configure: Regenerate. 6349 63502008-02-08 Hans Boehm <Hans.Boehm@hp.com> 6351 6352 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when 6353 defined. (GC_call_with_stack_base): Add GC_API. 6354 * os_dep.c (GC_get_stack_base): Add GC_API. 6355 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread): 6356 Add GC_API. 6357 * include/gc.h: Add GC_API annotations. 6358 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for 6359 PCR. 6360 * include/private/gc_pmark.h: Fix comments. 6361 63622008-02-06 Hans Boehm <Hans.Boehm@hp.com> (mostly from Henning Makholm) 6363 6364 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c: 6365 Add GC_push_typed_structures() to push GC_ext_descriptors. 6366 63672008-01-31 Hans Boehm <Hans.Boehm@hp.com> (mostly from Andreas Tobler) 6368 6369 * tests/test.c: Call GC_INIT for DARWIN; test system type using 6370 gcconfig.h-defined macros. 6371 63722008-01-29 Hans Boehm <Hans.Boehm@hp.com> 6373 6374 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create 6375 blocks large enough that their size, when interpreted as a signed 6376 value, would be negative. 6377 * include/private/gc_priv.h: Comment hb_sz range limit. 6378 63792008-01-29 Hans Boehm <Hans.Boehm@hp.com> (with help from Manuel Serrano) 6380 6381 * mark.c (GC_push_next_marked): correct comment. 6382 * Makefile.direct: document NO_PROC_STAT. 6383 * include/private/gcconfig.h: Accomodate NO_PROC_STAT. 6384 63852008-01-10 Hans Boehm <Hans.Boehm@hp.com> 6386 6387 * include/gc_version.h, configure.ac, doc/README: 6388 Change to version 7.1alpha3. 6389 * configure: Regenerate. 6390 6391[7.1alpha2] 6392 63932008-01-10 Hans Boehm <Hans.Boehm@hp.com> 6394 6395 * include/gc_version.h, configure.ac, doc/README: 6396 Change to version 7.1alpha2. 6397 * configure: Regenerate. 6398 63992008-01-10 Hans Boehm <Hans.Boehm@hp.com> 6400 6401 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S 6402 again. Refer to build directory as ".". 6403 * Makefile.in: Regenerate. 6404 64052008-01-10 Hans Boehm <Hans.Boehm@hp.com> 6406 6407 * configure.ac: Ignore --enable-parallel-mark on Darwin for now. 6408 * configure: Regenerate. 6409 * darwin_stop_world.c: Add FIXME comment for parallel marker. 6410 64112008-01-09 Hans Boehm <Hans.Boehm@hp.com> 6412 6413 * include/private/gc_priv.h: Update MAX_ROOT_SETS 6414 and LOG_PHT_ENTRIES to handle larger heaps. 6415 64162008-01-03 Hans Boehm <Hans.Boehm@hp.com> 6417 6418 * include/gc.h (GC_INIT,GC_init): Update comments. 6419 64202008-01-03 Hans Boehm <Hans.Boehm@hp.com> (based on a patch from 6421 John Bowman, and an ancient patch from Fergus Henderson) 6422 6423 * allchblk.c, alloc.c, include/private/gc_priv.h: 6424 Track GC_bytes_dropped and use in GC triggering decisions. 6425 * alloc.c (min_bytes_allocd): Weight atomic blocks less. 6426 64272008-01-02 Hans Boehm <Hans.Boehm@hp.com> 6428 6429 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER 6430 adjusting p. 6431 64322007-12-23 Hans Boehm <Hans.Boehm@hp.com> 6433 6434 * Makefile.am: Add NT_X64_THREADS_MAKEFILE. 6435 64362007-12-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Friedrich Dominicus) 6437 6438 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment. 6439 * alloc.c: Add declaration for GC_add_current_malloc_heap. 6440 * win32_threads.c (GC_beginthreadex): Clean up error 6441 return code. 6442 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct: 6443 Add NT_X64_THREADS_MAKEFILE. 6444 64452007-12-21 Hans Boehm <Hans.Boehm@hp.com> 6446 6447 * alloc.c: Define GC_version instead of in version.h. 6448 * version.h: Remove. 6449 * include/gc_version.h: Move most of version.h here. 6450 * include/gc.h: Include gc_version.h. 6451 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h. 6452 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am: 6453 Adjust for version.h rename. 6454 * Makefile.in: Regenerate. 6455 64562007-12-21 Hans Boehm <Hans.Boehm@hp.com> (Really mostly russ sludge dot net) 6457 6458 * configure.ac: Put libatomic_ops links in build directory. 6459 * configure: Regenerate. 6460 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S 6461 as nodist sources. 6462 64632007-12-20 Hans Boehm <Hans.Boehm@hp.com> 6464 6465 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS, 6466 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS. 6467 64682007-12-20 Hans Boehm <Hans.Boehm@hp.com> 6469 6470 * alloc.c: Deal correctly with address wrapping for 6471 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr. 6472 * finalize.c, include/gc.h (GC_register_disappearing_link, 6473 GC_register_finalizer_inner): Improve out-of-memory handling. 6474 * include/private/gc_pmark.h: Fix comment spelling. 6475 64762007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really mainly Peter Wang) 6477 6478 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable 6479 in other contexts. 6480 64812007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really Radek Polak) 6482 6483 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc. 6484 64852007-12-18 Hans Boehm <Hans.Boehm@hp.com> 6486 6487 * gc_cpp.cc: Don't include gc_cpp.h from local directory. 6488 64892007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really Adam Megacz) 6490 6491 * allchblk.c, configure.ac (add --enable-munmap) 6492 * configure: Regenerate. 6493 64942007-12-10 Andreas Tobler <a.tobler@schweiz.org> 6495 6496 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro 6497 GC_GETSECTBYNAME instead. 6498 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the 6499 architecture (Darwin). 6500 65012007-10-24 Hans Boehm <Hans.Boehm@hp.com> 6502 6503 * reclaim.c (GC_bytes_found): Expand comment. 6504 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass 6505 granules, not bytes, to GC_FAST_MALLOC_GRANS. 6506 * include/gc.h: Never include gc_local_alloc.h. 6507 * tests/test.c: Add size zero allocation tests. 6508 65092007-10-23 Hans Boehm <Hans.Boehm@hp.com> 6510 6511 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation. 6512 * allchblk.c: Sanity check GC_max_large_allocd_bytes. 6513 65142007-10-23 Hans Boehm <Hans.Boehm@hp.com> (Really Manuel Serrano) 6515 6516 * Makefile.direct: Invoke $(MAKE) instead of make. 6517 65182007-10-23 Hans Boehm <Hans.Boehm@hp.com> 6519 6520 * doc/scale.html: Reflect gc7 thread local allocation behavior. 6521 65222007-10-23 Hans Boehm <Hans.Boehm@hp.com> (really Petter Urkedal) 6523 6524 * include/extra/gc.h, include/extra/gc_cpp.h: New. 6525 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include 6526 again. 6527 * Makefile.in: Regenerate. 6528 65292007-08-15 Hans Boehm <Hans.Boehm@hp.com> (really Samuel Thibault) 6530 6531 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN) 6532 for HURD. 6533 65342007-08-14 Hans Boehm <Hans.Boehm@hp.com> (really David Daney) 6535 6536 * include/private/gcconfig.h: Add Linux/mips-64 support. 6537 65382007-08-14 Hans Boehm <Hans.Boehm@hp.com> (really mostly Samuel Thibault) 6539 6540 * dbg_mlc.c: Use random() on all glibc systems. 6541 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on 6542 HURD. Add comment. 6543 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accomodate 6544 systems without SA_SIGINFO. 6545 65462007-08-14 Hans Boehm <Hans.Boehm@hp.com> (partly really Henrik Theiling) 6547 6548 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses. 6549 * tests/test.c (run_one_test): Add GC_PTR_STORE test. 6550 No longer test for RS6000. 6551 65522007-08-03 Hans Boehm <Hans.Boehm@hp.com> 6553 6554 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h: 6555 Maintain GC_our_memory and GC_n_memory. 6556 * dbg_mlc.c (GC_print_smashed_obj): Improve message. 6557 (GC_print_all_smashed_proc): Pass client object address instead of 6558 base. 6559 * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries): 6560 Register sections that are contiguous and merged with our heap. 6561 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name 6562 of libraries. 6563 * malloc.c (calloc): Check for special callers even with 6564 USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary 6565 malloc/free tracing. 6566 * misc.c: No longer call GC_init_lib_bounds explicitly. 6567 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always 6568 initialize on demand. 6569 * tests/test.c: Call GC_INIT only when required. 6570 65712007-08-03 Hans Boehm <Hans.Boehm@hp.com> 6572 6573 * Makefile.direct: Remove comment fragment. 6574 * tests/tests.am: Add smashtest. 6575 * Makefile.in: Regenerate. 6576 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc. 6577 * configure: Regenerate. 6578 * pthread_support.c: Fix comment spelling. 6579 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with 6580 GC_LINUX_THREADS and REDIRECT_MALLOC. 6581 * tests/smash_test.c: Initial check-in. 6582 * obj_map.c: Print log entry to correct file. 6583 * include/private/thread_local_alloc.h: Add TlsAlloc error check. 6584 65852007-07-23 Hans Boehm <Hans.Boehm@hp.com> 6586 6587 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap() 6588 while world is still running. 6589 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap() 6590 with world stopped. 6591 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots. 6592 * misc.c (GC_init/GC_init_inner): Perform all work in 6593 GC_init_inner. 6594 * Makefile.direct: Expand -DUSE_MUNMAP comment. 6595 65962007-07-23 Hans Boehm <Hans.Boehm@hp.com> (really Jim Marshall) 6597 6598 * include/gc.h: Define uintptr_t explicitly for VC++6. 6599 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't 6600 exist. 6601 66022007-07-02 Hans Boehm <Hans.Boehm@hp.com> 6603 6604 * version.h, configure.ac, doc/README: Change to version 7.1alpha1. 6605 * configure: Regenerate. 6606 66072007-07-02 Hans Boehm <Hans.Boehm@hp.com> 6608 6609 * version.h, configure.ac, doc/README: Change to version 7.0. 6610 * configure: Regenerate. 6611 66122007-07-02 Hans Boehm <Hans.Boehm@hp.com> 6613 6614 * include/gc_config_macros.h: Also check for IA64 when setting 6615 GC_HPUX_THREADS. 6616 * mallocx.c: Change my_bytes_allocd to signed_word. 6617 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads 6618 (as opposed to pthreads) support. 6619 66202007-07-02 Hans Boehm <Hans.Boehm@hp.com> 6621 6622 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() 6623 on ARM/Linux. Check getcontext() return value. 6624 66252007-06-29 Hans Boehm <Hans.Boehm@hp.com> 6626 6627 * backgraph.c (per_object_func): Make argument types consistent. 6628 (GC_traverse_back_graph): Mark GC_deepest_obj. 6629 66302007-06-29 Hans Boehm <Hans.Boehm@hp.com> 6631 6632 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t. 6633 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option. 6634 66352007-06-28 Hans Boehm <Hans.Boehm@hp.com> 6636 6637 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst 6638 anachronisms. 6639 * dyn_load.c: Partially support cygwin, but don't enable it yet. 6640 66412007-06-28 Hans Boehm <Hans.Boehm@hp.com> 6642 6643 * Makefile.am: Use -no-undefined for libgc. 6644 * Makefile.in: Regenerate. 6645 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES. 6646 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot 6647 consistently. 6648 * misc.c: Fix some WARN calls. Move GC_is_initialized setting and 6649 GC_thr_init() call. 6650 * os_dep.c: Consistently use WARN where appropriate. 6651 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead 6652 remove inappropriate pthread.h include. 6653 * doc/README.linux: Remove some anachronisms. 6654 66552007-06-23 Hans Boehm <Hans.Boehm@hp.com> 6656 6657 * alloc.c: Also use GC_check_tls on non-Linux systems. 6658 * mallocx.c (GC_reclaim_generic): Remove bogus declaration. 6659 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly 6660 with prototype. 6661 66622007-06-19 Hans Boehm <Hans.Boehm@hp.com> 6663 6664 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment. 6665 (GC_print_heap_sects): Use size_t instead of unsigned long. 6666 * thread_local_alloc.c (GC_lookup_thread): Define in the correct 6667 context. 6668 * win32_threads.c, include/gc_config_macros.h: The last of Romano 6669 Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h. 6670 * include/gc_inline.h: Avoid gc_priv.h dependencies. 6671 * tests/test.c (check_heap_stats): Replace unsigned long with size_t. 6672 66732007-06-12 Hans Boehm <Hans.Boehm@hp.com> 6674 6675 * aclocal.m4: Regenerate to update date. 6676 66772007-06-10 Hans Boehm <Hans.Boehm@hp.com> 6678 6679 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv. 6680 * mark_rts.c (GC_push_roots): Fix kind type. 6681 66822007-06-06 Hans Boehm <Hans.Boehm@hp.com> 6683 6684 * doc/README.win64: New file. 6685 * doc/doc.am, Makefile.direct: Add README.win64. 6686 * Makefile.in: Regenerate. 6687 66882007-06-06 Hans Boehm <Hans.Boehm@hp.com> 6689 6690 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE. 6691 * Makefile.in: Regenerate. 6692 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags. 6693 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c, 6694 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c, 6695 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c, 6696 win32_threads.c, cord/de_win.c, include/gc_mark.h, 6697 include/private/gc_hdrs.h, include/private/gc_pmark.h, 6698 include/private/gc_priv.h, tests/test_cpp.cc: 6699 Replace old style function declarations. Clean up integral types. 6700 Remove register declarations. The change in malloc.c and the 6701 "int descr" declaration in mark.c are the most likely to have 6702 been real bugs outside of win64. 6703 * msvc_dbg.c: Disable on win64. 6704 * win32_threads.c: Add AMD64 support. 6705 * include/gc.h: no backtrace on AMD64 for now. 6706 67072007-06-06 Hans Boehm <Hans.Boehm@hp.com> 6708 6709 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s. 6710 67112007-06-06 Hans Boehm <Hans.Boehm@hp.com> 6712 6713 * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions. 6714 Don't include windows.h in an extern "C" context. 6715 * include/private/gcconfig.h: Fix win64/X86_64 configuration. 6716 * tests/test.c: Eliminate more old style function definitions. 6717 Cleanup pointer and integer casts for win64. 6718 * tests/test_cpp.cc: Don't include gc_priv.h. 6719 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005. 6720 * NT_X64_STATIC_THREADS_MAKEFILE: New. 6721 67222007-06-06 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca) 6723 6724 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore 6725 FINISHED threads for suspension. (GC_pthread_join): Add 6726 pthread_self() cast. (GC_pthread_start_inner): Execute cleanup 6727 handler when popping it. 6728 * include/private/gc_locks.h: Inline THREAD_EQUAL for 6729 GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have 6730 pthreads. 6731 67322007-05-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca) 6733 6734 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c, 6735 tests/test.c: Accomodate GC_WIN32_PTHREADS. 6736 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS. 6737 * include/gc_config_macros.h: Define both PTHREADS and 6738 GC_WIN32_THREADS. 6739 * include/private/gc_locks.h: Nonstandard definitions of 6740 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS. 6741 * doc/README.win32, Makefile.direct: Include documentation 6742 for GC_WIN32_PTHREADS. 6743 * Makefile.direct: Remove some anachronisms in the documentation. 6744 67452007-05-23 Hans Boehm <Hans.Boehm@hp.com> 6746 6747 * Makefile.am: Move includes to bottom. Add better library 6748 dependencies. Increment library version. Remove "SUBDIRS += .". 6749 * cord/cord.am, tests/tests.am: Add better library dependencies. 6750 Remove now unnecessary dependencies. 6751 * Makefile.in: Regenerate. 6752 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread): 6753 Move to define on all Windows platforms. (_beginthread): define 6754 to generate error if used. 6755 67562007-05-22 Hans Boehm <Hans.Boehm@hp.com> 6757 6758 * include/private/gc_locks.h: Format to 80 columns. 6759 67602007-05-22 Hans Boehm <Hans.Boehm@hp.com> 6761 6762 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC. 6763 * NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars 6764 rc. 6765 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded 6766 case. 6767 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER. 6768 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail. 6769 * include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API. 6770 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare. 6771 * tests/test.c: Add GC_reachable_here() call. 6772 67732007-05-21 Hans Boehm <Hans.Boehm@hp.com> 6774 6775 * alloc.c (GC_try_to_collect): Call GC_init if necessary. 6776 * tests/thread_leak_test.c: Don't unconditionally define 6777 GC_LINUX_THREADS. 6778 67792007-05-21 Andreas Tobler <a.tobler@schweiz.org> 6780 6781 * Makefile.am: Remove extra_ldflags_libgc definition. 6782 * Makefile.in: Regenerate. 6783 67842007-05-17 Hans Boehm <Hans.Boehm@hp.com> 6785 6786 * include/private/gc_priv.h: Define AO_REQUIRE_CAS. 6787 67882007-05-16 Hans Boehm <Hans.Boehm@hp.com> 6789 6790 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void 6791 value. 6792 67932007-05-15 Hans Boehm <Hans.Boehm@hp.com> 6794 6795 * configure.ac, version.h, doc/README: Change version to 7.0alpha10. 6796 * configure: Regenerate. 6797 6798[7.0alpha9 release] 6799 68002007-05-15 Hans Boehm <Hans.Boehm@hp.com> 6801 6802 * configure.ac, version.h, doc/README: Change version to 7.0alpha9. 6803 * configure: Regenerate. 6804 68052007-05-15 Hans Boehm <Hans.Boehm@hp.com> 6806 6807 * Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist. 6808 * Makefile.in: Regenerate. 6809 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add: 6810 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now 6811 unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update. 6812 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use 6813 NUMERIC_THREAD_ID, THREAD_EQUAL. 6814 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove. 6815 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on 6816 ARM. 6817 68182007-05-11 Hans Boehm <Hans.Boehm@hp.com> 6819 6820 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's 6821 GC_debug_register_finalizer_unreachable() patch from gcc tree. 6822 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions 6823 to check GC has been initialized. 6824 68252007-05-10 Hans Boehm <Hans.Boehm@hp.com> 6826 6827 * include/gc_cpp.h: Documentation updates. 6828 * include/gc_config_macros.h: Don't check for __ppc__ to set 6829 DARWIN_THREADS. 6830 * Makefile.am: Include configure_atomic_ops.sh in dist. 6831 * Makefile.in: Regenerate. 6832 68332007-05-08 Hans Boehm <Hans.Boehm@hp.com> 6834 6835 * Makefile.am: Don't distribute copied atomic_ops files. Include 6836 libatomic_ops with "make dist". 6837 * Makefile.in: Regenerate. 6838 * configure: Regenerate. 6839 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads. 6840 * win32_threads.c: Report error for Cygwin + GC_DLL. 6841 68422007-05-08 Hans Boehm <Hans.Boehm@hp.com> 6843 6844 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation. 6845 * cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove 6846 MakeProcInstance anachronism. 6847 * doc/README.macros: Officially remove elif prohibition. 6848 Remove documentation for defunct SRC_M3 support. 6849 * include/gc.h: Remove more SRC_M3 references. 6850 * include/private/gcconfig.h: Remove still more SRC_M3 references. 6851 GC_SOLARIS_THREADS no longer needs to be checked separately. 6852 68532007-05-08 Hans Boehm <Hans.Boehm@hp.com> 6854 6855 * thread_local_alloc.c, include/private/thread_local_alloc.h: 6856 Spell __declspec correctly. 6857 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation. 6858 68592007-05-07 Hans Boehm <Hans.Boehm@hp.com> 6860 6861 * doc/README.win32: Adjust GC_win32_dll_threads rules again. 6862 68632007-05-07 Hans Boehm <Hans.Boehm@hp.com> 6864 6865 * mark.c (GC_mark_some wrapper): Restructure for readability, handle 6866 GC_started_thread_while_stopped. 6867 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed. 6868 * win32_threads.c: (client_has_run): remove, 6869 GC_started_thread_while_stopped, GC_attached_thread: add. 6870 (GC_push_all_stacks): Add verbose output. 6871 (DllMain): Avoid initializing collector or the like. 6872 Never update both thread tables. 6873 * doc/README.win32: Adjust GC_win32_dll_threads rules. 6874 68752007-05-07 Hans Boehm <Hans.Boehm@hp.com> 6876 6877 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with 6878 GC_PRINT_VERBOSE_STATS. 6879 68802007-05-01 Hans Boehm <Hans.Boehm@hp.com> 6881 (and Manuel Serrano, Craig McDaniel) 6882 6883 * configure.ac: Comment out redundant 6884 AC_DEFINE(NO_EXECUTE_PERMISSION). 6885 * configure: Regenerate. 6886 * sparc_mach_dep.S: Remove single quote in comment. 6887 * include/private/gcconfig.h: Fix DATAEND for NONSTOP. 6888 * win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain. 6889 (GC_use_DllMain): Fix assertion. 6890 68912007-02-14 Andreas Tobler <a.tobler@schweiz.org> 6892 6893 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin. 6894 * configure: Regenerate. 6895 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc. 6896 * Makefile.in: Regenerate. 6897 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin 6898 targets. Remove comments. 6899 Prepare ppc64 support for Darwin. 6900 69012007-01-29 Andreas Tobler <a.tobler@schweiz.org> 6902 6903 * darwin_stop_world.c: Clean up and reformat code. 6904 69052007-01-28 Andreas Tobler <a.tobler@schweiz.org> 6906 6907 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings. 6908 Make i unsigned. 6909 (GC_stop_world): Likewise. Remove unused GC_thread p. 6910 (GC_start_world): Likewise. 6911 6912 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern. 6913 Remove double SIG_HNDLR_PTR definition. 6914 (GC_forward_exception): Fix compiler warnings, make i unsigned. 6915 Initialize thread_state to NULL. 6916 (catch_exception_raise): Fix compiler warnings, make i unsigned. 6917 69182007-01-25 Petr Salinger and Hans Boehm <Hans.Boehm@hp.com> 6919 6920 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant): 6921 also define for X86_64. 6922 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case. 6923 * configure: Regenerate. 6924 * README.changes: Point to ChangeLog. 6925 69262007-01-25 Andreas Tobler <a.tobler@schweiz.org> 6927 6928 * darwin_stop_world.c: Move THREAD_FLD defines to ... 6929 * include/private/gc_priv.h: ... here. 6930 Fix THREAD_STATE definitions for ppc64. 6931 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member 6932 access. 6933 69342007-01-18 Andreas Tobler <a.tobler@schweiz.org> 6935 6936 * os_dep.c (if defined(MPROTECT_VDB) && defined(DARWIN)): Clean up and 6937 reformat code. 6938 Correct email reference. 6939 69402007-01-11 Andreas Tobler <a.tobler@schweiz.org> 6941 6942 * configure.ac (i?86*-*-darwin*): Replaced HAS_I386_THREAD_STATE_* with 6943 HAS_X86_THREAD_STATE32_*. 6944 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with 6945 HAS_X86_THREAD_STATE64_*. 6946 Added value 1 in the above AC_DEFINE's. Important for the upcoming 6947 Leopard. 6948 * configure: Regenerated. 6949 * include/private/gcconfig.h: Modified X86_64 define for Darwin. 6950 Removed __x86_64__ check in POWERPC section. Added base definitions 6951 for the X86_64 Darwin port. 6952 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION 6953 to distinguish between 32 and 64-bit applications. Added definitions 6954 for X86_64 Darwin. 6955 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And 6956 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX. 6957 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the 6958 !DARWIN_DONT_PARSE_STACK. Maybe obsolete. 6959 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER. 6960 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION. 6961 Distinguish between getsectbynamefromheader_64 and 6962 getsectbynamefromheader. 6963 * os_dep.c (catch_exception_raise): Introduce exception definition for 6964 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with 6965 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr. 6966 69672007-01-09 Andreas Tobler <a.tobler@schweiz.org> 6968 6969 * libtool.m4: Update to version from libtool-1.5.22. 6970 * ltmain.sh: Likewise. 6971 * ChangeLog: Created. 6972 6973See doc/README.changes for earlier changes. 6974