1
2== [7.4.4] 2016-05-25 ==
3
4* Allow GC_FAST_MALLOC_GRANS() multiple use in a function.
5* Also enable the TSX workaround for i386 (Linux).
6* Avoid unstructured procfs on Solaris.
7* Change cord/de main() declaration style from K-R to ANSI C.
8* Change no-argument functions declaration style to ANSI C (cord).
9* Do not include sigcontext.h and asm/sigcontext.h.
10* Eliminate 'divide by zero' compiler warning in cordtest.
11* Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32).
12* Eliminate warnings detected by Cppcheck in cord de[_win].
13* Fix 'comparison of non-null parameter is always false' warning (Clang).
14* Fix 'CORD_iter5 unused result' code defect in cordxtra.
15* Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning.
16* Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode).
17* Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map.
18* Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map.
19* Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize.
20* Fix 'statement unreachable' compiler warning in GC_mark_from.
21* Fix 'statement unreachable' compiler warning in memalign.
22* Fix 'unused label' compiler warning in cord/de.
23* Fix 'value truncated' compiler warning in CORD_cat (MS VC).
24* Fix 'variable unused' warning in GC_save_callers.
25* Fix 'visibility attribute not supported' GCC warning (IBM AIX).
26* Fix CMake warning about CMP0054 by unquoting instances of HOST.
27* Fix Cygwin64 build.
28* Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL.
29* Fix Makefile.direct for Cygwin.
30* Fix __alloc_size__ availability detection (Clang).
31* Fix abort message in GC_move_long_link.
32* Fix and code refactoring of lock elision workaround (Linux/x64).
33* Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID.
34* Fix data race in GC_init_explicit_typing.
35* Fix gc.mak regarding msvc_dbg and test (MSVC).
36* Fix missing error handling of pthread_attr_init/getstacksize.
37* Fix missing error handling of pthreads_mutex_init and cond_wait.
38* Fix missing numeric casts in cord.
39* Fix potential left shift overflows in finalize.c (64-bit targets).
40* Fix pthreads-win32 name in comments and documentation.
41* Fix setup_mark_lock missing prototype.
42* Fix unchecked fcntl() result.
43* Fix unchecked pointer dereference in check_ints (gctest).
44* Fix unchecked pthread_join() result in threadkey_test.
45* Fix unchecked sigdelset() result in pthread_support.
46* Fix undefined PTRFREE/NORMAL in gc_inline.h.
47* Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header.
48* Relax mark_mutex attribute needed to disable elision (Linux/x64).
49* Remove (deprecate) TODO file.
50* Remove code duplication in GC_realloc.
51* Remove duplicate new-line in OUT_OF_MEMORY message (cord).
52* Remove references to missing linux_threads.c from documentation.
53* Revert "Move asm machine-dependent files to 'src' folder" (partly).
54* Support Android API level 21.
55* Update compiler options in gc.mak (Win32).
56* Use mmap instead of sbrk (Hurd).
57* Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS.
58* Workaround 'identical expr on both sides of bitwise op' warning.
59* Workaround Linux NTPL lock elision bug.
60* Workaround false warning about unreachable code path.
61* Workaround invalid '_end' symbol on Android clang 3.5+.
62Also, includes 7.2g changes.
63
64
65== [7.4.2] 2014-06-03 ==
66
67* Add config option to use STGRTMIN-based signals for thread suspend/resume.
68* Allow parallel mark to be enabled on powerpc-linux systems.
69* Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer).
70* Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc.
71* Fix 'attribute declaration must precede definition' warning (clang-3.1).
72* Fix (enable) Cygwin-64 build.
73* Fix GC_finalized_malloc failure on disclaim_test.
74* Fix GC_sig_suspend initialization when non-constant SIGRTMIN used.
75* Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC.
76* Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32).
77* Fix data roots registration for Android/x86 and NDK ARM 'gold' linker.
78* Fix find stackbottom on BlueGene P/Q systems.
79* Fix machdep .lo files path in configure (SPARC, IA-64).
80* Fix ok_init assignment (missing cast) in GC_new_kind_inner.
81* Fix typos in names in AUTHORS and ChangeLog files.
82* Remove barrett_diagram file duplicated by tree.html.
83* Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram.
84* Restore contribution information for ancient releases in ChangeLog.
85Also, includes 7.2f changes.
86
87
88== [7.4.0] 2013-11-17 ==
89
90* Add 'bytes reclaimed' counters to public GC_prof_stats_s.
91* Add AArch64 (64-bit ARM) target support.
92* Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality.
93* Add GC_get_prof_stats[_unsafe]() to GC public API.
94* Add GC_push_all/conditional() to GC public API.
95* Add assertion on number_of_objs to GC_extend_size_map.
96* Add assertion to GC_enable() ensuring no counter underflow.
97* Add assertion to LOCK definition that lock is not already held.
98* Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR.
99* Add double-lock assertion to GC_acquire_mark_lock.
100* Add manual POSIX fork handling support (Android).
101* Add note about 'pkg-config' solving problem with autoconf 2.68 or older.
102* Add public GC_set/get_abort_func to replace default GC_on_abort.
103* Add public GC_start_mark_threads() to allow parallel marker in fork child.
104* Add public setter and getter for GC_push_other_roots.
105* Add support of Android logger.
106* Add tests for GC_register/move/unregister_long_link.
107* Add thread suspend/resume signals public setters (POSIX threads).
108* Added long weakref support.
109* Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h.
110* Adjust README.md title and references to doc .html files in it.
111* Adjust build scripts to enable additional test library in staticrootstest.
112* Adjust logged messages in start_mark_threads and GC_thr_init.
113* Adjust printf format specifiers in GC_print_trace.
114* Allow not to rely on __data_start value (Linux).
115* Allow pthread_kill error code logging in GC_suspend/resume (debugging).
116* Allow to compile GC_inner_start_routine aside from extra/gc.c.
117* Allow to omit libc atexit() call.
118* Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target.
119* Better document GC_warn_proc in gc.h.
120* Call GC_on_abort (with NULL argument) on exit(1).
121* Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats.
122* Change policy regarding version numbers ("micro" part instead of "alpha").
123* Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style.
124* Check GC_base result in GC_print_all_smashed_proc.
125* Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads).
126* Check traceable_allocator.allocate result before dereference in test_cpp.
127* Code refactoring of GC_x_printf (move shared code to macro).
128* Convert readme to markdown.
129* Default to use libc_stack_end in single-threaded GC on glibc targets.
130* Define GC_VSNPRINTF internal macro in misc.c (code refactoring).
131* Define functions in darwin_semaphore.h as inline instead of static.
132* Define old_bus_handler static variable only if used (Unix).
133* Detect dladdr() presence by configure.
134* Disable find-leak GC_gcollect on GC abnormal EXIT.
135* Do not define _setjmp/_longjmp macros in mach_dep.c.
136* Do not duplicate android_log_write output to GC log file (Android).
137* Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux).
138* Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled.
139* Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified.
140* Elaborate comment on dependencies in autogen.sh.
141* Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots.
142* Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang).
143* Eliminate 'uninitialized variable use' warning in test_printf (cord).
144* Eliminate 'unused result' compiler warning in main() of test_cpp.
145* Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads).
146* Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX).
147* Eliminate Clang warning for GC_pthread_exit attribute.
148* Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth.
149* Eliminate GCC warning in GC_get_main_stack_base (OpenBSD).
150* Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app.
151* Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion.
152* Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux).
153* Eliminate warning and simplify expression in GC_init_explicit_typing.
154* Enable 'force GC at every GC_malloc' debug-related functionality.
155* Enable on-demand debug logging in GC_FindTopOfStack (Darwin).
156* Enable prefetch operations by default (GCC 3.0+).
157* Enable staticrootstest for the case of GC shared library build.
158* Enable thread-local allocation support for Clang on Cygwin.
159* Explicitly specify that Darwin, Linux and Solaris platforms have dladdr.
160* Fix ABORT definition for mingw32ce (WinCE).
161* Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1.
162* Fix GC_CreateThread and GC_beginthreadex definition for Cygwin.
163* Fix GC_INIT_CONF_ROOTS in gc.h for Android.
164* Fix GC_INLINE definition to comply with ISO C90 standard (GCC).
165* Fix GC_remove_all_threads_but_me for Android (fork support).
166* Fix debug_register_displacement calls from GC_debug_generic_malloc_inner.
167* Fix dyn_load.c compilation for Android 4.3.
168* Fix make disclaim_test to link with new GNU ld linking rules.
169* Improve GC error printing atomicity in GC_debug_X and GC_print_obj.
170* Improve GC output atomicity in GC_print_obj, GC_print_all_errors.
171* Improve debug-only messages of add/remove_roots and init_linux_data_start.
172* Improve fork test logging in gctest.
173* Improve logged messages about heap size and usage.
174* Improve logging for Android differentiating messages by log level.
175* Improve staticrootstest (add global data to library, add lib w/o GC_INIT).
176* Improve staticrootstest checks (tests).
177* Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H.
178* Include proper header file in 'tools' for configuration macros.
179* Include pthread_np.h from pthread_stop_world.c on OpenBSD.
180* Log error messages to stderr instead of stdout in tests.
181* Make GC_generic_malloc_ignore_off_page() public.
182* Make GC_mark_lock_holder variable static.
183* Make GC_print_trace always thread-safe and remove 'lock' argument.
184* Mark GC_started_thread_while_stopped() as GC_INNER.
185* Minimize code duplication in GC_mark_and_push.
186* Move 'include setjmp.h' from mach_dep.c to gc_priv.h.
187* Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD).
188* Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD.
189* Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer.
190* Port BDWGC to Android/x86.
191* Postpone the suspend signal in GC_dirty_init only if used to stop world.
192* Prepend '#' symbol to GC number in logged messages.
193* Prevent POSIX fork if mprotect_thread is started (Darwin).
194* Prevent abort on GC_err/warn_printf write failure.
195* Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac.
196* Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined.
197* Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC).
198* Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h.
199* Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android).
200* Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h.
201* Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD.
202* Remove DebugBreak on WriteFile failure (Win32).
203* Remove GC_BUILD definition from build scripts.
204* Remove abort on open log failure from GC_write (Win32).
205* Remove configure.ac outdated revision number.
206* Remove nested EXPECT in GC_core_finalized_malloc.
207* Remove nested always-false ifdef for HPUX and FREEBSD.
208* Remove redundant GC_err_printf before abort.
209* Remove unused UTHREAD_SP_OFFSET macro (OpenBSD).
210* Rename subthread_create to subthreadcreate_test (Makefile).
211* Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages.
212* Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn().
213* Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF.
214* Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world.
215* Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free.
216* Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF.
217* Replace sprintf with defensive snprintf.
218* Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning).
219* Simplify LOCK/UNLOCK macro definition for static code analysis tools.
220* Specify GC_malloc result is unused in some tests.
221* Specify GC_pthread_join result is unused in threadkey_test.
222* Specify LT_INIT in configure.ac.
223* Start of port to QNX.
224* Support rthreads introduced in OpenBSD 5.2+.
225* Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC.
226* Tag GC malloc routines with alloc_size attribute for Clang 3.2+.
227* Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code.
228* Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING.
229* Turn on world-stop delay logging at debug level by default for Android.
230* Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF.
231* Use GC_log_printf for logging instead of GC_[err_]printf.
232* Use compiler TLS for Android NDK gcc/arm.
233* Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning).
234* Use pthread API to operate thread-local data on Linux if no compiler TLS.
235* Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h.
236* Workaround 'unresolved __tls_get_addr' error for Android NDK Clang.
237Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes.
238
239
240== [7.3alpha2] 2012-05-11 ==
241
242* Add 'const' qualifier to pointer argument of some API functions.
243* Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32).
244* Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API.
245* Add GC_is_heap_ptr, GC_move_disappearing_link to GC API.
246* Add SHORT_DBG_HDRS macro template to configure.
247* Add Symbian port to mainline (porting done by Djamel Magri).
248* Add TODO file.
249* Add assertion ensuring proper alignment of 'pushed' GC symbols.
250* Add assertion in GC_getspecific on qtid.
251* Add assertion to GC_incremental_protection_needs, refine documentation.
252* Add assertion to check GC_large_free_bytes by GC_finish_collection.
253* Add configure option to compile all library .c files into single gc.o.
254* Add cordtest to make check.
255* Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM).
256* Add finalization.html to 'doc' folder.
257* Add javaxfc.h to the installation set of GC header files (configure).
258* Add on-heap-resize event notification to API.
259* Adjust GC_log_printf format specifiers (regarding signed/unsigned long).
260* Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given.
261* Allow GC_exclude_static_roots() region start to be unaligned.
262* Allow Win32 DllMain chaining on the client side.
263* Allow to exclude finalization support by GC_NO_FINALIZATION macro.
264* Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin.
265* Avoid unnecessary GC_find_limit invocation if GC_no_dls.
266* Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest.
267* Cast pointers to word (instead of unsigned long) in specific.h.
268* Changed the order in autogen.sh so ltmain exists in time for automake.
269* Declare privately and use handy GC_base_C() for constant object pointers.
270* Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW).
271* Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off.
272* Do not compile backgraph.c unless configure '--enable-gc-debug'.
273* Do not compile pthread_stop_world.c for Cygwin/Darwin (configure).
274* Do not install ancient new_gc_alloc.h broken for modern STL (configure).
275* Enable GC_MIN_MARKERS to set minimal number of pthread-based markers.
276* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure.
277* Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32).
278* Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation).
279* Extend thread-related debug messages.
280* Fix 'configure --enable-cplusplus' for Cygwin/MinGW.
281* Fix DATASTART (and other minor improvements) for NaCl target.
282* Fix GC_setspecific to prevent garbage collection inside.
283* Fix compiler warning in cordtest.
284* Fix minor warnings reported by GCC with '-pedantic' option.
285* Fix static data roots registration on Android (if GC is shared).
286* Implement GC_get_stack_base for Darwin for single-threaded mode.
287* Improve GC_allochblk algorithm of block splitting when unmapping enabled.
288* Improve GC_collect_or_expand algorithm for many finalizers registered case.
289* In tests, print a message in case a test is a no-op.
290* Instruct configure to hide internal libgc.so symbols if supported by GCC.
291* Log amount of unmapped memory (if enabled) on marking-for-collection.
292* Make __data_start a weak symbol to allow loading modules on mips.
293* Move "cord" library tests to "cord/tests" folder.
294* Move asm machine-dependent files to "src" folder.
295* Move build tools sources to "tools" folder.
296* Move cord_pos.h to public headers folder.
297* Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin).
298* Optimize some functions by moving pthread_self calls out of LOCK section.
299* Place only major per-release changes description to ChangeLog (this file).
300* Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin).
301* Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default.
302* Remove all auto-generated files from the repo.
303* Remove binary icon file for de_win.
304* Remove cordtest from "cord" library.
305* Remove duplicate MacOS_Test_config.h file.
306* Remove gc_amiga_redirects.h (included internally) from public headers.
307* Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure).
308* Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX.
309* Remove unsupported MMAP_STACKS (specific to Solaris threads).
310* Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros.
311* Replace ARGSUSED comment-based annotation with GCC 'unused' attribute.
312* Replace GC_ms_entry declaration with opaque definition for public API.
313* Replace long GC_markers global variable with int GC_markers_m1.
314* Replace pointer relational comparisons with non-pointer ones.
315* Replace printf PRIxMAX specifier with '%p' for thread id debug output.
316* Require autoconf 2.61 instead of v2.64.
317* Simplify autogen.sh (use autoreconf).
318* Split GC_abort with GC_on_abort and abort() invoked from ABORT.
319* Support GC_ATTR_MALLOC for MS VisualStudio.
320* Tag auxiliary malloc-like API functions with 'malloc' attribute.
321* Tag deprecated variables in GC API.
322* Tag must-be-non-null arguments of GC API functions.
323* Turn on "extra" GCC warnings.
324* Turn on unused-parameter checking for GCC.
325* Update AUTHORS file.
326* Use EXPECT for checking various 'initialized' boolean variables.
327* Use USE_COMPILER_TLS on Cygwin.
328* Use pthread_key for thread-local storage on FreeBSD.
329* Use union of AO_t and word to favor strict-aliasing compiler optimization.
330Also, includes 7.2 changes.
331
332
333== [7.2g] 2016-05-23 ==
334
335* Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC).
336* Fix 'implicit declaration of function' compiler warnings in cord/de.
337* Fix CFLAGS in configure regarding -O flag passing to SunCC compiler.
338* Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD).
339* Fix GC initialization in cord de_win for Cygwin.
340* Fix GC_get_stack_base if called before GC_init (Win32).
341* Fix OSX issue with pthread_attr_setstacksize failure.
342* Fix Unicode Win32 API calls in cord de_win.
343* Fix USE_COMPILER_TLS macro duplicate description in README.
344* Fix cord de_win WndProc prototype parameters for 64-bit (Win64).
345* Fix file descriptor resource leak in GC_register_data_segments (OS/2).
346* Fix filename printing in cordtest.
347* Fix missing cord_pos.h, ec.h among installed headers (Automake).
348* Fix missing GC_get_stack_base for Amiga.
349* Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake).
350* Fix mistyped ARM_THREAD_STATE macro (Darwin/arm).
351* Fix null-pointer dereferences on out-of-memory in cord and tests.
352* Fix potential multiplication overflow in check_heap_stats (gctest).
353* Fix race (and potential deadlock) at marker threads initialization.
354* Fix signedness of char values passed to isspace, iscntrl, isxdigit.
355* Fix typo (items numbering) in GC_finalize_all documentation.
356* Fix typos in ERROR_FL, GC_malloc_uncollectable comments.
357* Fix typos in gc_priv.h, in README for ews4800.
358* Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC).
359* Fix various spelling errors.
360* Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX.
361* Regenerate configure files using official libtool release (v2.4.2).
362* Remove documentation about obsolete GC_REDIRECT_TO_LOCAL.
363* Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from.
364* windows-untested: Fix paths to msvc_dbg.c/h.
365
366
367== [7.2f] 2014-06-03 ==
368
369* Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2.
370* Fix 'source file in a subdirectory' Automake warnings.
371* Fix ABORT message in GC_restart_handler.
372* Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD.
373* Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES.
374* Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap.
375* Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure.
376* Fix GET_MEM argument rounding in GC_scratch_alloc and similar.
377* Fix PARALLEL_MARK for Windows 7+.
378* Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc.
379* Fix crash when using GC_malloc_many() as first allocation call.
380* Fix mark stack excessive growth during parallel mark.
381* Fix or remove broken URLs in documentation.
382* Fix out-of-memory case in new_back_edges, push_in_progress (backgraph).
383* Fix typo in GC_collect_or_expand comment.
384* Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes.
385* Regenerate configure files by automake 1.14.1, libtool 2.4.2.418.
386* Update emails/links due to project site and ML transition.
387
388
389== [7.2e] 2013-11-10 ==
390
391* Add weak attribute to avoid __data_start undefined messages (s390x).
392* Add weak stubs for pthread_cancel API.
393* Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads).
394* Append _test suffix to 'initsecondarythread' binary file names.
395* Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure.
396* Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads).
397* Fix GC_CreateThread 'dwStackSize' argument type for Win64.
398* Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32).
399* Fix GC_clear_stack by declaring 'dummy' local array as volatile.
400* Fix GC_get_stack_base assembly code (Cygwin/Clang).
401* Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations.
402* Fix GC_marker_Id elements initialization (WinCE).
403* Fix GC_print_trace missing unlock.
404* Fix GC_unix_mmap_get_mem for open of /dev/zero failure.
405* Fix GC_win32_free_heap compilation error for Cygwin.
406* Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC.
407* Fix Win32 GC_write preventing potential infinite recursion at abort.
408* Fix assertion violation in GC_mark_from prefetch loop.
409* Fix collection of objects referenced only from GC_mark_stack_X variables.
410* Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32).
411* Fix heap sections overflow for Win32/Cygwin with enabled parallel marker.
412* Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj.
413* Fix missing tabs in SMakefile.amiga file.
414* Fix null-pointer dereference in CORD_substr_closure.
415* Fix old_segv/bus_act variables initialization for FreeBSD.
416* Fix potential double fclose in test_extras (cordtest).
417* Fix pthread_attr_t resource leak in pthread_create.
418* Fix race in GC_print_all_errors regarding GC_leaked.
419* Fix sizeof in GC_push_thread_structures.
420* Fix stackbottom/stack_end assignment in GC_call_with_gc_active.
421* Fix tests makefile to link with new GNU ld linking rules.
422* Fix typos in comments and documentation.
423* Fix unportable '==' test operators in configure.
424* Fix vsprintf_args cleanup in CORD_vsprintf.
425* Merge FreeBSD New ports collection for boehm-gc v7.2d.
426* Replace GC_DBG_RA with GC_DBG_EXTRAS macro.
427* Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file.
428* Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86).
429
430
431== [7.2d] 2012-08-09 ==
432
433* Fix GC_call_with_stack_base to prevent its tail-call optimization.
434* Fix all address-of-dummy operations by using GC_approx_sp() instead.
435* Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD.
436* Fix test_cpp (ensure the collector recognizes pointers to interiors).
437* Fix thread-related tests for pthreads-w32.
438* test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW).
439
440
441== [7.2c] 2012-06-11 ==
442
443* Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory.
444* Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release.
445* Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV.
446* Fix visibility of GC_clear/set_mark_bit (unhide symbols).
447* Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols.
448
449
450== [7.2b] 2012-05-23 ==
451
452* Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only).
453
454
455== [7.2] 2012-05-11 ==
456
457* Abort in GC_thr_init on pthread_atfork failure (POSIX threads).
458* Add GC_WIN32_PTHREADS target in configure.
459* Add GC_is_disabled new function to GC API.
460* Add info that getcontext() resets FPE mask no longer on Linux/x86_64.
461* Add public GC_set_handle_fork to control forked child handling support.
462* Add realloc_test.c test.
463* Add support for Hexagon target.
464* Add thread-safe GC_get_heap_usage_safe to GC API.
465* Change GC_check_fl_marks prototype and implementation.
466* Check pthread_create/join result in test.
467* Define GC_DLL (in configure) if building only dynamic libraries.
468* Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set.
469* Disable incremental mode on Darwin if fork handling requested.
470* Enable parallel marker in configure for Solaris.
471* Fix "comparison of signed and unsigned values" compiler warnings.
472* Fix 'volatile' keyword placement in GC_SysVGetDataStart.
473* Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target.
474* Fix GC_READ_ENV_FILE code for Cygwin.
475* Fix GC_add_roots_inner for Mac OS X (align segment start).
476* Fix GC_check_fl_marks regarding concurrent access.
477* Fix GC_finalizer_nested size to workaround alignment problem in Watcom.
478* Fix GC_find_limit_with_bound to always reset fault handler on return.
479* Fix GC_init static assertion for clang/x64 (Darwin).
480* Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection.
481* Fix GC_push_all/selected boundaries check.
482* Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32).
483* Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage.
484* Fix GC_restart_handler to preserve errno if needed.
485* Fix GC_root_size update in GC_add_roots_inner (Win32).
486* Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32).
487* Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init).
488* Fix calloc, GC_generic_malloc to check for allocation size overflows.
489* Fix compiler warning in GC_dyld_image_add/remove (Darwin).
490* Fix configure --enable-cplusplus make install.
491* Fix configure to disable GCC aliasing optimization unless forced to.
492* Fix duplicate definitions in gcconfig.h for NetBSD.
493* Fix fork() support on Cygwin and Darwin targets.
494* Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS.
495* Fix gc_cpp.cc for Cygwin (remove duplicate function definition).
496* Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android.
497* Fix gcconfig.h to handle mips64-linux target.
498* Fix gctest (for Win32) to avoid GC_print_stats internal variable usage.
499* Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6.
500* Fix tests to check GC_malloc result for NULL (out-of-memory).
501* Fix thread model in configure for MinGW ("win32" instead of "posix").
502* Fix various warnings reported by LINT-like tools.
503* Fix visibility of some GC internal symbols used by GNU GCJ currently.
504* Port some thread tests to Win32.
505* Refine API GC setters and getter comments regarding locking.
506* Refine GC_stackbottom description in gc.h.
507* Remove duplicate calls in GC_register_dynamic_libraries.
508* Remove locking in API GC_get_bytes_since_gc and friends.
509* Remove newly-added GC_get_heap_size/free_bytes_inner from API.
510* Remove some local variables that are unused.
511* Support multi-threading for RTEMS target.
512* Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning.
513* Use pkg-config to pick up libatomic_ops, etc.
514* Workaround some Linux/arm kernels bug to get correct GC_nprocs value.
515
516
517== [7.2alpha6] 2011-06-14 ==
518
519* configure_atomic_ops.sh: Remove.
520* Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
521* Makefile.am (EXTRA_DIST): Add autogen.sh.
522
523* NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
524filename passed.
525* NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
526extension.
527* NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
528* NT_MAKEFILE (.cpp.obj): Likewise.
529
530* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
531GC_traverse_back_graph): Move prototype to gc_priv.h.
532* checksums.c (GC_page_was_ever_dirty): Likewise.
533* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
534* dyn_load.c (GC_parse_map_entry, GC_get_maps,
535GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
536GC_get_next_stack): Likewise.
537* finalize.c (GC_reset_finalizer_nested,
538GC_check_finalizer_nested): Likewise.
539* gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
540* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
541* mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
542* misc.c (GC_register_main_static_data, GC_init_win32,
543GC_setpagesize, GC_init_linux_data_start,
544GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
545GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
546GC_bl_init_no_interiors): Likewise.
547* os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
548Likewise.
549* reclaim.c (GC_check_leaked): Likewise.
550* win32_threads.c (GC_gww_dirty_init): Likewise.
551* darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
552GC_mprotect_resume): Move prototype to darwin_stop_world.h.
553* pthread_support.c (GC_FindTopOfStack): Likewise.
554* dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
555* mark.c (GC_page_was_ever_dirty): Remove (as already declared).
556* mark_rts.c (GC_roots_present): Change return type to void
557pointer (to match the prototype); return NULL instead of FALSE.
558* mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
559* os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
560* os_dep.c (GC_write_fault_handler): Make STATIC.
561* os_dep.c (GC_set_write_fault_handler): New function (only if
562GC_WIN32_THREADS).
563* pthread_start.c (GC_start_rtn_prepare_thread,
564GC_thread_exit_proc): Move prototype to pthread_support.h.
565* pthread_support.c (GC_nacl_initialize_gc_thread,
566GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
567Likewise.
568* pthread_support.c (GC_stop_init): Move prototype to
569pthread_stop_world.h.
570* win32_threads.c (GC_write_fault_handler): Remove prototype.
571* win32_threads.c (GC_register_my_thread_inner): Call
572GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
573(only if MPROTECT_VDB).
574* doc/README.win32: Add information about DMC.
575* include/private/gc_priv.h (GC_set_write_fault_handler): New
576prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
577
578* misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
579
580* win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
581instead of FINISHED macro.
582* tests/test.c (check_heap_stats): Round up max_heap_sz value for
583Win32 (same as for USE_MMAP).
584
585* tests/test.c (check_heap_stats): Adjust printf format specifier
586for max_heap_sz; cast max_heap_sz accordingly.
587
588* doc/README.solaris2: Add note.
589
590* configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
591Solaris/x86 2.10+.
592
593* tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
594defined; explicitly define for some targets.
595
596* mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
597* stubborn.c (GC_dirty): Likewise.
598* include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
599PROC_VDB): Undefine if MANUAL_VDB.
600* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
601MANUAL_VDB.
602* os_dep.c (async_set_pht_entry_from_index): Define for
603MANUAL_VDB.
604* os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
605success; if ioctl() failed then just print warning instead of
606aborting.
607
608* include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
609for line number printing.
610
611* os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
612(for PROC_VDB only); print errors via GC_err_printf; rename "ps"
613and "np" local variables to npages and pagesize, respectively;
614remove "current_addr" local variable.
615
616* os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
617for BeOS and OS/2; define HAVE_GET_STACK_BASE.
618* os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
619GC_get_main_stack_base implementation is defined.
620* os_dep.c (GC_get_main_stack_base): Define that based on
621GC_get_stack_base() in a single place (only if
622GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
623result.
624
625* mark.c (GC_push_selected): Remove "push_fn" argument (use
626GC_push_all directly); update the documentation.
627* mark.c (GC_push_conditional): Simplify the code (for better
628readability).
629
630* mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
631boolean local variables.
632* doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
633* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
634GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
635place.
636* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
637PHT_HASH(h) only once (store result to a local variable).
638
639* doc/README.solaris2: Update.
640
641* include/private/gcconfig.h (end, InitStackBottom): Declare
642extern variable for RTEMS.
643* include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
644Update (for RTEMS).
645* include/private/gcconfig.h (DATAEND): Fix a typo in the macro
646name (for RTEMS).
647* tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
648Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
649
650* include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
651single-threaded environment.
652
653* include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
654* tests/test.c (NUMBER_ROUND_UP): New macro.
655* tests/test.c (check_heap_stats): Round up total expected heap
656size to the nearest 4 MiB bound.
657* tests/test.c (check_heap_stats): Print the current and expected
658heap sizes in case of failure.
659
660* checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
661only if GC_print_stats; print errors using GC_err_printf.
662* checksums.c (GC_check_blocks): Join adjacent printf() calls into
663a single one.
664
665* pthread_support.c (pthread_join): Add assertion (check thread is
666finished).
667* pthread_support.c (GC_register_my_thread): Don't detach the
668thread if invoked from the thread destructor.
669* win32_threads.c (GC_register_my_thread): Likewise.
670* win32_threads.c (GC_unregister_my_thread): Don't delete the
671thread (just set FINISHED) if the thread is not detached (only if
672GC_PTHREADS); add assertion (check the thread is not finished).
673* tests/threadkey_test.c (main): Join some created threads.
674
675* pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
676variable to "t".
677* win32_threads.c (GC_delete_gc_thread): Likewise.
678* pthread_support.c (pthread_join, pthread_detach,
679pthread_cancel): Rename "thread_gc_id" local variable to "t".
680* win32_threads.c (GC_pthread_detach): Likewise.
681* win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
682variable.
683* win32_threads.c (GC_pthread_join): Rename "joinee" local
684variable to "t".
685
686* pthread_stop_world.c (pthread_sigmask): Undefine even if not
687DEBUG_THREADS.
688* pthread_stop_world.c (GC_unblock_gc_signals): New function (only
689if GC_EXPLICIT_SIGNALS_UNBLOCK).
690* pthread_support.c (GC_unblock_gc_signals): New prototype.
691* pthread_support.c (GC_register_my_thread_inner,
692GC_register_my_thread): Call GC_unblock_gc_signals (only if
693GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
694* include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
695macro.
696
697* pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
698"sig" local variables; rename my_thread local variable to "self".
699
700* tests/threadkey_test.c (LIMIT): Use smaller value (don't create
701more than 30 in parallel by default).
702
703* tests/threadkey_test.c (key_once, main): Work around for Solaris
704PTHREAD_ONCE_INIT.
705* tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
706
707* dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
708variable.
709* pthread_support.c (GC_unregister_my_thread_inner): Revert back
710GC_remove_specific invocation; add a comment.
711* include/private/thread_local_alloc.h (GC_remove_specific):
712Revert back.
713* specific.c (slow_getspecific): Cast qtid to AO_t.
714* include/private/specific.h (key_create, setspecific,
715remove_specific): Remove "extern" keyword.
716* include/private/specific.h (getspecific): Change type of "qtid"
717local variable to unsigned long.
718
719* pthread_support.c (GC_check_tls): Fix "#endif" comment.
720* include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
721* include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
722Remove redundant test of the macro.
723
724* backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
725* os_dep.c (GC_set_and_save_fault_handler): Recognize
726SIGACTION_FLAGS_NODEFER_HACK macro.
727* pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
728macro.
729* pthread_support.c (GC_acquire_mark_lock): Remove commented out
730code.
731* include/private/gc_priv.h (SUNOS5SIGS): Don't include
732sys/siginfo.h on Linux.
733* include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
734recognized, force PREFETCH_FOR_WRITE to be defined on x86.
735* include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
736macro recognized (for HP/UX).
737
738* os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
739GWW_VDB).
740* os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
741resetting (for PROC_VDB).
742
743* tests/threadkey_test.c: New file.
744* tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
745* tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
746New variable.
747
748* pthread_support.c (GC_unregister_my_thread_inner): Don't call
749GC_remove_specific.
750* include/private/thread_local_alloc.h (GC_remove_specific):
751Remove (since it is empty for all targets).
752* pthread_support.c (GC_record_stack_base): New inline function.
753* win32_threads.c (GC_record_stack_base): Likewise.
754* pthread_support.c (GC_register_my_thread_inner): Invoke
755GC_record_stack_base.
756* win32_threads.c (GC_register_my_thread_inner): Likewise.
757* pthread_support.c (GC_register_my_thread): If thread is FINISHED
758then call GC_record_stack_base, clear FINISHED, initialize
759thread-local list and return success.
760* win32_threads.c (GC_register_my_thread): Likewise.
761* include/gc.h (GC_register_my_thread): Update documentation.
762* include/private/thread_local_alloc.h (GC_thread_key): Likewise.
763
764* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
765adjacent "#ifdef".
766* thread_local_alloc.c (GC_malloc_atomic): Call
767GC_core_malloc_atomic (instead of GC_core_malloc).
768
769* pthread_start.c (GC_start_rtn_prepare_thread): Change return
770type to GC_thread.
771* pthread_start.c (GC_inner_start_routine): Pass the current
772thread descriptor to pthread_cleanup_push (same as in
773win32_threads.c).
774* pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
775variable to "self".
776* win32_threads.c (GC_push_all_stacks): Likewise.
777* pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
778"my_thread" local variable to "self".
779* pthread_support.c (GC_unregister_my_thread_inner): New static
780function.
781* pthread_support.c (GC_unregister_my_thread,
782GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
783* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
784GC_do_blocking_inner): Rename "t" local variable to "thread_id".
785* win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
786"id" local variable to "thread_id".
787
788* pthread_support.c (GC_unregister_my_thread): Call pthread_self
789only once.
790* win32_threads.c (GC_pthread_start_inner): Likewise.
791* pthread_support.c (GC_unregister_my_thread): Add debug output.
792* win32_threads.c (GC_unregister_my_thread): Likewise.
793* pthread_support.c (GC_register_my_thread,
794GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
795to "self".
796
797* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
798unconditionally (do not test GC_I_HIDE_POINTERS); update the
799comment.
800* include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
801GC_HIDE/REVEAL_POINTER, respectively.
802* include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
803* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
804
805* include/gc.h (GC_register_my_thread): Refine the comment.
806
807* include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
808parentheses.
809* include/gc_typed.h (GC_get_bit, GC_set_bit,
810GC_CALLOC_EXPLICITLY_TYPED): Likewise.
811
812* include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
813
814* include/private/gcconfig.h (NO_GETCONTEXT): Do not use
815getcontext(2) on m68k because it is not implemented there.
816
817* alloc.c (GC_clear_a_few_frames): Use BZERO().
818* mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
819* reclaim.c (GC_start_reclaim): Likewise.
820* blacklst.c (total_stack_black_listed): Remove "len" local
821variable.
822* dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
823statement with "do-while" one.
824* dyn_load.c (GC_register_dynamic_libraries,
825GC_register_dynlib_callback): Remove redundant parentheses.
826
827* cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
828"unused result" compiler warning for fread().
829
830* os_dep.c (GC_write_fault_handler): Break when in_allocd_block
831is set to true.
832
833* dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
834return -1 if the object has (or had) debugging info but was
835marked deallocated.
836* include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
837* dbg_mlc.c (GC_has_other_debug_info): Update documentation;
838remove "ohdr" local variable.
839* dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
840probably been deallocated.
841* dbg_mlc.c (GC_debug_free): Don't actually free the object even
842in the leak-finding mode if GC_findleak_delay_free.
843* dbg_mlc.c (GC_check_leaked): New function (only unless
844SHORT_DBG_HDRS).
845* doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
846* doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
847* include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
848on 64-bit architectures.
849* include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
850parentheses.
851* include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
852GC_has_other_debug_info change).
853* include/private/gc_priv.h (GC_findleak_delay_free): New global
854variable declaration (unless SHORT_DBG_HDRS).
855* misc.c (GC_findleak_delay_free): New global variable; recognize
856GC_FINDLEAK_DELAY_FREE.
857* misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
858variable (unless SHORT_DBG_HDRS).
859* reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
860* reclaim.c (GC_add_leaked): Don't add the object to leaked list
861if marked as deallocated.
862
863* dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
864comment.
865* dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
866* dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
867* dbg_mlc.c (GC_smashed): Refine documentation.
868* mark.c (GC_push_selected): Change dirty_fn return type to
869GC_bool.
870* os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
871* reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
872local  variable.
873* reclaim.c (GC_reclaim_block): Pass true constant to
874GC_reclaim_small_nonempty_block (instead of report_if_found).
875* doc/README.autoconf: Update; fix a typo.
876* include/private/gcconfig.h (GC_WORD_C): New macro.
877
878* dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
879* dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
880comment.
881* dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
882argument.
883* dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
884message to GC_print_smashed_obj.
885* dbg_mlc.c (GC_debug_free): Call GC_size once.
886* dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
887allocation succeeded; remove unnecessary check for object is
888smashed (since this is done in GC_debug_free); remove "clobbered"
889local variable.
890
891* dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
892Rename "integer" argument to "linenum"; change the type of the
893argument to int.
894* gcj_mlc.c (GC_store_debug_info): Likewise.
895* dbg_mlc.c (GET_OH_LINENUM): New macro.
896* dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
897GET_OH_LINENUM; adjust print format specifier.
898* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
899GC_debug_malloc_atomic_ignore_off_page,
900GC_debug_generic_malloc_inner,
901GC_debug_generic_malloc_inner_ignore_off_page,
902GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
903GC_debug_malloc_uncollectable,
904GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
905"i".
906* gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
907
908* os_dep.c (GC_linux_stack_base): Rename to
909GC_linux_main_stack_base.
910* os_dep.c (GC_freebsd_stack_base): Rename to
911GC_freebsd_main_stack_base; adjust error message.
912* pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
913as an argument for sem_init().
914* pthread_support.c (pthread_create): Likewise.
915* pthread_support.c (pthread_create): Abort in case sem_init()
916fails.
917* include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
918* tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
919from main() if it should be done from the primordial thread only.
920
921* alloc.c: Don't include sys/types.h for ArmCC.
922* dyn_load.c: Likewise.
923* os_dep.c: Likewise.
924* mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
925ArmCC.
926* mark.c (GC_noop): Define specially for ArmCC.
927* include/private/gc_priv.h (GC_noop): Likewise.
928* misc.c (GC_init): Don't test pointers comparison for ArmCC.
929* misc.c: Don't include unistd.h for ArmCC.
930* os_dep.c (pages_executable): Rename to GC_pages_executable;
931make STATIC.
932* os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
933* ptr_chck.c (GC_is_visible): Explicitly cast
934(GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
935a compiler warning).
936* include/private/gcconfig.h: Recognize __arm.
937* include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
938* include/private/gcconfig.h (HBLKPTR): Add parentheses for
939"bytes" argument.
940
941* pthread_support.c (GC_get_nprocs): Don't define for Android.
942* pthread_support.c (GC_dummy_thread_local): Don't test
943GC_LINUX_THREADS.
944* include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
945Define for Android.
946
947* mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
948* os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
949NO_GETCONTEXT.
950* include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
951call for Android.
952
953* include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
954Define before including windows.h.
955* include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
956Likewise.
957* include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
958NOSERVICE): Likewise.
959* include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
960arithmetics; add a comment.
961
962* mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
963* extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
964* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
965* include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
966"mark_byte" local variable.
967* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
968about that AO_or() is not used by GC unless USE_MARK_BITS
969explicitly set.
970* include/private/gc_priv.h (OR_WORD): Likewise.
971* include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
972add parentheses.
973* include/private/gc_priv.h (ONES): Define before use by
974MAKE_COOLER.
975* include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
976* include/private/gc_priv.h (OR_WORD): Don't define if
977USE_MARK_BYTES.
978* include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
979definition; simplify expression.
980
981* os_dep.c (GC_get_maps): Always close the file.
982* pthread_support.c (GC_get_nprocs): Likewise.
983* os_dep.c (READ): Define similarly across the file (without
984parameters).
985* pthread_support.c (GC_get_nprocs): Use signed int type for "i"
986and "len" local variables (since read() may return -1).
987* include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
988double underscore; add "volatile" for asm.
989* include/private/gc_pmark.h (LONG_MULT): Add missing
990parentheses.
991* include/private/gc_priv.h (OR_WORD): Likewise.
992* include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
993and ';' symbol.
994
995* os_dep.c (GC_get_stack_base): Implement for Android (same as
996for Linux).
997* pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
998failed to open "stat" file (not to issue a warning twice); update
999the comment.
1000* pthread_support.c (GC_thr_init): Call sysconf() on Android to
1001get the number of CPUs.
1002
1003* include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
1004recent patches regarding this macro as the macro should be set
1005(to 1) before including any other system header.
1006
1007* doc/README.environment (GC_INITIAL_HEAP_SIZE,
1008GC_MAXIMUM_HEAP_SIZE): Update.
1009
1010* misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
1011heap size specifier; return 0 if not a valid one.
1012* include/gc_cpp.h: Explicitly define inline one-argument delete
1013operator for Cygwin (as a workaround).
1014* tests/test_cpp.cc (main): Suppress compiler warnings about
1015"assigned value is unused".
1016
1017* misc.c (GC_parse_mem_size_arg): New function.
1018* misc.c (GC_init): Use GC_parse_mem_size_arg().
1019* pthread_stop_world.c (tkill): Declare for Android.
1020
1021* include/private/gc_priv.h (_GNU_SOURCE): Include features.h
1022first (except for NaCl) and then define the macro to 1 if not yet.
1023
1024* tests/tests.am (TESTS, check_PROGRAMS): Add
1025'initsecondarythread'.
1026* tests/tests.am (initsecondarythread_SOURCES,
1027initsecondarythread_LDADD): New variable.
1028
1029* dbg_mlc.c (GC_store_debug_info_inner): Always define; add
1030"const" to its string argument.
1031* dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
1032* dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
1033smashed or previously deallocated found.
1034* dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
1035one.
1036* reclaim.c (GC_reclaim_check): Likewise.
1037* dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
1038* os_dep.c (GC_get_stack_base): Don't initialize
1039stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
1040calling GC_INIT() from a non-primordial thread is possible now).
1041* reclaim.c (GC_add_leaked): Turn into an inline one.
1042* reclaim.c (GC_reclaim_small_nonempty_block):
1043Change report_if_found type from int/word to boolean.
1044* include/private/gc_priv.h (GC_start_reclaim): Likewise.
1045* include/private/gc_priv.h (set_mark_bit_from_hdr,
1046clear_mark_bit_from_hdr): Place closing parenthesis properly.
1047
1048* os_dep.c (GC_get_main_stack_base): Try to use
1049pthread_attr_getstack first for Linux if THREADS.
1050* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
1051alignment.
1052
1053* dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
1054typo.
1055* dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
1056* dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
1057case of NULL argument).
1058* dbg_mlc.c (GC_free): In case of NULL argument, just return
1059(without any warning printed); eliminate "uncollectable" local
1060variable.
1061
1062* configure.ac (THREADDLLIBS): Use alternate thread library on
1063Solaris 8.
1064* configure.ac (need_atomic_ops_asm): Set to true only for SPARC
1065Solaris.
1066* configure.ac: Don't use libdl on mips-sgi-irix6.
1067
1068* mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
1069* mach_dep.c (GC_with_callee_saves_pushed): Don't call
1070__builtin_unwind_init() for RTEMS; use setjmp() without the
1071leading underscore (for RTEMS).
1072* tests/test.c (BIG): Use smaller value for RTEMS.
1073* tests/test.c (main): Customize for RTEMS.
1074
1075* configure.host: Remove doubled words in comments.
1076* os_dep.c: Likewise.
1077* doc/README: Likewise.
1078* extra/setjmp_t.c: Likewise.
1079* tests/huge_test.c: Likewise.
1080* extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
1081K&R-style function definition with the ANSI C one.
1082* extra/setjmp_t.c (nested_sp): Implement in the same way as
1083GC_approx_sp.
1084
1085* dyn_load.c (GC_dyld_sections): Add more sctions.
1086* dyn_load.c (GC_dyld_add_sect_fmts): New static varaible.
1087* dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
1088* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
1089logging; add support for on-demand sections.
1090
1091* gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
1092GC_ASSERTIONS.
1093* include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
1094declare (as external) unless GC_ASSERTIONS.
1095* os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
1096Cygwin; add FIXME.
1097* include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
1098* include/private/gcconfig.h: Add "#error" for every "-->" mark.
1099* include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
1100an expression.
1101* include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
1102(which existed previously as SUSPENDED and still exists in GCJ).
1103* include/private/pthread_support.h (DISABLED_GC): Change the
1104value (as it is already used by SUSPENDED_EXT).
1105
1106* tests/test.c (reverse_test):  Modify count (BIG) for
1107ppc64-darwin.
1108
1109* reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
1110macro and environment variable; abort if any error has been
1111printed provided the environment variable (or macro) is set.
1112* doc/README.environment (GC_ABORT_ON_LEAK): Document.
1113* doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
1114
1115* os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
1116for RTEMS.
1117* include/private/gcconfig.h (RTEMS): Add support for.
1118* include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
1119
1120* mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
1121it is used internally in some places).
1122
1123* dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
1124declaration.
1125* dbg_mlc.c (GC_debug_malloc_replacement,
1126GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
1127* malloc.c (GC_debug_malloc_replacement): Likewise.
1128* mallocx.c (GC_debug_realloc_replacement): Likewise.
1129* dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
1130* malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
1131* malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
1132includes of string.h.
1133* mallocx.c: Include string.h (for GC_strdup).
1134* include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
1135to dbg_mlc.c.
1136* include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
1137redundant trailing ';'.
1138* include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
1139* include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
1140properly.
1141* include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
1142malloc.c, mallocx.c.
1143
1144* alloc.c (GC_check_heap, GC_print_all_smashed): Move the
1145definition from misc.c.
1146* dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
1147public.
1148* include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
1149* include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
1150macro.
1151* dbg_mlc.c (MAX_SMASHED): Don't define if already set.
1152* reclaim.c (MAX_LEAKED): Likewise.
1153* dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
1154access to the global array.
1155* reclaim.c (GC_add_leaked): Likewise.
1156* misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
1157(new macro) is defined.
1158* doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
1159* misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
1160GC_dump_regularly and GC_print_back_height variables with
1161FALSE/TRUE.
1162* reclaim.c (GC_print_all_errors): Refine the comment.
1163
1164* tests/test.c (reverse_test_inner): Undo one of the previous
1165patches which shifts "c" and "d" pointers only if
1166ALL_INTERIOR_POINTERS (since interior pointers are always
1167recognized in stacks).
1168
1169* misc.c (GC_stdout, GC_stderr): Move the definition to the place
1170where GC_log is defined (Unix only).
1171* misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
1172variable and the similar macro; redirect GC_stdout and GC_stderr
1173to GC_log if "GC_LOG_FILE" environment variable is set unless
1174prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
1175* doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
1176* doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
1177
1178* misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
1179only).
1180* misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
1181accordingly.
1182* misc.c (GC_printf): Check GC_quiet before va_start().
1183
1184* allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
1185inside "if (GC_print_stats)" branch.
1186* alloc.c (GC_collect_or_expand): Likewise.
1187* dyn_load.c (GC_register_dynamic_libraries): Likewise.
1188* headers.c (GC_scratch_alloc): Likewise.
1189* os_dep.c (GC_get_maps, GC_remap, PROTECT,
1190GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
1191* alloc.c (min_bytes_allocd): Use GC_log_printf instead of
1192GC_printf for DEBUG_THREADS output.
1193* darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
1194GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
1195* pthread_start.c (GC_inner_start_routine): Likewise.
1196* pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
1197GC_push_all_stacks, GC_suspend_all, GC_stop_world,
1198GC_start_world): Likewise.
1199* pthread_support.c (GC_mark_thread, GC_get_nprocs,
1200GC_start_rtn_prepare_thread, pthread_create): Likewise.
1201* checksums.c (GC_update_check_page): Use GC_printf() instead of
1202GC_err_printf() for error printing.
1203* checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
1204instead of GC_printf for logging purposes.
1205* dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
1206external variable outside from GC_register_dynamic_libraries.
1207* dyn_load.c (GC_register_dynamic_libraries): Don't use
1208sys_errlist value if errno equals to sys_nerr.
1209* dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
1210instead of GC_printf for DL_VERBOSE output.
1211* dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
1212GC_init_dyld): Use GC_log_printf instead of GC_printf for
1213DARWIN_DEBUG output.
1214* os_dep.c (catch_exception_raise): Use GC_log_printf
1215instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
1216* reclaim.c (GC_print_free_list): Move "n" increment out of
1217GC_printf() call.
1218
1219* win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
1220DEBUG_WIN32_THREADS): Remove.
1221* win32_threads.c (GC_register_my_thread_inner,
1222GC_win32_start_inner): Use GC_log_printf instead of GC_printf
1223inside "if (GC_print_stats)" branch.
1224* win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
1225GC_PTHREADS).
1226* win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
1227GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
1228macro.
1229* win32_threads.c (GC_push_stack_for, GC_mark_thread,
1230GC_CreateThread, GC_beginthreadex, GC_pthread_join,
1231GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
1232GC_mark_thread_local_free_lists): Use GC_log_printf instead of
1233GC_printf for DEBUG_THREADS output.
1234* win32_threads.c (GC_win32_start_inner, GC_CreateThread,
1235GC_beginthreadex, GC_pthread_join, GC_pthread_create,
1236GC_pthread_start_inner, GC_thread_exit_proc): Cast
1237GetCurrentThreadId result to long; don't cast value of pthread_t
1238type to int; adjust printf format specifiers.
1239* doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
1240information.
1241
1242* tests/test.c (cons, small_cons, gcj_cons, check_ints,
1243check_uncollectable_ints, print_int_list, check_marks_int_list,
1244fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
1245alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
1246test, main): Remove unnecessary casts of GC_printf calls to void.
1247
1248* allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
1249BDWGC) printed message (adjust letters case, terminating dot and
1250new line symbols).
1251* alloc.c (GC_check_fl_marks): Likewise.
1252* backgraph.c (new_back_edges): Likewise.
1253* checksums.c (GC_check_dirty): Likewise.
1254* darwin_stop_world.c (GC_push_all_stacks,
1255GC_suspend_thread_list): Likewise.
1256* dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
1257store_old): Likewise.
1258* dyn_load.c (GC_register_dynamic_libraries): Likewise.
1259* mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
1260GC_push_selected, GC_push_next_marked_dirty): Likewise.
1261* mark_rts.c (GC_exclude_static_roots_inner): Likewise.
1262* os_dep.c (GC_remap, GC_default_push_other_roots,
1263GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
1264catch_exception_raise_state, catch_exception_raise_state_identity,
1265GC_mprotect_thread_notify, GC_mprotect_thread,
1266catch_exception_raise): Likewise.
1267* pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
1268GC_stop_world, GC_stop_init): Likewise.
1269* pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
1270GC_start_routine): Likewise.
1271* win32_threads.c (GC_register_my_thread_inner,
1272GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
1273GC_pthread_start_inner): Likewise.
1274* alloc.c (GC_expand_hp_inner): Realign the code.
1275* mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
1276Likewise.
1277* misc.c (GC_init): Likewise.
1278* os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
1279* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
1280* tests/test.c (run_one_test): Likewise.
1281* misc.c (GC_err_puts): Document.
1282* misc.c (GC_err_write): Remove.
1283* os_dep.c (dump_maps): Likewise.
1284* include/private/gc_priv.h (GC_err_write): Likewise.
1285* os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
1286dump_maps() and GC_err_write().
1287* os_dep.c (GC_read_dirty): Remove redundant brackets.
1288
1289* tests/test.c (reverse_test_inner): Test interior pointer
1290recognition only if ALL_INTERIOR_POINTERS.
1291* tests/test.c (run_one_test): Replace GC_all_interior_pointers
1292with GC_get_all_interior_pointers(); simplify the expression.
1293* tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
1294GC_bytes_allocd_before_gc with GC_get_total_bytes().
1295* tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
1296
1297* dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
1298warning if the argument is NULL and GC is in leaks detection mode.
1299* dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
1300function definition.
1301* malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
1302* mallocx.c (GC_posix_memalign): Likewise.
1303* malloc.c (strdup): Fix string size value; rename "len" to "lb".
1304* mallocx.c: Include errno.h unless WinCE (otherwise include
1305windows.h for Win32 error constants).
1306* win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
1307windows.h inclusion.
1308* misc.c (GC_init): Register at-exit callback if GC_find_leak
1309(even if GC_FIND_LEAK macro is unset).
1310* pthread_stop_world.c (NACL_STORE_REGS,
1311__nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
1312Use BCOPY() instead of memcpy().
1313* pthread_support.c (GC_init_real_syms): Likewise.
1314* doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
1315Document new macro.
1316* doc/README.macros (REDIRECT_MALLOC): Update documentation.
1317* include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
1318New API function prototype.
1319* include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
1320GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
1321* include/gc.h (GC_STRDUP): Remove redundant parentheses.
1322* include/leak_detector.h (realloc, strdup): Likewise.
1323* include/gc.h (GC_STRNDUP): New API macro.
1324* include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
1325GC_NEW_UNCOLLECTABLE): Add missing parentheses.
1326* include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
1327prototype (only if GC_REQUIRE_WCSDUP).
1328* include/gc.h (GC_WCSDUP): New API macro (only if
1329GC_REQUIRE_WCSDUP).
1330* include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
1331GC_DONT_INCLUDE_STDLIB).
1332* include/leak_detector.h (malloc, calloc, free, realloc):
1333Undefine symbol before its redefinition.
1334* include/leak_detector.h (strndup, memalign, posix_memalign):
1335Redefine to the corresponding GC function.
1336* include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
1337if GC_REQUIRE_WCSDUP).
1338* include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
1339the macro if already defined.
1340
1341* misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
1342when doing code static analysis (to inform the tool that the
1343function is a no-return one).
1344* os_dep.c (GC_linux_stack_base): Remove a duplicate validation
1345of the length of "stat" file; use signed int type for "i",
1346"buf_offset" and "len" local variables (since read() may
1347return -1).
1348
1349* blacklst.c (GC_bl_init_no_interiors): New function (the code
1350moved from GC_bl_init).
1351* blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
1352GC_all_interior_pointers mode; remove unnecessarily parameter cast
1353for GC_scratch_alloc call.
1354* include/private/gc_priv.h (GC_bl_init): Move the function
1355declaration to misc.c file.
1356* misc.c (GC_bl_init_no_interiors): Add a prototype.
1357* misc.c (GC_set_all_interior_pointers): Allow values other than 0
1358and 1; allow altering GC_set_all_interior_pointers value even
1359after GC initialization.
1360* obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
1361GC_modws_valid_offsets if GC_all_interior_pointers is off.
1362* misc.c (GC_init): Don't call GC_initialize_offsets() unless
1363GC_all_interior_pointers mode.
1364
1365* alloc.c (GC_finish_collection): Remove redundant brackets;
1366adjust code indentation.
1367* blacklst.c (GC_add_to_black_list_normal): Simplify expression
1368(to improve code readability).
1369* blacklst.c (GC_is_black_listed): Join nested "if" (into a single
1370conditional expression); initialize "nblocks" just before the loop
1371beginning.
1372* misc.c (GC_init): Don't compute initial_heap_sz if GC is already
1373initialized.
1374* include/private/gc_priv.h (GC_initialize_offsets): Move the
1375function declaration to misc.c file.
1376* obj_map.c (GC_initialize_offsets): Remove offsets_initialized
1377static variable since the function is called only once.
1378* tests/middle.c (main): Use setter for GC_all_interior_pointers;
1379adjust printf format specifier (and cast the value passed to).
1380
1381* doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
1382documentation.
1383* include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
1384if LARGE_CONFIG is defined.
1385* include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
1386
1387* alloc.c (GC_finish_collection): Replace "#else #ifdef" with
1388"#elif".
1389* include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
1390MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
1391* alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
1392overflow even if not LARGE_CONFIG.
1393* dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
1394SMALL_CONFIG.
1395* finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
1396* doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
1397GC_FULL_FREQUENCY): Refine the documentation.
1398
1399* extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
1400GC_word).
1401* extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
1402as word.
1403
1404* dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
1405GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
1406LINT-like tool to instruct it that the function is invoked only
1407with valid parameters (otherwise a SEGV is ok); recognize LINT2
1408new macro.
1409* misc.c (GC_abort): Instruct a LINT-like tool that the function
1410never returns in fact.
1411* os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
1412close the file immediately after read; use STRTOULL() instead of
1413decoding the address number manually.
1414* include/private/gc_priv.h (EXPECT): Don't specify outcome for a
1415LINT-like tool.
1416* include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
1417LINT-like tool that the value is restricted to zero and one only
1418(required since the variable is global and its value is used as a
1419part of array index expression is some places).
1420
1421* dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
1422NULL.
1423* dbg_mlc.c (GC_debug_register_finalizer,
1424GC_debug_register_finalizer_no_order,
1425GC_debug_register_finalizer_unreachable,
1426GC_debug_register_finalizer_ignore_self): Handle out of memory
1427case properly (similar to GC_register_finalizer_inner).
1428* headers.c (GC_install_header): Handle the case when alloc_hdr()
1429returns NULL.
1430* os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
1431* pthread_support.c (GC_mark_thread): Place a dummy return
1432statement (which uses "id" argument) before the actual use of "id"
1433as an array index (to suppress a warning produced by some static
1434code analysis tools).
1435* win32_threads.c (GC_mark_thread): Likewise.
1436* pthread_support.c (GC_thr_init): Abort (with the appropriate
1437message) if out of memory.
1438
1439* finalize.c (GC_register_finalizer_inner): Fix a typo in a
1440comment.
1441*include/private/gcconfig.h (STACKBOTTOM): Likewise.
1442* gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
1443EXPECT (the 2nd argument).
1444* malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
1445Likewise.
1446* mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
1447* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
1448* include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
1449* include/private/gc_priv.h (SMALL_OBJ): Likewise.
1450* include/private/specific.h (getspecific): Likewise.
1451* pthread_support.c (LOCK_STATS): Add a comment.
1452
1453* include/gc_pthread_redirects.h (GC_NO_DLOPEN,
1454GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
1455GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
1456definition to gc_config_macros.
1457
1458* pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
1459GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
1460GC_PTHREAD_EXIT_ATTRIBUTE).
1461* include/gc_pthread_redirects.h (GC_pthread_cancel,
1462pthread_cancel): Likewise.
1463* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
1464GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
1465code.
1466* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
1467Define as empty for NaCl.
1468* include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
1469defined.
1470
1471* dyn_load.c (GC_init_dyld): Do not invoke
1472_dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
1473not required to register the main data segment in that case).
1474* include/gc.h (GC_no_dls): Adjust the comment.
1475
1476* dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
1477GC_NO_DLOPEN.
1478* gc_dlopen.c: Likewise.
1479* include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
1480* gc_dlopen.c: Don't include dlfcn.h (as it is included in
1481gc_pthread_redirects.h).
1482* pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
1483GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
1484GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
1485* include/gc_pthread_redirects.h (GC_pthread_sigmask,
1486pthread_sigmask): Likewise.
1487* win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
1488GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
1489* pthread_support.c (pthread_create, GC_pthread_create_t,
1490GC_pthread_create): Rename GC_PTHREAD_CONST to
1491GC_PTHREAD_CREATE_CONST.
1492* win32_threads.c (GC_pthread_create): Likewise.
1493* include/gc_pthread_redirects.h: Likewise.
1494* include/gc_pthread_redirects.h (GC_NO_DLOPEN,
1495GC_NO_PTHREAD_SIGMASK): New macro defined.
1496* include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
1497empty for NaCl.
1498* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
1499not define for Android (as CANCEL_SAFE is not defined).
1500
1501* include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
1502GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
1503definition to gc_config_macros.h file.
1504* include/gc_config_macros.h: Check the file is included from gc.h
1505file.
1506* include/gc_version.h: Likewise.
1507
1508* gc_dlopen.c: Empty unit for NaCl.
1509* os_dep.c: Include fcntl.h for NaCl.
1510* os_dep.c (GC_get_main_stack_base): Ignore
1511USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
1512* os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
1513* os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
1514* pthread_start.c (GC_inner_start_routine): Don't invoke
1515pthread_cleanup_push/pop for NaCl.
1516* pthread_stop_world.c (GC_nacl_num_gc_threads,
1517GC_nacl_thread_idx, GC_nacl_park_threads_now,
1518GC_nacl_thread_parker, GC_nacl_gc_thread_self,
1519GC_nacl_thread_parked, GC_nacl_thread_used,
1520GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
1521variable (fo NaCl only).
1522* pthread_stop_world.c (GC_remove_allowed_signals,
1523suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
1524GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
1525GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
1526GC_restart_handler): Don't define for NaCl.
1527* pthread_support.c (GC_get_nprocs): Likewise.
1528* include/private/gc_priv.h (SIG_SUSPEND): Likewise.
1529* include/private/gcconfig.h (LINUX): Likewise.
1530* pthread_stop_world.c (GC_push_all_stacks): Push register storage
1531for NaCl.
1532* pthread_stop_world.c (GC_suspend_all, GC_stop_world,
1533GC_start_world): Implement for NaCl.
1534* pthread_stop_world.c (GC_stop_world): Don't define unused "i"
1535local variable for OpenBSD (and NaCl).
1536* pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
1537NaCl.
1538* pthread_stop_world.c (nacl_pre_syscall_hook,
1539__nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
1540GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
1541function (for NaCl only).
1542* pthread_stop_world.c (GC_stop_init): Empty for NaCl.
1543* pthread_support.c (pthread_cancel, pthread_sigmask): Don't
1544redirect for NaCl.
1545* include/gc_pthread_redirects.h (pthread_cancel,
1546pthread_sigmask): Likewise.
1547* pthread_support.c (GC_nacl_initialize_gc_thread,
1548GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
1549* pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
1550and shutdown thread for NaCl.
1551* pthread_support.c (GC_thr_init): Call sysconf for NaCl.
1552* pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
1553for NaCl.
1554* include/gc.h: Don't include features.h for NaCl.
1555* include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
1556* include/gc_pthread_redirects.h (GC_pthread_create): Use
1557GC_PTHREAD_CONST instead of const.
1558* win32_threads.c (GC_pthread_create): Likewise.
1559* pthread_support.c (GC_pthread_create_t, GC_pthread_create,
1560pthread_create): Likewise.
1561* include/private/gcconfig.h (NACL): Recognize NaCl.
1562* include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
1563* include/private/pthread_stop_world.h (thread_stop_info): Add
1564reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
1565NaCl only).
1566* include/private/pthread_support.h (GC_nacl_gc_thread_self):
1567Declare internal variable (for NaCl only).
1568
1569* mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
1570macro.
1571
1572* mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
1573keywords with double underscore.
1574* os_dep.c (catch_exception_raise, catch_exception_raise_state,
1575catch_exception_raise_state_identity): Add GC_API_OSCALL to
1576function definition.
1577* os_dep.c (catch_exception_raise_state,
1578catch_exception_raise_state_identity): Move definition to be
1579before GC_ports.
1580* os_dep.c (catch_exception_raise): Declare to have the symbol
1581defined before GC_ports.
1582* os_dep.c (GC_ports): Store references to catch_exception_raise,
1583catch_exception_raise_state, catch_exception_raise_state_identity
1584(to prevent stripping these symbols as dead).
1585* os_dep.c (catch_exception_raise, catch_exception_raise_state,
1586catch_exception_raise_state_identity): Mark these symbols as
1587"referenced dynamically" via an assembler directive (unless
1588NO_DESC_CATCH_EXCEPTION_RAISE).
1589* include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
1590similar to GC_API but as if GC_DLL is always defined).
1591
1592* os_dep.c: Don't include signal.h for GC_write_fault_handler on
1593Win32.
1594* os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
1595FreeBSD.
1596* os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
1597SEGV_ACCERR for older FreeBSD releases).
1598
1599* dyn_load.c (GC_register_map_entries,
1600GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
1601DATASTART only once if DATASTART_IS_FUNC.
1602* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
1603Calculate DATAEND only once if DATAEND_IS_FUNC.
1604* dyn_load.c: Add comment to some endif; realign some code.
1605* dyn_load.c (GC_init_dyld): Don't use
1606_dyld_bind_fully_image_containing_address if
1607NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
1608* include/private/gcconfig.h (GC_data_start, GC_find_limit):
1609Declare if used by DATASTART/DATAEND, respectively.
1610* include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
1611Define if DATASTART/DATAEND is a function, respectively.
1612* include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
1613NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
1614unistd.h.
1615
1616* os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
1617Reorder to remove redundant ifdef for Win32.
1618* os_dep.c: Add comment to some endif.
1619* os_dep.c: Include pthread.h (for Linux even if single-threaded)
1620if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
1621* os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
1622for some reason).
1623* os_dep.c (GC_get_main_stack_base): Allow
1624USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
1625assertion for the returned result.
1626* os_dep.c (GC_get_stack_base): Define for Darwin if
1627multi-threaded.
1628* os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
1629* os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
1630* os_dep.c (catch_exception_raise): Remove redundant parentheses;
1631refine the documentation.
1632
1633* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
1634well.
1635* NT_STATIC_THREADS_MAKEFILE: Likewise.
1636* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
1637* include/gc.h (GC_INIT): Document.
1638* include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
1639GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
1640define these macros also for ARM).
1641* tests/test.c (check_heap_stats): Print main thread stack bottom
1642as well (only if verbose mode is on).
1643
1644* mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
1645introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
1646and X86_64).
1647
1648* darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
1649"volatile" keyword with double underscore.
1650* mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
1651include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
1652* mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
1653mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
1654* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
1655for Linux/amd64 (since its GLibc getcontext currently has the bug).
1656
1657* allchblk.c (GC_use_entire_heap): Change type to int (as declared
1658in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
1659macro.
1660* misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
1661alter the default value of GC_use_entire_heap.
1662* doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
1663* doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
1664
1665* include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
1666MPROTECT_VDB undefining.
1667
1668* include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
1669the comment.
1670
1671* include/private/gc_priv.h (_GC_arrays): Move the conditional
1672macro definitions (shortcuts for GC_arrays members) into the
1673structure body.
1674
1675* darwin_stop_world.c (GC_mach_handler_thread,
1676GC_use_mach_handler_thread,
1677GC_darwin_register_mach_handler_thread): Define only if
1678MPROTECT_VDB.
1679* darwin_stop_world.c (GC_suspend_thread_list): Use
1680GC_mach_handler_thread and GC_use_mach_handler_thread only if
1681MPROTECT_VDB.
1682* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
1683only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
1684* misc.c (GC_init): Fix comment for GWW_VDB.
1685* os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
1686DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
1687* os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
1688DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
1689* pthread_support.c (GC_thr_init): Define "dummy" local variable
1690only unless GC_DARWIN_THREADS.
1691* include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
1692even in the single-threaded mode; define for iPhone/iPad.
1693* include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
1694around "undef".
1695* include/private/gcconfig.h (HEURISTIC1): Remove unused for
1696Cygwin.
1697* include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
1698Darwin/arm (instead of HEURISTIC1).
1699
1700* misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
1701(for ECOS and NOSYS).
1702* os_dep.c (GC_get_main_stack_base): Likewise.
1703* os_dep.c (GC_get_main_stack_base): Check
1704USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
1705remove "dummy" variable (use result one instead).
1706* doc/README.macros (SN_TARGET_PS3): Document.
1707* extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
1708for Android.
1709* include/private/pthread_support.h: Fix comment for "endif".
1710
1711* misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
1712* misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
1713* os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
1714* os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
1715* os_dep.c (GC_default_push_other_roots,
1716GC_push_thread_structures): Define for SN_TARGET_PS3.
1717* include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
1718for SN_TARGET_PS3.
1719* include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
1720(Sony PS/3 target).
1721* include/private/gcconfig.h (THREADS): Define unconditionally if
1722SN_TARGET_PS3.
1723* include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
1724
1725* alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
1726* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
1727GC_debug_malloc_atomic_ignore_off_page,
1728GC_debug_generic_malloc_inner,
1729GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
1730GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
1731GC_debug_malloc_atomic_uncollectable): Likewise.
1732* gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
1733* dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
1734comment.
1735* dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
1736* mark_rts.c (GC_roots_present): Likewise.
1737* doc/README: Likewise.
1738* include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
1739* include/private/gc_priv.h (_GC_arrays): Likewise.
1740
1741* configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
1742just blindly linking to -lpthread, as Android includes pthread
1743support within libc and does not provide a separate libpthread.
1744* dyn_load.c (GC_register_dynamic_libraries): Skip current link map
1745entry if l_addr is NULL (Android/bionic only).
1746* pthread_stop_world.c (android_thread_kill): New internal function
1747(Android only).
1748* pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
1749android_thread_kill (based on tkill) instead of pthread_kill on
1750Android (since pthread_kill cannot be used safely on the platform).
1751* pthread_support.c (GC_new_thread): Store thread Id (obtained from
1752gettid) for use by android_thread_kill (Android only).
1753* include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
1754structure member (Android only).
1755* include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
1756of __x86_64__ (Darwin); define __environ macro (Android on M68K).
1757
1758* allchblk.c (GC_freehblk): Print extended error message (done via
1759GC_printf() before aborting with a short message) only if
1760GC_print_stats.
1761* dyn_load.c (GC_register_dynamic_libraries): Likewise.
1762* os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
1763PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
1764* pthread_stop_world.c (GC_start_world): Likewise.
1765* win32_threads.c (GC_register_my_thread_inner): Likewise.
1766* os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
1767GC_dirty_init): Remove redundant print of an error message before
1768aborting with the same message.
1769* os_dep.c (GC_register_data_segments): Remove format specifier
1770from the string passed to GC_err_puts(); use ABORT instead of EXIT
1771(if invalid executable type).
1772* os_dep.c (GC_remap): Adjust printf format specifier (for long
1773type).
1774* os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
1775(for SIGSEGV/BUS) only if GC_print_stats.
1776* os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
1777calls.
1778
1779* tests/test.c (main): Print the relevant message if GWW_VDB.
1780* include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
1781on x64 if compiled by GCC.
1782
1783* tests/staticrootstest.c: Include string.h for memset() prototype.
1784* tests/thread_leak_test.c (main): Fix printf() format specifiers.
1785
1786* CMakeLists.txt: Check enable_parallel_mark on Darwin.
1787* configure.ac: Likewise.
1788* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
1789DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
1790GC_DISCOVER_TASK_THREADS, respectively.
1791* os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
1792* pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
1793* darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
1794(and remove FIXME).
1795* darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
1796comment; remove FIXME.
1797* win32_threads.c (GC_NO_DLLMAIN): Rename to
1798GC_NO_THREADS_DISCOVERY.
1799* tests/test.c (GC_NO_DLLMAIN): Likewise.
1800* doc/README.macros (GC_NO_DLLMAIN): Likewise.
1801* doc/README.win32 (GC_NO_DLLMAIN): Likewise.
1802* doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
1803* win32_threads.c (GC_win32_dll_threads): Define as macro to true
1804if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
1805update the comment.
1806* win32_threads.c (GC_use_DllMain): Rename to
1807GC_use_threads_discovery; do not set GC_win32_dll_threads if
1808GC_DISCOVER_TASK_THREADS.
1809* win32_threads.c (GC_started_thread_while_stopped,
1810GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
1811GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
1812which use GC_win32_dll_threads to minimize the possibility of
1813an "unreachable code" compiler warning when GC_win32_dll_threads
1814is defined as a macro.
1815* win32_threads.c (GC_unregister_my_thread): Don't call
1816GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
1817(since can't happen); use "t" local variable only if not
1818GC_win32_dll_threads.
1819* doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
1820* include/gc.h (GC_use_DllMain): Rename to
1821GC_use_threads_discovery but keep old name as a macro definition.
1822* include/gc.h (GC_use_threads_discovery): Declare also for
1823Darwin; update the comment.
1824* tests/test.c (main): Call GC_use_threads_discovery for Darwin
1825(to test the mode if possible).
1826
1827* darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
1828DARWIN_QUERY_TASK_THREADS): New macro recognized.
1829* darwin_stop_world.c (GC_query_task_threads): add STATIC;
1830initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
1831or DARWIN_QUERY_TASK_THREADS; remove FIXME.
1832* darwin_stop_world.c (GC_use_threads_discovery): New function
1833(for setting GC_query_task_threads value).
1834* darwin_stop_world.c (GC_mach_handler_thread,
1835GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
1836GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
1837GC_darwin_register_mach_handler_thread): Define only if not
1838DARWIN_SUSPEND_GC_THREADS.
1839* darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
1840the code for GC_query_task_threads case from compilation unless
1841DARWIN_SUSPEND_GC_THREADS.
1842* os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
1843if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
1844* os_dep.c (GC_mprotect_thread): Call
1845GC_darwin_register_mach_handler_thread only if THREADS and not
1846DARWIN_SUSPEND_GC_THREADS.
1847* pthread_support.c (marker_mach_threads): Don't define if
1848DARWIN_SUSPEND_GC_THREADS.
1849* pthread_support.c (GC_mark_thread): Don't fill in
1850marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
1851* include/private/gc_locks.h (GC_need_to_lock): Always declare for
1852THREADS case.
1853
1854* darwin_stop_world.c (GC_query_task_threads): Don't define to
1855false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
1856the variable to false (for now).
1857* darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
1858only if not DARWIN_DONT_PARSE_STACK.
1859* darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
1860approach based on task_threads() only if GC_query_task_threads
1861else use GC_threads table.
1862
1863* darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
1864* darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
1865really clear GC_mach_threads[]).
1866* darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
1867(instead of calling GC_stop_init).
1868* include/private/pthread_support.h (GC_stop_init): Remove proto.
1869* pthread_support.c (GC_stop_init): Add proto (unless Darwin).
1870* pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
1871GC_DARWIN_THREADS.
1872
1873* darwin_stop_world.c (GC_stack_range_for): New static function
1874(move the code from GC_push_all_stacks).
1875* darwin_stop_world.c (GC_push_all_stacks): Call
1876GC_stack_range_for(); rename kern_return local variable to
1877kern_result.
1878* darwin_stop_world.c (GC_is_mach_marker): Change argument type
1879from mach_port_t to thread_act_t.
1880* pthread_support.c (GC_is_mach_marker): Likewise.
1881
1882* darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
1883variable initialization (always call current_task()).
1884* pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
1885Don't set thread's stop_info.stack_ptr value for Darwin.
1886* include/private/darwin_stop_world.h (thread_stop_info): Update
1887the comment for stack_ptr.
1888
1889* darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
1890variables to "kern_return" and "my_thread" ones, respectively;
1891call mach_port_deallocate() unconditionally.
1892* darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
1893if DEBUG_THREADS.
1894
1895* darwin_stop_world.c (GC_mach_thread): Move from
1896darwin_stop_world.h.
1897* include/private/darwin_stop_world.h (GC_mach_thread): Remove.
1898* win32_threads.c (GC_start_world): Define "thread_id" local
1899variable only if GC_ASSERTIONS; decide whether to resume a thread
1900based on its "suspended" field value; assert that suspended thread
1901stack_base is non-zero and the thread is not our one.
1902
1903* darwin_stop_world.c (GC_thread_resume): New inline function
1904(move code from GC_thread_resume).
1905* darwin_stop_world.c (GC_start_world): Check result of
1906task_threads(); call GC_thread_resume().
1907* os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
1908only if not CYGWIN32.
1909* os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
1910if not CYGWIN32.
1911
1912* darwin_stop_world.c (FindTopOfStack): Change return type to
1913ptr_t (from long); make GC_INNER; add GC_ prefix.
1914* darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
1915local variable (initialized from the corresponding GC_thread
1916field unless GC_query_task_threads); add assertion that our
1917thread is not blocked; prefix FindTopOfStack with GC_ and remove
1918no longer needed cast to ptr_t of the result; handle thread
1919blocked case (and remove FIXME); use GC_push_all_stack_sections
1920unless GC_query_task_threads (and remove FIXME).
1921* pthread_support.c (GC_FindTopOfStack): Declare (if needed).
1922* pthread_support.c (GC_do_blocking_inner): Call
1923GC_save_regs_in_stack (if needed) before acquiring the lock.
1924* win32_threads.c (GC_do_blocking_inner): Likewise.
1925* pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
1926field of GC_thread (Darwin only).
1927* include/private/pthread_support.h (GC_thread): Add topOfStack
1928field for Darwin (unless DARWIN_DONT_PARSE_STACK).
1929
1930* finalize.c (GC_check_finalizer_nested): Change return type to
1931char pointer (instead of int pointer); use explicit cast for
1932GC_finalizer_nested assignment.
1933* pthread_support.c (GC_check_finalizer_nested): Likewise.
1934* win32_threads.c (GC_check_finalizer_nested): Likewise.
1935* finalize.c (GC_finalizer_nested): Change type to unsigned char.
1936* finalize.c (GC_notify_or_invoke_finalizers): Change type of
1937"pnested" local variable to char pointer.
1938* pthread_support.c (GC_do_blocking_inner,
1939GC_call_with_gc_active): Use explicit cast for "thread_blocked"
1940field assignment.
1941* win32_threads.c (GC_lookup_pthread): Use explicit cast for
1942"suspended" field assignment.
1943* win32_threads.c (GC_Thread_Rep): Use short type for
1944finalizer_skipped; use char type for finalizer_nested and flags
1945fields and reorder some fields (to minimize GC_Thread_Rep
1946structure size).
1947* include/private/pthread_support.h (GC_Thread_Rep): Likewise.
1948* win32_threads.c (GC_Thread_Rep): Use char type for suspended
1949field (instead of GC_bool).
1950* include/private/pthread_support.h (GC_Thread_Rep): Use char type
1951for thread_blocked field (instead of short).
1952
1953* darwin_stop_world.c (GC_query_task_threads): New variable (or
1954macro).
1955* darwin_stop_world.c (GC_push_all_stacks): Use
1956GC_query_task_threads (to choose between algorithms based on
1957kernel task_threads and based on GC_threads table); update FIXME;
1958remove commented out GC_push_one statements.
1959* pthread_support.c (GC_thr_init, GC_do_blocking_inner,
1960GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
1961stack_ptr field for all platforms.
1962* pthread_support.c (GC_call_with_gc_active): Initialize
1963saved_stack_ptr field for all platforms.
1964* include/private/darwin_stop_world.h (thread_stop_info): Add
1965stack_ptr field; change type of already_suspended from int to
1966GC_bool.
1967
1968* darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
1969* darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
1970GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
1971* darwin_stop_world.c (GC_mach_threads): Add FIXME.
1972* darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
1973GC_stop_world): Use FALSE and TRUE for already_suspended field and
1974"changed", "found" variables.
1975* darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
1976PARALLEL_MARK).
1977* darwin_stop_world.c (GC_suspend_thread_list): Change return type
1978to GC_bool; change type of "changed", "found" to GC_bool; make
1979"my_thread" as an argument (instead of acquiring/deallocating it
1980locally); do not add my_thread, GC_mach_handler_thread and marker
1981threads to GC_mach_threads table; check for overflow of
1982GC_mach_threads table; increase GC_mach_threads_count if "found"
1983is true and info.suspend_count is non-zero.
1984* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
1985Adjust "thread" format specifiers for GC_printf(); search thread
1986in "old_list" starting from the previous found one.
1987* darwin_stop_world.c (GC_stop_world): Rename "changes" to
1988"changed" local variable; remove "result" variable; adjust
1989GC_printf debugging message.
1990* darwin_stop_world.c (GC_start_world): Do not check for
1991my_thread and GC_use_mach_handler_thread (since they are not added
1992to GC_mach_threads table); call thread_info() only if
1993DEBUG_THREADS or GC_ASSERTIONS.
1994* pthread_support.c (marker_mach_threads): New static variable (if
1995Darwin).
1996* pthread_support.c (GC_is_mach_marker): New function (if Darwin).
1997* pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
1998table (if Darwin).
1999
2000* alloc.c (GC_parallel): Define only if THREADS.
2001* misc.c (GC_get_parallel): Likewise.
2002* include/gc.h (GC_parallel, GC_get_parallel,
2003GC_get_suspend_signal, GC_allow_register_threads,
2004GC_register_my_thread, GC_unregister_my_thread): Define only if
2005GC_THREADS.
2006* include/gc.h (GC_get_heap_size): Fix a typo in a comment.
2007
2008* configure.ac: Use `AC_C_INLINE'.
2009* include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
2010(determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
2011
2012* dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
2013FreeBSD).
2014* dyn_load.c (GC_register_main_static_data): Move the definition
2015above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
2016case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
2017* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
2018GC_register_main_static_data() result (instead of direct testing
2019of dl_iterate_phdr (to prevent a compiler warning).
2020* os_dep.c (CODE_OK): Test si_code also for the value of 2
2021(FreeBSD case; required for FreeBSD v7+).
2022* os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
2023* include/private/gcconfig.h (DATASTART): Cast etext argument in
2024GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
2025case).
2026
2027* include/private/specific.h (quick_thread_id): Define thru
2028GC_approx_sp(); define as a macro.
2029* include/private/specific.h (getspecific): Use GC_INLINE instead
2030of __inline__ (to work around Sun CC which does not recognize
2031inline keyword surrounded with underscores).
2032
2033* darwin_stop_world.c (FindTopOfStack): Simplify condition
2034expressions.
2035* darwin_stop_world.c (GC_push_all_stacks): Merge two variants
2036of this function (DARWIN_DONT_PARSE_STACK).
2037* darwin_stop_world.c (GC_push_all_stacks): Add a check for our
2038thread is found (same as in pthread_stop_world.c).
2039* darwin_stop_world.c (GC_push_all_stacks): Print the number of
2040scanned threads if verbose (same as in pthread_stop_world.c).
2041
2042* darwin_stop_world.c (GC_push_all_stacks): Reset
2043thread_state_count value before every thread_get_state call;
2044refine the comment for thread_state_count.
2045* darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
2046rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
2047register pushing.
2048* darwin_stop_world.c (GC_push_all_stacks): Set outCount to
2049GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
2050* darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
2051for i386.
2052
2053* doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
2054* darwin_stop_world.c (GC_use_mach_handler_thread): Change type
2055to GC_bool.
2056* darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
2057Simplify the expressions involving GC_use_mach_handler_thread.
2058* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
2059Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
2060
2061* include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
2062pthread_sigmask, dlopen): Don't define for Win32 pthreads (and
2063don't include signal.h and dlfcn.h).
2064
2065* dyn_load.c (GC_register_dynlib_callback): Add FIXME.
2066
2067* include/private/gcconfig.h: Add support for FreeBSD on ppc64.
2068
2069* os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
2070VM_PROT_EXECUTE.
2071
2072* os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
2073pages_executable is on.
2074* os_dep.c (os2_alloc): Add FIXME (for recursion).
2075* os_dep.c (UNPROTECT): Abort with a more informative message if
2076pages_executable is on ("mprotect" case).
2077* os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
2078pages_executable is on (Darwin case).
2079* pthread_support.c (GC_init_real_syms): Abort with an informative
2080message if libgc is linked after libpthread.
2081
2082* dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
2083for 64-bit targets.
2084* pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
2085macro.
2086* pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
2087since REAL(pthread_create) is used.
2088* pthread_support.c (PTHREAD_CREATE): Remove unused.
2089
2090* extra/threadlibs.c (main): Remove --wrap for "read" (since not
2091wrapped anymore).
2092* doc/README.linux (GC_USE_LD_WRAP): Likewise.
2093* os_dep.c (__wrap_read): Likewise.
2094
2095* include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
2096beginning of the file.
2097* include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
2098macro (defined only for Linux and Solaris).
2099* include/gc_pthread_redirects.h (GC_pthread_cancel,
2100GC_pthread_exit): Declare new API function (only if
2101GC_PTHREAD_EXIT_ATTRIBUTE).
2102* include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
2103Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
2104* include/private/pthread_support.h (DISABLED_GC): New macro.
2105* pthread_support.c (pthread_cancel, pthread_exit): Restore
2106original definition or declare "real" function (if needed and
2107GC_PTHREAD_EXIT_ATTRIBUTE).
2108* pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
2109Declare new types if needed.
2110* pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
2111function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
2112* pthread_support.c (GC_init_real_syms): Initialize pointers to
2113the "real" pthread_cancel and pthread_exit (only if
2114GC_PTHREAD_EXIT_ATTRIBUTE).
2115* pthread_support.c (GC_unregister_my_thread): Enable collections
2116if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
2117* pthread_support.c (pthread_cancel, pthread_exit): New wrapped
2118function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
2119* pthread_support.c (GC_start_routine): Refine the comment.
2120* extra/threadlibs.c (main): Adjust --wrap (add "read",
2121"pthread_exit", "pthread_cancel" but remove "sleep").
2122* doc/README.linux (GC_USE_LD_WRAP): Likewise.
2123
2124* include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
2125macro definition.
2126* include/gc.h (GC_reachable_here): Likewise.
2127* include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
2128with double '_'.
2129
2130* pthread_start.c: New file.
2131* CMakeLists.txt (SRC): Add pthread_start.c.
2132* Makefile.am (libgc_la_SOURCES): Likewise.
2133* Makefile.direct (CSRCS): Likewise.
2134* Makefile.direct (OBJS): Add pthread_start.obj.
2135* extra/gc.c: Add a comment; include pthread_start.c.
2136* pthread_support.c (start_info): Move the struct definition down
2137closer to its usage.
2138* pthread_support.c (GC_thread_exit_proc): Replace STATIC with
2139GC_INNER.
2140* pthread_support.c (GC_inner_start_routine): Move to the
2141definition to pthread_start.c; leave only the prototype; remove
2142STATIC.
2143* pthread_support.c (GC_start_rtn_prepare_thread): New function
2144(contains parts of the original GC_inner_start_routine).
2145
2146* configure.ac (NO_EXECUTE_PERMISSION): Add comment.
2147* doc/README.macros (NO_EXECUTE_PERMISSION): Update the
2148documentation.
2149* include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
2150New API function declaration.
2151* os_dep.c (OPT_PROT_EXEC): Remove (superseded by
2152pages_executable).
2153* os_dep.c (pages_executable): New static variable.
2154* os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
2155GC_get_pages_executable only).
2156* os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
2157Replace OPT_PROT_EXEC with pages_executable.
2158* os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
2159GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
2160* os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
2161UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
2162* os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
2163API function definition.
2164
2165* tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
216664-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
2167at least).
2168
2169* tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
217032-bit CPUs (to prevent "Unexpected heap growth" failure).
2171
2172* gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
2173* pthread_support.c (pthread_create, pthread_join, pthread_detach,
2174pthread_sigmask): Likewise.
2175* gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
2176is added).
2177* gc_dlopen.c (GC_dlopen): Fix return type.
2178* pthread_support.c (GC_init_real_syms): Don't define
2179LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
2180libpthread_name if RTLD_NEXT.
2181
2182* gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
2183* gc_dlopen.c (dlopen): Likewise.
2184* include/gc.h (GC_enable_incremental): Refine the comment.
2185* include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
2186missing (only for Win32).
2187* include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
2188* win32_threads.c (GC_ExitThread): Likewise.
2189* include/gc.h (GC_endthreadex): Add a comment.
2190
2191* include/cord.h: Fix typos.
2192
2193* Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
2194"tests/CMakeLists.txt".
2195* doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
2196
2197* mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
2198* include/private/gcconfig.h (AVR32): New macro (also define the
2199supplementary macros for the target).
2200* include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
2201define for AVR32.
2202
2203* tests/leak_test.c (main): Explicitly define as returning int
2204(to prevent a spurious test failure on some Linux/alpha targets).
2205* tests/thread_leak_test.c (main): Likewise.
2206* tests/thread_leak_test.c: Initialize GC_find_leak in the main
2207thread (before GC_INIT) only.
2208* tests/leak_test.c (main): Use GC_set_find_leak() instead of
2209accessing GC_find_leak directly.
2210* tests/thread_leak_test.c (main): Likewise.
2211
2212* include/gc.h (GC_find_leak, GC_finalize_on_demand,
2213GC_java_finalization, GC_dont_expand, GC_no_dls,
2214GC_dont_precollect): Simplify the comment (remove the information
2215about data races since the value is boolean).
2216
2217* os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
2218Solaris-specific implementation (based on thr_stksegment).
2219* os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
2220variable used by the Solaris-specific GC_get_stack_base().
2221
2222* pthread_support.c (GC_mark_thread_local_free_lists,
2223GC_check_tls): Mark (and check) only for live threads (in case of
2224GC_destroy_thread_local() is called already but GC_delete_thread()
2225is not yet).
2226* win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
2227Likewise.
2228
2229* NT_MAKEFILE: Remove the comment about DLL and Win32S.
2230* NT_STATIC_THREADS_MAKEFILE: Likewise.
2231* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
2232* NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
2233properly on VS 2005+).
2234* NT_MAKEFILE: Update GC log file name in comments.
2235* NT_STATIC_THREADS_MAKEFILE: Likewise.
2236* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
2237* NT_X64_THREADS_MAKEFILE: Likewise.
2238* doc/README.win32: Likewise.
2239* NT_MAKEFILE: Remove ":full" for "-debug" option (since no
2240longer supported by VS).
2241* NT_STATIC_THREADS_MAKEFILE: Likewise.
2242* NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
2243* NT_STATIC_THREADS_MAKEFILE: Likewise.
2244* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
2245* NT_X64_THREADS_MAKEFILE: Likewise.
2246* NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
2247* NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
2248* NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
2249default stack size limit).
2250* NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
2251* win32_threads.c (GC_get_next_stack): Always define (since it is
2252also used for Cygwin now).
2253
2254* alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
2255be just before GC_clear_marks() call.
2256* include/gc_mark.h (GC_start_callback_proc): Refine the comment.
2257
2258* Makefile.am (check_LTLIBRARIES): Initialize to empty.
2259* tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
2260* tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
2261libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
2262libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
2263Define.
2264* tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
2265
2266* tests/staticrootstest.c: New file.
2267* tests/staticrootslib.c: Likewise.
2268
2269* dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
2270Cygwin as well as other win32 targets.
2271* dyn_load.c (GC_wnt): Define to constant true.
2272* dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
2273well as other win32 targets.
2274* mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
2275Don't define for Cygwin, as on other win32.
2276* mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
2277Cygwin as for other win32 targets.
2278* mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
2279other win32.
2280* mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
2281other win32.
2282* mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
2283declare on Cygwin as on other win32.
2284* mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
2285!NO_DEBUGGING, as on other win32 targets.
2286* mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
2287Cygwin as for other win32 targets.
2288* os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
2289* os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
2290other win32.
2291* os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
2292* os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
2293Win32, but call GC_unix_get_mem instead of GlobalAlloc.
2294* os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
2295* ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
2296as on other win32 platforms.
2297* win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
2298for dynamic loading targets.
2299* include/private/gc_priv.h (GC_INNER): Don't try to use
2300visibility on Cygwin which does not support it.
2301* include/private/gc_priv.h (struct roots): Don't declare r_next
2302member on Cygwin as on other windows hosts.
2303* include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
2304likewise.
2305* include/private/gc_priv.h (struct _GC_arrays): Do declare
2306_heap_bases[] member and don't declare _root_index likewise.
2307* include/private/gc_priv.h (GC_heap_bases): Do define likewise.
2308* include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
2309likewise.
2310* include/private/gc_priv.h (GC_sysinfo): Do declare extern
2311likewise.
2312* include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
2313prototype on Cygwin as other win32 platforms.
2314
2315* os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
2316pthread_attr_getstack() instead of GC_get_stack_base() (and check
2317returned stackaddr for NULL); output a warning on failure.
2318
2319* alloc.c (GC_start_call_back): Replace the definition type to
2320GC_start_callback_proc.
2321* alloc.c (GC_set_start_callback, GC_get_start_callback): New
2322setter/getter function.
2323* alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
2324unconditionally (because GC_try_to_collect_inner always does full
2325GC).
2326* include/gc_mark.h (GC_start_callback_proc): New type.
2327* include/gc_mark.h (GC_set_start_callback,
2328GC_get_start_callback): New API function declaration.
2329
2330* doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
2331* os_dep.c (GC_get_main_stack_base): Recognize
2332USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
2333and use GC_get_stack_base() in this case.
2334
2335* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
2336GC_find_limit_with_bound() should be called with the lock held).
2337* backgraph.c (FOR_EACH_PRED): Fix a typo.
2338
2339* alloc.c (GC_set_stop_func, GC_get_stop_func): Add
2340DCL_LOCK_STATE.
2341* finalize.c (GC_notify_or_invoke_finalizers): Likewise.
2342* gc_dlopen.c (disable_gc_for_dlopen): Likewise.
2343* gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
2344* mark.c (GC_print_trace): Likewise.
2345* misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
2346GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
2347GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
2348GC_get_finalizer_notifier): Likewise.
2349* os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
2350* pthread_support.c (GC_is_thread_tsd_valid,
2351GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
2352GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
2353pthread_detach, GC_register_my_thread, GC_inner_start_routine,
2354pthread_create): Likewise.
2355* reclaim.c (GC_print_all_errors): Likewise.
2356* win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
2357GC_unregister_my_thread, GC_do_blocking_inner,
2358GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
2359GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
2360GC_init_parallel): Likewise.
2361
2362* doc/README.darwin: Update.
2363
2364* CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
2365usable on Mac OS X).
2366* doc/README.cmake: Update.
2367
2368* CMakeLists.txt: New file (adding CMake support).
2369* tests/CMakeLists.txt: Likewise.
2370* doc/README.cmake: Likewise.
2371
2372* configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
2373macros.
2374* include/private/gc_priv.h (THREAD_FLD): Recognize
2375__DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
2376
2377* pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
2378OpenBSD.
2379* pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
2380OpenBSD.
2381* pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
2382NetBSD and OpenBSD.
2383
2384* mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
2385if THREADS is undefined.
2386* include/gc.h (GC_malloc_many): Update the comment.
2387
2388* include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
2389(formerly known as Borland) C++ compiler v6.21+.
2390* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
2391VC++ compilers.
2392
2393* win32_threads.c (GC_register_my_thread_inner,
2394GC_pthread_start_inner): Undo the previous commit changes for
2395the thread flags and DETACHED state (since the state is only
2396tested in GC_thread_exit_proc).
2397
2398* include/gc.h (GC_unregister_my_thread): Fix a typo; update the
2399comment.
2400* pthread_support.c (GC_delete_thread): Allow to delete the main
2401thread (don't call GC_INTERNAL_FREE for it); update the comment.
2402* win32_threads.c (GC_delete_thread): Likewise.
2403* pthread_support.c (GC_unregister_my_thread): Add an assertion
2404for FINISHED flag is unset.
2405* tests/test.c (check_heap_stats): Test the main thread
2406unregistering (only if THREADS).
2407* win32_threads.c (GC_register_my_thread_inner): Set flags to
2408DETACHED (only if GC_PTHREADS).
2409* win32_threads.c (GC_unregister_my_thread): Add FIXME (for
2410GC_wait_for_gc_completion).
2411* win32_threads.c (GC_pthread_start_inner): Clear flags detached
2412state if needed; set pthread_id and flags while holding the lock.
2413
2414* include/private/gc_priv.h (SIG_SUSPEND): Don't define for
2415OpenBSD and Darwin.
2416
2417* include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
2418
2419* test.c (main, WinMain): Consistently don't invoke
2420GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
2421do invoke it even if parallel marking is enabled.
2422
2423* tests/test.c (reverse_test): Comment out a check for MSWIN32
2424(when determing BIG value) assuming outdated win32S.
2425* tests/test.c (reverse_test): Rename to reverse_test_inner;
2426change the declaration (to be of GC_fn_type); call itself thru
2427GC_call_with_gc_active() if the argument is zero.
2428* tests/test.c (reverse_test): New function added calling
2429reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
2430GC_call_with_gc_active).
2431
2432* doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
2433Document.
2434* dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
2435* dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
2436PLATFORM_ANDROID.
2437* include/private/gcconfig.h (LINUX): Define also if
2438PLATFORM_ANDROID (for the windows-based toolkit).
2439* include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
2440define for Android/x86 platform.
2441* include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
2442new macro (undefine DYNAMIC_LOADING in this case).
2443* include/private/gcconfig.h (CANCEL_SAFE): Don't define if
2444PLATFORM_ANDROID.
2445* include/private/gcconfig.h (IF_CANCEL): Fix definition for the
2446explicitly defined CANCEL_SAFE.
2447
2448* allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
2449if GC_DISABLE_INCREMENTAL.
2450* reclaim.c (GC_reclaim_generic): Likewise.
2451* checksums.c (GC_page_was_ever_dirty): Add prototype.
2452* include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
2453unless PARALLEL_MARK.
2454* include/private/gc_priv.h (GC_dirty_maintained,
2455GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
2456declare if GC_DISABLE_INCREMENTAL.
2457* include/private/gc_priv.h (GC_print_finalization_stats): Don't
2458declare if SMALL_CONFIG.
2459* include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
2460GC_DISABLE_INCREMENTAL (since nothing to check).
2461* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
2462GC_DISABLE_INCREMENTAL.
2463* os_dep.c (GC_dirty_maintained): Likewise.
2464* mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
2465GC_DISABLE_INCREMENTAL.
2466* os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
2467Uncomment; define only if CHECKSUMS.
2468
2469* darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
2470GC_push_all_stack() instead of GC_push_all_stack_frames()).
2471* include/private/gc_priv.h (GC_push_all_stack_frames,
2472GC_push_all_register_frames): Rename to
2473GC_push_all_stack_sections and GC_push_all_register_sections,
2474respectively.
2475* mark_rts.c (GC_push_all_stack_frames,
2476GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
2477GC_push_current_stack): Likewise.
2478* pthread_stop_world.c (GC_push_all_stacks): Likewise.
2479* win32_threads.c (GC_push_stack_for): Likewise.
2480* misc.c (GC_call_with_gc_active): Rename "frame" local variable
2481to "stacksect".
2482* pthread_support.c (GC_call_with_gc_active): Likewise.
2483* win32_threads.c (GC_call_with_gc_active): Likewise.
2484* pthread_support.c (GC_call_with_gc_active): Update FIXME for
2485Darwin.
2486* win32_threads.c (GC_Thread_Rep): Update the comment for
2487traced_stack_sect.
2488
2489* darwin_stop_world.c (GC_push_all_stacks): Rename
2490activation_frame to traced_stack_sect.
2491* include/private/gc_priv.h (GC_push_all_stack_frames,
2492GC_push_all_register_frames): Likewise.
2493* include/private/pthread_support.h (GC_Thread_Rep): Likewise.
2494* mark_rts.c (GC_push_all_register_frames,
2495GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
2496GC_push_current_stack): Likewise.
2497* pthread_stop_world.c (GC_push_all_stacks): Likewise.
2498* pthread_support.c (GC_call_with_gc_active): Likewise.
2499* win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
2500GC_push_stack_for): Likewise.
2501* include/private/gc_priv.h (GC_activation_frame_s): Rename to
2502GC_traced_stack_sect_s.
2503* include/private/gc_priv.h (GC_activation_frame): Rename to
2504GC_traced_stack_sect.
2505* misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
2506* doc/README.macros (UNICODE): Document.
2507
2508* doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
2509* include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
2510declare and use GC_envfile_getenv().
2511* misc.c (GC_envfile_content, GC_envfile_length): New static
2512variable (only if GC_READ_ENV_FILE).
2513* misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
2514* misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
2515if GC_READ_ENV_FILE).
2516* misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
2517if GC_READ_ENV_FILE.
2518* misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
2519calls to be just before GC_envfile_init() one (since the latter
2520uses GET_MEM).
2521* misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
2522WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
2523* mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
2524from the ABORT message.
2525* misc.c (GC_init): Likewise.
2526* os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
2527Likewise.
2528* pthread_stop_world.c (GC_push_all_stacks): Likewise.
2529* pthread_support.c (GC_init_real_syms, start_mark_threads):
2530Likewise.
2531
2532* win32_threads.c (GC_get_next_stack): Don't define for Cygwin
2533(since unused for now).
2534
2535* dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
2536GC_register_main_static_data() is defined.
2537* dyn_load.c (GC_register_dynamic_libraries): Define only if used
2538(if DYNAMIC_LOADING or PCR or Win32/CE).
2539* dyn_load.c (GC_register_main_static_data): Define the default
2540one only if DYNAMIC_LOADING.
2541* include/private/gc_priv.h (GC_register_dynamic_libraries):
2542Declare only if used (to prevent compiler warning).
2543
2544* mark_rts.c (GC_approx_sp): Add a comment (for GCC).
2545
2546
2547== [7.2alpha4] 2009-12-01 ==
2548
2549* configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
2550
2551* include/gc.h (GC_get_suspend_signal): New function declaration.
2552* misc.c (GC_get_suspend_signal): New API function (only if
2553THREADS).
2554
2555* alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
2556two if GC_incremental (instead of TRUE_INCREMENTAL).
2557
2558* sparc_mach_dep.S (GC_push_regs): Remove the reference.
2559
2560* os_dep.c (SIZE_T, PULONG_PTR): Remove.
2561* os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
2562"word"); add the comment.
2563* os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
2564GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
2565
2566* win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
2567const value (for speed).
2568* win32_threads.c (THREAD_TABLE_INDEX): New macro.
2569* win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
2570GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
2571THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
2572* win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
2573
2574* win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
2575
2576* backgraph.c: Remove apostrophe char from "#error".
2577
2578* doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
2579* include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
2580new macro; implicitly define it if SMALL_CONFIG.
2581* alloc.c (GC_incremental, GC_timeout_stop_func): Check for
2582GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
2583* include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
2584GC_push_conditional): Likewise.
2585* mark.c (GC_push_next_marked_dirty, GC_push_selected,
2586GC_push_conditional, GC_block_was_dirty): Likewise.
2587* misc.c (GC_enable_incremental): Likewise.
2588* misc.c (GC_init): Likewise.
2589
2590* dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
2591* misc.c (WIN32_LEAN_AND_MEAN): Likewise.
2592* os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
2593* allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
2594in a comment.
2595* backgraph.c: Likewise.
2596* dyn_load.c (GC_register_dynamic_libraries): Likewise.
2597* extra/threadlibs.c (main): Likewise.
2598* pthread_support.c (pthread_join): Likewise.
2599* tests/test.c (main): Likewise.
2600
2601* mach_dep.c (GC_push_regs): Remove STATIC (just to catch
2602a duplicate symbol definition linker error).
2603* misc.c (GC_clear_stack_inner): Likewise.
2604* sparc_mach_dep.S (GC_push_regs): Comment out the reference.
2605
2606* include/private/gc_priv.h (GC_write_disabled): New variable
2607declaration (only if GC_ASSERTIONS and Win32 threads).
2608* misc.c (GC_write): Add assertion for GC_write_disabled value is
2609not on (only if THREADS).
2610* win32_threads.c (GC_write_disabled): New variable (only if
2611GC_ASSERTIONS and not Cygwin).
2612* win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
2613(while holding GC_write_cs).
2614
2615* win32_threads.c (GC_please_stop): If DllMain-based thread
2616registration is not compiled in then define GC_please_stop as
2617a non-volatile variable for assertion only.
2618* win32_threads.c (GC_stop_world): Set and clear only if defined.
2619* win32_threads.c (GC_stop_world): Add the comment for GC_printf()
2620usage (while holding GC_write_cs).
2621* win32_threads.c (GC_delete_gc_thread): Likewise.
2622* os_dep.c (GC_remove_protection): Likewise.
2623
2624* pthread_support.c (GC_inner_start_routine): Join 3 sequential
2625GC_printf() calls into a single one (for DEBUG_THREADS).
2626
2627* include/private/gc_priv.h (GC_total_stacksize): New variable
2628declaration (only if THREADS).
2629* alloc.c (GC_total_stacksize): New variable (only if THREADS).
2630* alloc.c (min_bytes_allocd): Calculate stack_size using
2631GC_stackbottom only in the single-threaded case; otherwise use
2632GC_total_stacksize; print GC_total_stacksize value if
2633DEBUG_THREADS.
2634* darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
2635specifier for lo/hi values (instead of "%lx").
2636* darwin_stop_world.c (GC_push_all_stacks): Use
2637GC_push_all_stack_frames() instead of GC_push_all_stack().
2638* darwin_stop_world.c (GC_push_all_stacks): Recalculate
2639GC_total_stacksize value.
2640* pthread_stop_world.c (GC_push_all_stacks): Likewise.
2641* win32_threads.c (GC_push_all_stacks): Likewise.
2642* win32_threads.c (GC_push_stack_for): Pass "me" argument; return
2643stack size; don't check for non-zero value of thread->stack_base.
2644* win32_threads.c (GC_push_all_stacks): Don't call
2645GC_push_stack_for() and don't check for "t->id == me" if
2646thread->stack_base is zero.
2647
2648* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
2649with "0x".
2650* os_dep.c (PROTECT): Likewise.
2651* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
2652int (to match printf type specifier).
2653
2654* tests/test.c (check_heap_stats): Take into account the unmapped
2655memory size when checking for "Unexpected heap growth"; remove
2656FIXME.
2657
2658* alloc.c: Revert last change.
2659
2660* include/private/gcconfig.h (STACKBOTTOM): Add a presence check
2661for eCos/NOSYS.
2662* misc.c (GC_write): Comment out _Jv_diag_write() call (since no
2663longer defined in GCJ).
2664
2665* os_dep.c (brk): Rename to ecos_gc_brk.
2666
2667* alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
2668stack_size even if THREADS.
2669* doc/README.macros (DEBUG_THREADS): Document.
2670* pthread_support.c (DEBUG_THREADS): Remove the commented out
2671definition.
2672* win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
2673definition.
2674* win32_threads.c: Include errno.h (except for WinCE).
2675* win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
2676to local variables, and free "arg" parameter before "start"
2677invocation.
2678* win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
2679(instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
2680* win32_threads.c (GC_beginthreadex): Return 0 on error (instead
2681of -1).
2682
2683* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
2684Use GC_INNER for the function definition.
2685* include/private/darwin_stop_world.h
2686(GC_darwin_register_mach_handler_thread): Remove the prototype.
2687* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
2688for the function prototype.
2689* include/private/gc_priv.h (NDEBUG): Explicitly define if
2690NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
2691inclusion).
2692
2693* include/private/gcconfig.h: Move DebugBreak() workaround (for
2694x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
2695
2696* allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
2697GC_freehblk): Use GC_INNER for the function definition.
2698* alloc.c (GC_never_stop_func, GC_should_collect,
2699GC_try_to_collect_inner, GC_collect_a_little_inner,
2700GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
2701GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
2702* backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
2703Likewise.
2704* blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
2705GC_promote_black_lists, GC_unpromote_black_lists,
2706GC_add_to_black_list_normal, GC_add_to_black_list_stack,
2707GC_is_black_listed): Likewise.
2708* darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
2709GC_stop_init, GC_stop_world, GC_start_world): Likewise.
2710* dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
2711GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
2712GC_store_debug_info, GC_start_debugging,
2713GC_debug_generic_malloc_inner,
2714GC_debug_generic_malloc_inner_ignore_off_page,
2715GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
2716* dyn_load.c (GC_register_dynamic_libraries,
2717GC_register_main_static_data, GC_init_dyld): Likewise.
2718* finalize.c (GC_push_finalizer_structures, GC_finalize,
2719GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
2720Likewise.
2721* gcj_mlc.c (GC_core_gcj_malloc): Likewise.
2722* headers.c (GC_find_header, GC_header_cache_miss,
2723GC_scratch_alloc, GC_init_headers, GC_install_header,
2724GC_install_counts, GC_remove_header, GC_remove_counts,
2725GC_next_used_block, GC_prev_block): Likewise.
2726* mach_dep.c (GC_with_callee_saves_pushed): Likewise.
2727* malloc.c (GC_collect_or_expand, GC_alloc_large,
2728GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
2729GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
2730* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
2731* mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
2732GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
2733GC_clear_marks, GC_initiate_gc, GC_mark_some,
2734GC_mark_stack_empty, GC_invalidate_mark_state,
2735GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
2736GC_mark_init, GC_push_all, GC_push_conditional,
2737GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
2738Likewise.
2739* mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
2740GC_exclude_static_roots_inner, GC_push_all_register_frames,
2741GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
2742GC_push_roots): Likewise.
2743* misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
2744Likewise.
2745* new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
2746* obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
2747GC_initialize_offsets): Likewise.
2748* os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
2749GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
2750GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
2751GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
2752GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
2753GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
2754GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
2755GC_page_was_ever_dirty, GC_remove_protection,
2756GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
2757GC_save_callers, GC_print_callers): Likewise.
2758* pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
2759GC_start_world, GC_stop_init): Likewise.
2760* pthread_support.c (GC_mark_thread_local_free_lists,
2761GC_lookup_thread, GC_reset_finalizer_nested,
2762GC_check_finalizer_nested, GC_segment_is_thread_stack,
2763GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
2764GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
2765GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
2766GC_wait_marker, GC_notify_all_marker): Likewise.
2767* reclaim.c (GC_print_all_errors, GC_block_empty,
2768GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
2769GC_reclaim_all): Likewise.
2770* thread_local_alloc.c (GC_init_thread_local,
2771GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
2772* win32_threads.c (GC_reset_finalizer_nested,
2773GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
2774GC_start_world, GC_push_all_stacks, GC_get_next_stack,
2775GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
2776GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
2777GC_thr_init, GC_init_parallel, GC_lock,
2778GC_mark_thread_local_free_lists): Likewise.
2779* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
2780GC_traverse_back_graph): Use GC_INNER for the function prototype.
2781* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
2782Likewise.
2783* dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
2784* dyn_load.c (GC_parse_map_entry, GC_get_maps,
2785GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
2786GC_get_next_stack): Likewise.
2787* finalize.c (GC_reset_finalizer_nested,
2788GC_check_finalizer_nested): Likewise.
2789* gcj_mlc.c (GC_start_debugging): Likewise.
2790* include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
2791GC_has_other_debug_info, GC_store_debug_info): Likewise.
2792* include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
2793* include/private/gc_locks.h (GC_lock): Likewise.
2794* include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
2795GC_mark_from): Likewise.
2796* include/private/pthread_support.h (GC_lookup_thread,
2797GC_stop_init): Likewise.
2798* include/private/thread_local_alloc.h (GC_init_thread_local,
2799GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
2800* malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
2801* mark.c (GC_page_was_ever_dirty): Likewise.
2802* mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
2803* misc.c (GC_register_main_static_data, GC_init_win32,
2804GC_setpagesize, GC_init_linux_data_start,
2805GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
2806GC_do_blocking_inner): Likewise.
2807* os_dep.c (GC_greatest_stack_base_below): Likewise.
2808* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
2809Likewise.
2810* include/private/gc_priv.h: Likewise.
2811* include/private/gc_priv.h (GC_INNER): Update the comment.
2812* doc/README.macros (GC_DLL): Update.
2813
2814* alloc.c (GC_collection_in_progress): Move the prototype to
2815gc_priv.h.
2816* gc_dlopen.c (GC_collection_in_progress): Likewise.
2817* pthread_support.c (GC_collection_in_progress): Likewise.
2818* misc.c (GC_init_parallel): Likewise.
2819* pthread_support.c (GC_init_parallel): Likewise.
2820* win32_threads.c (GC_init_parallel): Likewise.
2821* darwin_stop_world.c (GC_thr_init): Likewise.
2822* misc.c (GC_thr_init): Likewise.
2823* pthread_stop_world.c (GC_thr_init): Likewise.
2824* pthread_support.c (GC_thr_init): Likewise.
2825* blacklst.c (GC_clear_bl, GC_copy_bl,
2826GC_number_stack_black_listed): Make STATIC.
2827* dbg_mlc.c (GC_print_obj, GC_make_closure,
2828GC_debug_invoke_finalizer): Likewise.
2829* malloc.c (GC_alloc_large_and_clear): Likewise.
2830* mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
2831GC_push_marked4, GC_push_marked, GC_push_next_marked,
2832GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
2833Likewise.
2834* misc.c (GC_clear_stack_inner): Likewise.
2835* os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
2836* darwin_stop_world.c (FindTopOfStack): Make static; define only
2837if not DARWIN_DONT_PARSE_STACK.
2838* dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
2839* dyn_load.c (GC_repeat_read): Remove unused prototype.
2840* include/private/gc_pmark.h (GC_find_start): Likewise.
2841* misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
2842* dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
2843THREADS).
2844* dyn_load.c (GC_register_main_static_data): Define only if
2845DYNAMIC_LOADING.
2846* finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
2847"return" statement.
2848* gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
2849GC_PTHREADS).
2850* include/gc.h: Fix a typo.
2851* include/gc_inline.h (GC_ASSERT): Define (if not defined) since
2852the header is public.
2853* include/gc_inline.h (GC_generic_malloc_many): New public
2854function declaration.
2855* mallocx.c (GC_generic_malloc_many): Make public.
2856* include/private/gc_priv.h (GC_INNER): Use visibility attribute
2857(if available).
2858* include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
2859* include/private/gc_priv.h: Include atomic_ops.h if THREADS and
2860MPROTECT_VDB.
2861* os_dep.c: Don't include atomic_ops.h
2862* win32_threads.c: Likewise.
2863* include/private/gc_priv.h (GC_push_selected, GC_push_regs,
2864GC_push_marked, GC_number_stack_black_listed,
2865GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
2866GC_generic_malloc_many, GC_make_closure,
2867GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
2868Remove the prototype.
2869* mark.c (GC_page_was_ever_dirty): Add prototype (only if
2870PROC_VDB).
2871* include/private/gc_priv.h (GC_push_next_marked_dirty,
2872GC_push_next_marked, GC_push_next_marked_uncollectable): Move
2873the prototype to mark.c.
2874* include/private/gc_priv.h (GC_is_static_root): Declare only if
2875not THREADS.
2876* include/private/gc_priv.h (GC_free_inner): Declare only if
2877THREADS.
2878* include/private/gc_priv.h (GC_debug_free_inner): Declare only if
2879THREADS and DBG_HDRS_ALL.
2880* include/private/gc_priv.h (GC_markers): Declare GC_markers only
2881if PARALLEL_MARK.
2882* include/private/gc_priv.h (GC_register_main_static_data): Move
2883the prototype to misc.c.
2884* mach_dep.c (GC_push_regs): Make STATIC; define only along with
2885HAVE_PUSH_REGS definition.
2886* mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
2887definition with the ANSI C one.
2888* mark.c (GC_started_thread_while_stopped): Declared only if not
2889GNU C.
2890* win32_threads.c (GC_started_thread_while_stopped): Don't define
2891if GNU C.
2892* mark.c (GC_mark_from): Avoid unbalanced brackets in
2893#if-#else-#endif blocks.
2894* mark_rts.c (GC_is_static_root): Define only if not THREADS.
2895* os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
2896* os_dep.c (GC_page_was_ever_dirty): Comment out the function
2897except for PROC_VDB.
2898* tests/test.c (main): Don't reference GC_print_obj,
2899GC_make_closure, GC_debug_invoke_finalizer,
2900GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
2901* thread_local_alloc.c: Don't include "gc_inline.h".
2902* win32_threads.c (GC_write_fault_handler): Declare only if
2903MPROTECT_VDB.
2904
2905* allchblk.c (DEBUG): Remove macro (since unused).
2906* allchblk.c: Include private/gc_priv.h before other includes and
2907definitions.
2908* alloc.c: Likewise.
2909* gc_dlopen.c: Likewise.
2910* headers.c: Likewise.
2911* mallocx.c: Likewise.
2912* mark_rts.c: Likewise.
2913* new_hblk.c: Likewise.
2914* reclaim.c: Likewise.
2915* mark.c: Include private/gc_pmark.h before other includes.
2916* misc.c: Likewise.
2917* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
2918* pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
2919* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
2920already 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
2924possible 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
2927headers inclusion.
2928* tests/test.c: Likewise.
2929* include/private/gcconfig.h (DebugBreak): Update the comment.
2930* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
2931
2932* configure.ac (openbsd): Define GC_OPENBSD_THREADS.
2933* configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
2934* configure.ac: Add sparc-openbsd case.
2935* doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
2936Document.
2937* tests/test.c (main): Handle OpenBSD case.
2938* include/private/pthread_stop_world.h: Likewise.
2939* extra/threadlibs.c (main): Replace K&R-style function definition
2940with the ANSI C one.
2941* extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
2942* dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
2943* include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
2944define it for OpenBSD.
2945* include/gc_pthread_redirects.h (GC_pthread_sigmask,
2946pthread_sigmask): Don't declare and redefine for OpenBSD.
2947* include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
2948amd64, powerpc).
2949* mach_dep.c (NO_GETCONTEXT): Likewise.
2950* include/private/pthread_stop_world.h (thread_stop_info): Don't
2951define last_stop_count field if OpenBSD.
2952* misc.c (GC_init_dyld): Add declaration (if NetBSD).
2953* misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
2954* os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
2955* os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
2956(only if OpenBSD).
2957* os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
2958GC_skip_hole_openbsd): New static function (only if OpenBSD).
2959* os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
2960GC_register_data_segments): Define specially for OpenBSD case.
2961* os_dep.c (GC_fault_handler_lock): Initialize to
2962AO_TS_INITIALIZER (instead of 0).
2963* pthread_support.c (GC_allocate_lock): Likewise.
2964* pthread_stop_world.c (NSIG, GC_print_sig_mask,
2965GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
2966GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
2967GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
2968GC_restart_handler): Don't define and use if OpenBSD.
2969* pthread_stop_world.c (GC_suspend_all, GC_stop_world,
2970GC_start_world): Handle OpenBSD case.
2971* pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
2972* pthread_support.c (pthread_sigmask): Don't undefine the macro and
2973don't define the wrapper function if OpenBSD.
2974* pthread_support.c (GC_thr_init): Handle OpenBSD case.
2975
2976* dyn_load.c: Move the inclusion of private/gc_priv.h below
2977definition of a feature macro (_GNU_SOURCE).
2978
2979* include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
2980* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
2981(only if GC_I_HIDE_POINTERS).
2982* backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
2983* dbg_mlc.c (GC_get_back_ptr_info): Likewise.
2984* finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
2985GC_enqueue_all_finalizers): Likewise.
2986* backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
2987* finalize.c (GC_general_register_disappearing_link,
2988GC_unregister_disappearing_link, GC_register_finalizer_inner,
2989GC_finalize): Likewise.
2990* include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
2991* include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
2992of I_HIDE_POINTERS.
2993* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
2994* include/gc.h (_GC_H): Strip leading underscore.
2995* include/gc_backptr.h (_GC_H): Likewise.
2996* include/gc_gcj.h (_GC_H): Likewise.
2997* include/gc_mark.h (_GC_H): Likewise.
2998* include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
2999* include/javaxfc.h (_GC_H): Likewise.
3000* include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
3001* include/private/dbg_mlc.h (_GC_H): Likewise.
3002* include/private/gc_priv.h (_GC_H): Likewise.
3003
3004* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
3005
3006* include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
3007variable definitions).
3008* include/private/gc_priv.h (GC_EXTERN): Update the comment.
3009* allchblk.c (GC_unmap_threshold): Define as GC_INNER.
3010* alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
3011GC_n_memory, GC_fail_count): Likewise.
3012* blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
3013* gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
3014* mach_dep.c (GC_save_regs_ret_val): Likewise.
3015* mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
3016GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
3017GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
3018GC_mark_no, GC_markers): Likewise.
3019* mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
3020* misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
3021GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
3022GC_backtraces, GC_force_unmap_on_gcollect,
3023GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
3024GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
3025* os_dep.c (GC_page_size, GC_dont_query_stack_min,
3026GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
3027GC_dirty_maintained, GC_fault_handler_lock): Likewise.
3028* pthread_support.c (GC_allocate_ml, GC_lock_holder,
3029GC_need_to_lock, GC_thr_initialized, GC_threads,
3030GC_in_thread_creation, GC_collecting, GC_allocate_lock,
3031GC_mark_lock_holder): Likewise.
3032* reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
3033Likewise.
3034* win32_threads.c (GC_allocate_ml, GC_lock_holder,
3035GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
3036* extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
3037* mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
3038
3039* include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
3040GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
3041case (since they are not defined inside GC at present).
3042* include/private/gc_priv.h (GC_objects_are_marked): Remove the
3043declaration (since made static).
3044* mark.c (GC_objects_are_marked): Define as STATIC.
3045* win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
3046Likewise.
3047* mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
3048to initialize GC_n_kinds).
3049* win32_threads.c (start_mark_threads): Adjust the comment.
3050
3051* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
3052function.
3053* backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
3054* mark_rts.c (add_roots_to_index): Likewise.
3055
3056* extra/gc.c: New file.
3057* Makefile.am (EXTRA_DIST): Add "extra/gc.c".
3058
3059* misc.c (GC_log): Remove the declaration; move the definition (to
3060the place where it is used); make STATIC.
3061* misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
3062to print open log failure.
3063* misc.c (GC_write): Don't abort on open log failure if the GC is
3064compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
3065
3066* include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
3067
3068* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
3069the variable declaration to gc_priv.h.
3070* alloc.c (GC_bytes_found, GC_unmap_threshold,
3071GC_force_unmap_on_gcollect): Likewise.
3072* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
3073* finalize.c (GC_fail_count): Likewise.
3074* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
3075GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
3076* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
3077GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
3078GC_mark_stack_too_small, GC_mark_state): Likewise.
3079* include/private/pthread_support.h (GC_threads,
3080GC_thr_initialized, GC_in_thread_creation): Likewise.
3081* mallocx.c (GC_bytes_found): Likewise.
3082* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
3083* misc.c (GC_unmap_threshold): Likewise.
3084* os_dep.c (GC_unmap_threshold): Likewise.
3085* pthread_support.c (GC_markers): Likewise.
3086* thread_local_alloc.c (GC_gcjobjfreelist,
3087GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
3088* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
3089GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
3090* include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
3091a tag for now); defined after "gcconfig.h" inclusion.
3092* include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
3093keyword for most global variables.
3094* alloc.c (GC_copyright): Add the comment about the symbol
3095visibility.
3096* finalize.c (GC_fo_entries): Likewise.
3097* include/private/gc_priv.h (GC_print_stats): Likewise.
3098* misc.c (GC_quiet): Likewise.
3099* mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
3100STATIC.
3101* pthread_support.c (GC_threads): Add explicit zero initializer
3102(to make the variable definition differ from the declaration).
3103
3104* backgraph.c (GC_quiet): Remove the declaration (not needed
3105anymore since gc_priv.h is always included).
3106* checksums.c (GC_quiet): Likewise.
3107* gcj_mlc.c (GC_quiet): Likewise.
3108* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
3109comment.
3110* include/private/gc_hdrs.h (GC_hdr_cache_hits,
3111GC_hdr_cache_misses): Likewise.
3112* mark.c (GC_first_nonempty): Make the volatile variable STATIC.
3113* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
3114Likewise.
3115* win32_threads.c (GC_please_stop, GC_max_thread_index,
3116GC_mark_mutex_waitcnt): Likewise.
3117
3118* pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
3119'D') in the name.
3120
3121* gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
3122redirection is turned off; turn it on later when dlopen real
3123symbol is no longer needed (according to the comment and the same
3124as in dyn_load.c).
3125* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
3126REAL_DLFUNC, respectively (to have unique names since the
3127definitions may differ from that of the similar ones in
3128pthread_support.c).
3129* mark.c (source): Undefine the macro when no longer needed.
3130* os_dep.c (handler): Rename the type to GC_fault_handler_t (to
3131have the unique name across the project).
3132* os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
3133comment.
3134* pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
3135* os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
3136longer needed.
3137
3138* pthread_stop_world.c (pthread_sigmask): Undefine before using
3139in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
3140* win32_threads.c (dlopen, _beginthread): Don't undefine (since
3141neither redirected nor used here).
3142* win32_threads.c (GC_Thread_Rep): Rename "table_management" to
3143"tm" for short; remove "tm_" prefix.
3144* win32_threads.c (in_use, next): Don't define the macros; use
3145tm.in_use and tm.next fields, respectively (to ease debugging).
3146* win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
3147unique name across the project).
3148
3149* include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
3150inclusion.
3151* include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
3152not included yet.
3153* finalize.c (I_HIDE_POINTERS): Don't define.
3154* include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
3155* misc.c (I_HIDE_POINTERS): Likewise.
3156* include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
3157GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
3158* include/private/gc_pmark.h: Remove the comment about gc_priv.h
3159inclusion order.
3160
3161* dyn_load.c: Include gc_priv.h before using configuration
3162information (MACOS).
3163* dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
3164GC_MUST_RESTORE_REDEFINED_DLOPEN.
3165
3166* backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
3167properly.
3168* darwin_stop_world.c: Replace "if DEBUG_THREADS" with
3169"ifdef DEBUG_THREADS".
3170* pthread_stop_world.c: Likewise.
3171* pthread_support.c: Likewise.
3172* include/gc_inline.h: Guard with GC_INLINE_H.
3173
3174* alloc.c (GC_copyright): Define as const.
3175* alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
3176(since the name starts with "GC_" prefix).
3177* dbg_mlc.c (GC_describe_type_fns): Likewise.
3178* dyn_load.c (GC_FirstDLOpenedLinkMap,
3179GC_register_dynlib_callback, GC_dyld_sections,
3180GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
3181Likewise.
3182* malloc.c (GC_libpthread_start, GC_libpthread_end,
3183GC_libld_start, GC_libld_end): Likewise.
3184* mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
3185Likewise.
3186* os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
3187GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
3188GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
3189GC_forward_exception): Likewise.
3190* pthread_support.c (GC_syms_initialized): Likewise.
3191* typd_mlc.c (GC_push_typed_structures_proc): Likewise.
3192* win32_threads.c (GC_win32_dll_threads,
3193GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
3194GC_waitForSingleObjectInfinite): Likewise.
3195* darwin_stop_world.c (GC_use_mach_handler_thread,
3196GC_use_mach_handler_thread, GC_mach_threads_count): Replace
3197"static" with "STATIC" and add zero initializer.
3198* os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
3199GC_sigbus_count): Likewise.
3200* headers.c (free_hdr): Replace "static" with GC_INLINE.
3201* misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
3202* os_dep.c (memory): Rename static variable to ecos_gc_memory.
3203* os_dep.c (async_set_pht_entry_from_index): Make static (for
3204MPROTECT_VDB case).
3205* pthread_support.c (GC_real_pthread_create,
3206GC_real_pthread_sigmask, GC_real_pthread_join,
3207GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
3208for static GC_real_XXX symbols.
3209* win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
3210
3211* alloc.c (GC_finish_collection): Replace getenv() with GETENV().
3212* dyn_load.c (GC_init_dyld): Likewise.
3213* os_dep.c (GC_print_callers): Likewise.
3214* dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
3215result (since it's always of "struct mach_header" type).
3216* dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
3217GC_dyld_image_remove (to always have the first argument of
3218"struct mach_header" pointer type).
3219
3220* configure.ac: Add threads support for OpenBSD case (threads may
3221not work correctly for it).
3222
3223* acinclude.m4: Rename to m4/gc_set_version.m4.
3224* m4/libtool.m4: Delete the file.
3225* m4/lt~obsolete.m4: Likewise.
3226* m4/ltoptions.m4: Likewise.
3227* m4/ltsugar.m4: Likewise.
3228* m4/ltversion.m4: Likewise.
3229
3230* include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
3231x86mingw32ce toolchain to workaround the incorrect DebugBreak()
3232declaration in winbase.h (the workaround would turn into a no-op
3233when DebugBreak() will be defined as a macro in the toolchain).
3234
3235* include/private/gcconfig.h: Recognize __i386__ if WinCE (for
3236x86mingw32ce toolchain).
3237* include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
3238toolchain (or if already defined).
3239* include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
3240defined for WinCE or if NO_GETENV is defined).
3241* misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
3242NO_GETENV one.
3243
3244* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
3245* Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
3246* libtool.m4: Remove.
3247* m4/libtool.m4: New file (generated).
3248* m4/lt~obsolete.m4: Likewise.
3249* m4/ltoptions.m4: Likewise.
3250* m4/ltsugar.m4: Likewise.
3251* m4/ltversion.m4: Likewise.
3252
3253* include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
3254prefix GC_CreateThread and GC_ExitThread with '_' if defined.
3255* doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
3256
3257* alloc.c (GC_collect_or_expand): Add "retry" argument; add the
3258comments; don't use "default" stop_func on a retry if
3259GC_dont_expand.
3260* alloc.c (GC_allocobj): Pass "retry" argument to
3261GC_collect_or_expand().
3262* malloc.c (GC_alloc_large): Likewise.
3263* include/private/gc_priv.h (GC_collect_or_expand): Move the
3264declaration to malloc.c; add "retry" argument.
3265
3266* alloc.c (GC_start_call_back): Move the variable definition from
3267misc.c.
3268* include/private/gc_priv.h (GC_start_call_back): Remove the
3269declaration.
3270* alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
3271* alloc.c (GC_try_to_collect_inner): Also call stop_func at the
3272beginning of the function.
3273* include/gc.h (GC_try_to_collect): Refine the comment about
3274stop_func.
3275
3276* alloc.c (GC_default_stop_func, GC_try_to_collect_general,
3277GC_gcollect): Add the comment.
3278* alloc.c (GC_try_to_collect_general): Move the assertion on
3279stop_func != 0 to GC_try_to_collect().
3280* alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
3281GC_default_stop_func instead (holding the lock).
3282* alloc.c (GC_gcollect): Pass 0 as stop_func instead of
3283GC_default_stop_func (to prevent data races).
3284
3285* Makefile.direct: Move "define arguments" documentation to
3286doc/README.macros; add reference to doc/README.macros.
3287* Makefile.dj: Change the documentation reference to
3288doc/README.macros.
3289* README.QUICK: Likewise.
3290* configure.ac: Likewise.
3291* allchblk.c: Remove unnecessary "-D" from the comment.
3292* doc/README.macros: Likewise.
3293* README.environment: Likewise.
3294* include/gc.h: Likewise.
3295* include/gc_inline.h: Likewise.
3296* include/private/gcconfig.h: Likewise.
3297* README.QUICK: Fix a typo.
3298
3299* misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
3300CreateFile(); don't immediately flush every write if very verbose.
3301
3302* doc/README.win32: Replace ".exe.log" to ".gc.log".
3303* doc/README.win64: Likewise.
3304* doc/README.win64: Fix a typo.
3305* misc.c (GC_CreateLogFile): Strip executable file extension for
3306the log file; use ".gc.log" extension (instead of ".log").
3307
3308* include/gc_config_macros.h: Avoid the redefinition of
3309GC_xxx_THREADS macros.
3310
3311* alloc.c (GC_try_to_collect_general): Change the type of "result"
3312local variable to GC_bool.
3313
3314* include/gc_config_macros.h: Use old behavior for FreeBSD and
3315NetBSD platform detection code (check that other GC_xxx_THREADS
3316are undefined); add FIXME.
3317
3318* include/gc_config_macros.h: Rearrange the platform detection
3319code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
3320GC_THREADS first if GC_XXX_THREADS already set; define proper
3321GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
3322place; define _REENTRANT if posix threads except for Win32).
3323
3324* alloc.c (GC_try_to_collect_general): New function (move the code
3325from GC_try_to_collect, pass force_unmap argument).
3326* alloc.c (GC_try_to_collect, GC_gcollect): Call
3327GC_try_to_collect_general().
3328* alloc.c (GC_gcollect_and_unmap): New public function.
3329* include/gc.h (GC_gcollect_and_unmap): New function declaration.
3330* tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
3331WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
3332and GC_gcollect()).
3333
3334* include/gc.h (GC_allow_register_threads, GC_register_my_thread,
3335GC_unregister_my_thread, GC_malloc_many): Refine the comment.
3336* include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
3337(that is, don't depend on GC_THREADS macro).
3338* include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
3339with a check for GC_PTHREADS (since the former implies the
3340latter).
3341
3342* include/gc.h (GC_SOLARIS_THREADS): Don't check for.
3343* include/gc.h (GC_MIN, GC_MAX): Don't define.
3344* mallocx.c (GC_malloc_many): Add comment to #endif.
3345
3346* configure.ac: Drop the subdir-objects Automake option, since
3347it's incompatible with picking source files from libatomic_ops.
3348
3349* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
3350"extern" keyword to a global variable declaration (some compilers
3351require it).
3352* alloc.c (GC_bytes_found, GC_unmap_threshold,
3353GC_force_unmap_on_gcollect): Likewise.
3354* dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
3355* finalize.c (GC_fail_count): Likewise.
3356* include/private/gc_hdrs.h (GC_hdr_cache_hits,
3357GC_hdr_cache_misses): Likewise.
3358* mallocx.c (GC_bytes_found): Likewise.
3359* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
3360* misc.c (GC_unmap_threshold): Likewise.
3361* os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
3362* pthread_support.c (GC_markers): Likewise.
3363* thread_local_alloc.c (GC_gcjobjfreelist,
3364GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
3365* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
3366GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
3367
3368* tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
3369suppress misleading GC "Out of Memory!" warning printed on every
3370GC_MALLOC(LONG_MAX) call.
3371* tests/huge_test.c: Include "gc.h" instead of <gc.h>.
3372* tests/huge_test.c (main): Replace K&R-style function definition
3373with the ANSI C one.
3374
3375* dyn_load.c (GC_register_dynamic_libraries): Always use
3376lpMaximumApplicationAddress value for WinCE (even for old
3377versions).
3378* os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
3379* os_dep.c (GC_dont_query_stack_min): New global variable (only if
3380WinCE and THREADS).
3381* os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
3382for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
3383GC_dont_query_stack_min for older WinCE (prior to version 5).
3384* win32_threads.c (GC_dont_query_stack_min): Declare.
3385* win32_threads.c (GC_get_stack_min): Rename the macro to
3386GC_wince_evaluate_stack_min for WinCE; update the comment.
3387* win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
3388GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
3389WinCE and don't update thread's last_stack_min value (only if
3390GC_dont_query_stack_min).
3391* win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
3392GC_dont_query_stack_min (since the evaluated stack_min value may
3393be incorrect if the stack is bigger than 64 KiB).
3394
3395* gc_dlopen.c (GC_dlopen): Add function redirector (only if
3396GC_USE_LD_WRAP).
3397* include/gc.h: Include "gc_pthread_redirects.h" even if
3398GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
3399* include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
3400define and check for (since included only from gc.h).
3401* include/gc_pthread_redirects.h: Declare "GC_" symbols even if
3402GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
3403* include/gc_pthread_redirects.h: Include signal.h only to get
3404sigset_t definition.
3405
3406* Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
3407* mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
3408NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
3409* os_dep.c (GC_sysinfo): Remove explicit global variable
3410initialization to "{0}" (revert back the previous change) since it
3411might produce a warning.
3412
3413* allchblk.c (GC_large_alloc_warn_interval): Move declaration from
3414gc_priv.h.
3415* allchblk.c (GC_large_alloc_warn_suppressed): Move definition
3416from misc.c; define as STATIC.
3417* include/private/gc_priv.h (GC_large_alloc_warn_interval,
3418GC_large_alloc_warn_suppressed): Remove declaration.
3419* alloc.c (GC_bytes_found): Add "defined in" comment.
3420* mallocx.c (GC_bytes_found): Likewise.
3421* misc.c (GC_unmap_threshold): Likewise.
3422* os_dep.c (GC_old_allocator): Likewise.
3423* pthread_support.c (GC_markers): Likewise.
3424* thread_local_alloc.c (GC_gcjobjfreelist,
3425GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
3426* win32_threads.c (GC_markers): Likewise.
3427* alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
3428be distinctive from a variable declaration).
3429* backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
3430* blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
3431GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
3432* checksums.c (GC_faulted, GC_n_dirty_errors,
3433GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
3434GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
3435* dbg_mlc.c (GC_smashed): Likewise.
3436* finalize.c (GC_old_dl_entries): Likewise.
3437* gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
3438GC_gcjdebugobjfreelist): Likewise.
3439* mach_dep.c (GC_save_regs_ret_val): Likewise.
3440* mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
3441GC_mark_stack_top): Likewise.
3442* misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
3443Likewise.
3444* os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
3445GC_old_segv_handler, GC_old_bus_handler,
3446GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
3447GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
3448* pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
3449* reclaim.c (GC_leaked): Likewise.
3450* typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
3451GC_typed_mark_proc_index, GC_array_mark_proc_index,
3452GC_eobjfreelist, GC_arobjfreelist): Likewise.
3453* win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
3454GC_marker_Id): Likewise.
3455* dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
3456* gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
3457* os_dep.c (GC_vd_base): Likewise.
3458* pthread_support.c (GC_mark_threads): Likewise.
3459* reclaim.c (GC_leaked): Likewise.
3460* typd_mlc.c (GC_bm_table): Likewise.
3461* mark_rts.c (GC_save_regs_ret_val): Change declaration type to
3462that of definition; add "defined in" comment.
3463* mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
3464GC_save_regs_ret_val.
3465* misc.c (GC_check_heap, GC_print_all_smashed,
3466GC_start_call_back): Remove unnecessary cast (of 0).
3467* misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
3468* misc.c (GC_large_alloc_warn_interval): Initialize to
3469GC_LARGE_ALLOC_WARN_INTERVAL value.
3470* misc.c (GC_tmp): Change to "static".
3471* os_dep.c (GC_mprotect_state): Define as static.
3472* pthread_support.c (dummy_thread_local): Prefix with "GC_".
3473* win32_threads.c (WinMain): Remove FIXME for WinCE.
3474
3475* os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
3476
3477* configure.ac: Rewrite the tests for external or internal
3478libatomic_ops.
3479* configure.ac: In particular, drop the symbolic links. Add option
3480--with-libatomic-ops for forced selection.
3481* Makefile.am: Adjust the path of source files from libatomic_ops
3482to not use the links.
3483* Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
3484be empty if we use the bundled AO sources.
3485
3486* Makefile.am: Strip version suffix for libatomic_ops directory.
3487* build_atomic_ops.sh: Likewise.
3488* build_atomic_ops.sh.cygwin: Likewise.
3489* configure_atomic_ops.sh: Likewise.
3490* Makefile.direct: Remove AO_VERSION definition; strip version
3491suffix for libatomic_ops directory.
3492* NT_STATIC_THREADS_MAKEFILE: Likewise.
3493* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3494* NT_X64_THREADS_MAKEFILE: Likewise.
3495* gc.mak: Likewise.
3496
3497* libatomic_ops: Rename from "libatomic_ops-1.2".
3498
3499* alloc.c (GC_version): Add "const" keyword.
3500* alloc.c (GC_get_version): New public function.
3501* include/gc.h (GC_get_version): New function declaration; update
3502the comment for the GC version.
3503
3504* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
3505GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
3506(for the global variable declaration) again.
3507* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
3508GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
3509GC_mark_stack_too_small, GC_mark_state): Likewise.
3510* include/private/gcconfig.h (GC_register_stackbottom): Likewise.
3511* include/private/pthread_support.h (GC_threads,
3512GC_thr_initialized, GC_in_thread_creation): Likewise.
3513* include/private/gc_priv.h: Likewise.
3514
3515* real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
3516
3517* allchblk.c (GC_hblkfreelist): Define as STATIC.
3518* blacklst.c (GC_total_stack_black_listed): Likewise.
3519* include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
3520GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
3521declaration.
3522* mark_rts.c (GC_stopped_mark): Add declaration (only if
3523THREAD_LOCAL_ALLOC).
3524* allchblk.c (GC_fail_count): Move the declaration out of
3525GC_allochblk_nth(); remove "extern".
3526* alloc.c (IF_THREADS): Remove unused macro.
3527* alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
3528* alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
3529THREAD_LOCAL_ALLOC.
3530* alloc.c (GC_bytes_found, GC_collection_in_progress,
3531GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
3532Remove K&R-style "extern" for the declaration.
3533* dbg_mlc.c (GC_free_inner): Likewise.
3534* dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
3535GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
3536* finalize.c (GC_fail_count): Likewise.
3537* include/private/gc_hdrs.h (GC_hdr_cache_hits,
3538GC_hdr_cache_misses): Likewise.
3539* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
3540GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
3541Likewise.
3542* include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
3543GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
3544GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
3545* include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
3546GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
3547GC_page_size, GC_sysinfo, GC_black_list_spacing,
3548GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
3549GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
3550GC_large_alloc_warn_suppressed, GC_blocked_sp,
3551GC_activation_frame, GC_push_other_roots,
3552GC_push_finalizer_structures, GC_push_thread_structures,
3553GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
3554GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
3555GC_print_heap_obj, GC_have_errors, GC_print_stats,
3556GC_dump_regularly, GC_backtraces, GC_print_back_height,
3557GC_debug_generic_malloc_inner,
3558GC_debug_generic_malloc_inner_ignore_off_page,
3559GC_fl_builder_count, GC_mark_no, GC_help_marker,
3560GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
3561* include/private/gcconfig.h (GC_SysVGetDataStart,
3562GC_FreeBSDGetDataStart, GC_register_stackbottom,
3563GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
3564* include/private/pthread_support.h (GC_threads,
3565GC_thr_initialized, GC_in_thread_creation): Likewise.
3566* malloc.c (GC_text_mapping): Likewise.
3567* mallocx.c (GC_bytes_found): Likewise.
3568* mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
3569* mark_rts.c (GC_save_regs_ret_val): Likewise.
3570* misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
3571GC_setpagesize, GC_init_linux_data_start,
3572GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
3573* os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
3574GC_darwin_register_mach_handler_thread): Likewise.
3575* pthread_support.c (GC_markers, GC_collection_in_progress):
3576Likewise.
3577* tests/test.c (GC_amiga_free_all_mem): Likewise.
3578* thread_local_alloc.c (GC_gcjobjfreelist,
3579GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
3580* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
3581GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
3582* misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
3583Move the declaration out of GC_init(); remove "extern".
3584* os_dep.c (GC_abort): Add the comment; add workaround to suppress
3585compiler "unreachable code" warnings for ABORT callers (where
3586ABORT is followed by a dummy return statement).
3587* os_dep.c (GC_old_allocator): Move the declaration out of
3588GC_default_push_other_roots(); remove "extern".
3589* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
3590Move the declaration out of GC_stop_world() and GC_start_world()
3591(only if MPROTECT_VDB); remove "extern".
3592
3593* win32_threads.c (GC_get_stack_min, GC_push_stack_for,
3594GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
3595WinCE emulation and for custom WinCE 6 devices); add the comment.
3596* win32_threads.c (GC_get_stack_min): Cast pointer to word instead
3597of DWORD.
3598* win32_threads.c (GC_get_next_stack): Don't use and maintain the
3599latest known stack_min value for WinCE (if GC_get_stack_min is
3600defined as a macro); update the comments.
3601* win32_threads.c (GC_wnt): Don't declare for WinCE.
3602
3603* Makefile.direct: Document EMPTY_GETENV_RESULTS.
3604* gcj_mlc.c (GC_clear_stack): Remove declaration.
3605* malloc.c (GC_clear_stack): Likewise.
3606* mallocx.c (GC_clear_stack): Likewise.
3607* typd_mlc.c (GC_clear_stack): Likewise.
3608* gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
3609GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
3610remove "lb" unnecessary cast to word.
3611* include/private/gc_priv.h (GC_clear_stack): Add declaration.
3612* include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
3613Move common declaration from typd_mlc.c and malloc.c; remove
3614unnecessary result and "lb" parameter casts.
3615* include/private/thread_local_alloc.h: Guard against duplicate
3616header file inclusion.
3617* os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
3618the case when USE_MMAP is not defined.
3619* pthread_support.c (GC_is_thread_tsd_valid): New internal
3620function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
3621code from thread-local GC_malloc(); add FIXME for the condition.
3622* win32_threads.c (GC_is_thread_tsd_valid): Likewise.
3623* thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
3624match that of its definition).
3625* thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
3626GC_gcjobjfreelist.
3627* thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
3628Remove unused declaration; don't include pthread.h.
3629* thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
3630(only if GC_ASSERTIONS).
3631* thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
3632instead of GC_lookup_thread().
3633* win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
3634* win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
3635id different from that in os_dep.c).
3636
3637* allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
3638with GC_INLINE.
3639* include/private/gc_priv.h (fixed_getenv): Likewise.
3640* alloc.c (GC_max, GC_min): Replace "static INLINE" with
3641GC_INLINE.
3642* mark_rts.c (rt_hash): Likewise.
3643* win32_threads.c (GC_get_max_thread_index): Likewise.
3644* include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
3645"static"; define for Sun CC; define for VC++ (and other
3646compilers).
3647* pthread_support.c: Don't define __inline__ for non-GNU compilers
3648(not needed anymore).
3649
3650* NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
3651* Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
3652* Makefile.am: Likewise.
3653* Makefile.dj: Likewise.
3654* Makefile.direct: Likewise.
3655* doc/README.win32: Add reference to gc.mak.
3656* NT_X64_THREADS_MAKEFILE: Likewise.
3657
3658* Makefile.direct: Remove references to acinclude.m4, libtool.m4.
3659
3660* autogen.sh: Update.
3661
3662* Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
3663* acinclude.m4: Fix underquoting of GC_SET_VERSION.
3664* README.QUICK: Update information for Makefile.
3665* Makefile.am: Do not distribute the substituted bdw-gc.pc.
3666* configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
3667* tests/tests.am: Use it here to conditionally enable tracetest
3668when possible.
3669
3670* dyn_load.c (GC_wnt): Update the comment.
3671* dyn_load.c (GC_register_dynamic_libraries): Add the comment for
3672_WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
3673macro); call GC_is_heap_base() only if check for Type succeeded.
3674
3675* mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
3676update the comment.
3677* include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
3678
3679* include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
3680* include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
3681ASSERT_CANCEL_DISABLED): New macros.
3682* alloc.c (GC_maybe_gc): Assert cancellation disabled.
3683(GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
3684Disable cancellation.
3685(GC_add_to_our_memory): Check for overflow.
3686* misc.c (GC_cancel_disable_count): declare.
3687(GC_init, GC_write): Disable cancellation.
3688(GC_init): Remove redundant GC_is_initialized test.
3689* os_dep.c (GC_repeat_read): Assert cancellation disabled.
3690(GC_get_stack_base): Disable cancellation.
3691* pthread_stop_world.c (GC_suspend_handler_inner): Disable
3692cancellation.
3693* pthread_support.c (GC_mark_thread): Permanently disable
3694cancellation.
3695(GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
3696Assert cancellation disabled.
3697(fork handling): Disable cancellation, fix comment.
3698(GC_pthread_create): Disable cancellation.
3699(GC_unregister_my_thread): Disable cancellation.
3700* Makefile.direct: Document NO_CANCEL_SAFE.
3701
3702* Makefile: Remove outdated file (Makefile.direct should be used
3703instead).
3704
3705* include/gc.h (GC_use_DllMain): Refine the comment.
3706
3707* configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
3708EMPTY_GETENV_RESULTS.
3709* configure.ac: Fix a typo.
3710* Makefile.am: Likewise.
3711
3712* checksums.c (GC_checksum, GC_update_check_page): Remove
3713"register" keyword in local variable declarations (for the code
3714used only for debugging or which is not time-critical).
3715* dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
3716GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
3717GC_print_smashed_obj, GC_debug_end_stubborn_change,
3718GC_debug_invoke_finalizer): Likewise.
3719* dyn_load.c (GC_register_dynamic_libraries): Likewise.
3720* mallocx.c (GC_realloc): Likewise.
3721* mark_rts.c (GC_print_static_roots, GC_is_static_root,
3722GC_clear_roots): Likewise.
3723* misc.c (GC_write): Likewise.
3724* os_dep.c (GC_print_callers): Likewise.
3725* dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
3726variable to "j" for the nested loop (just not to hide the similar
3727variable in the outer one).
3728* mark_rts.c (GC_print_static_roots): Output an error message
3729using GC_err_printf() (instead of GC_printf()).
3730
3731* configure.ac: Move include flag from ${INCLUDE} ...
3732* Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
3733* configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
3734* configure.ac: Add documentation to all AC_DEFINE either directly
3735or using AH_TEMPLATE.
3736
3737* win32_threads.c (GC_waitForSingleObjectInfinite): New static
3738function (only if GC_WINMAIN_REDIRECT).
3739* win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
3740thru GC_do_blocking() instead of calling WaitForSingleObject()
3741directly.
3742
3743* pthread_support.c (start_mark_threads): Refine printed message.
3744* win32_threads.c (GC_thr_init): Likewise.
3745
3746* Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
3747* Makefile.direct (NO_GETENV): Update the comment.
3748* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
3749* include/gc.h (GC_WinMain): Remove declaration.
3750* include/gc.h (WinMain): Define (as GC_WinMain) if and only if
3751GC_WINMAIN_REDIRECT.
3752* tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
3753WinCE target unless GC_WINMAIN_REDIRECT is defined.
3754* tests/test.c (WINMAIN_LPTSTR): New macro.
3755* tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
3756and GC_WINMAIN_WINCE_LPTSTR.
3757* win32_threads.c (start_mark_threads): Add the comment for
3758MARK_THREAD_STACK_SIZE.
3759* win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
3760* win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
3761macro (only if GC_WINMAIN_REDIRECT).
3762* win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
3763* win32_threads.c (GC_WinMain): Add prototype (only if
3764GC_WINMAIN_REDIRECT).
3765* win32_threads.c (main_thread_args, WinMain): Rename
3766GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
3767* win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
3768use WINMAIN_THREAD_STACK_SIZE.
3769* win32_threads.c (WinMain): Call GC_deinit() and
3770DeleteCriticalSection() only if WinCE; add FIXME.
3771
3772* os_dep.c (GC_get_main_stack_base): add assertion for mem_base
3773value returned by GC_get_stack_base().
3774
3775* Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
3776Add the comment for.
3777* alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
3778Declare external variable (only if USE_MUNMAP).
3779* alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
3780value to 1 if GC_force_unmap_on_gcollect and restore it before
3781unlocking (only if USE_MUNMAP).
3782* doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
3783information for.
3784* include/gc.h (GC_set_force_unmap_on_gcollect,
3785GC_get_force_unmap_on_gcollect): New public function prototype.
3786* include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
3787recognized.
3788* misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
3789* include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
3790internal macro (used by GC_INIT only).
3791* misc.c (GC_force_unmap_on_gcollect): New global variable.
3792* misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
3793environment variable (and set GC_force_unmap_on_gcollect).
3794* misc.c (GC_set_force_unmap_on_gcollect,
3795GC_get_force_unmap_on_gcollect): New public function.
3796* tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
3797to force the mode on if WM_HIBERNATE; restore the mode after
3798GC_gcollect().
3799
3800* Makefile.direct (LARGE_CONFIG): Update information.
3801* include/gc.h (GC_stop_func): Refine the comment.
3802
3803* configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
3804Win32 (workaround for Wine bug).
3805
3806* allchblk.c (GC_freehblk): Adjust local variables indentation.
3807* mallocx.c (GC_generic_malloc_many): Likewise.
3808* typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
3809GC_calloc_explicitly_typed): Likewise.
3810* typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
3811brackets.
3812
3813* configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
3814* configure.ac: Process enable_parallel_mark option for Cygwin and
3815Win32; define THREAD_LOCAL_ALLOC for Win32.
3816
3817* include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
3818PARALLEL_MARK (required for VC++ x86).
3819
3820* dbg_mlc.c (GC_generate_random_backtrace): Call
3821GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
3822if GC is disabled then print error message and return.
3823* include/gc.h (GC_try_to_collect): Refine the comment.
3824* include/private/gc_priv.h (GC_never_stop_func): Fix return type;
3825refine the comment.
3826
3827* add_gc_prefix.c: Move the file to the new "extra" directory.
3828* AmigaOS.c: Likewise.
3829* gcname.c: Likewise.
3830* if_mach.c: Likewise.
3831* if_not_there.c: Likewise.
3832* MacOS.c: Likewise.
3833* msvc_dbg.c: Likewise.
3834* setjmp_t.c: Likewise.
3835* threadlibs.c: Likewise.
3836* EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
3837* Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
3838if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
3839with "extra" directory.
3840* Makefile.am: Likewise.
3841* Makefile.direct: Likewise.
3842* Makefile.dj: Likewise.
3843* Makefile.in: Likewise.
3844* NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
3845* NT_STATIC_THREADS_MAKEFILE: Likewise.
3846* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3847* NT_X64_THREADS_MAKEFILE: Likewise.
3848* NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
3849* gc.mak: Likewise.
3850* PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
3851directory.
3852* SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
3853directory.
3854* doc/simple_example.html: Update for threadlibs.c.
3855* os_dep.c: Prepend included AmigaOS.c with "extra" directory.
3856
3857* include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
3858function prototype.
3859* include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
3860single-threaded case) with an assertion check for the state to be
3861not a "do-blocking" one.
3862* include/private/gc_priv.h (blocking_data): Move the structure
3863definition from pthread_support.c; change "fn" return type to void
3864pointer.
3865* include/private/gc_priv.h (GC_activation_frame_s): New structure
3866type.
3867* include/private/gc_priv.h (GC_push_all_stack_frames): New
3868function declaration (only if THREADS).
3869* include/private/gc_priv.h (GC_world_stopped): Don't declare
3870unless THREADS.
3871* include/private/gc_priv.h (GC_blocked_sp,
3872GC_activation_frame_s): New declaration (only if not THREADS).
3873* include/private/gc_priv.h (GC_push_all_register_frames): New
3874function declaration (only for IA-64).
3875* include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
3876obsolete (unused) symbols.
3877* include/private/gc_priv.h (GC_push_all_stack_partially_eager):
3878Remove declaration (since it is static now).
3879* mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
3880(for code locality) and make STATIC.
3881* mark_rts.c (GC_push_all_register_frames): New function (only for
3882IA-64).
3883* mark_rts.c (GC_push_all_stack_frames): New function (only if
3884THREADS).
3885* mark_rts.c (GC_add_trace_entry): New function prototype (used by
3886GC_push_all_stack_partially_eager(), only if TRACE_BUF).
3887* mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
3888* mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
3889function body (only for IA-64).
3890* mark_rts.c (GC_push_current_stack): Call
3891GC_push_all_stack_part_eager_frames() instead of
3892GC_push_all_stack_partially_eager().
3893* mark_rts.c (GC_push_current_stack): Call
3894GC_push_all_register_frames() instead of GC_push_all_eager() for
3895IA-64 backing store.
3896* misc.c (GC_do_blocking_inner): Declare function (if THREADS
3897only).
3898* misc.c (GC_blocked_sp, GC_blocked_register_sp,
3899GC_activation_frame): New global variables (only if not THREADS).
3900* misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
3901function (only if not THREADS).
3902* misc.c (GC_do_blocking): Move the function from
3903pthread_support.c.
3904* include/private/pthread_support.h (GC_Thread_Rep): Add
3905"activation_frame" field.
3906* pthread_stop_world.c (GC_push_all_stacks): Call
3907GC_push_all_stack_frames() and GC_push_all_register_frames instead
3908of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
3909STACK_GROWS_UP here.
3910* pthread_support.c (GC_do_blocking_inner): Remove "static"; store
3911"fn" result back to "client_data" field.
3912* pthread_support.c (GC_call_with_gc_active): New API function.
3913* win32_threads.c (GC_call_with_gc_active): Likewise.
3914* win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
3915"activation_frame" fields.
3916* win32_threads.c (GC_new_thread): Add assertion checking for
3917thread_blocked_sp is NULL.
3918* win32_threads.c (GC_do_blocking_inner): New function.
3919* win32_threads.c (GC_stop_world): Don't suspend a thread if its
3920thread_blocked_sp is non-NULL.
3921* win32_threads.c (GC_push_stack_for): Use thread
3922"activation_frame" (if non-NULL); use "thread_blocked_sp" if
3923non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
3924thread before modifying its last_stack_min; call
3925GC_push_all_stack_frames() instead of GC_push_all_stack(); update
3926the comments.
3927
3928* alloc.c (GC_default_stop_func): New static variable (initialized
3929to GC_never_stop_func).
3930* alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
3931* alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
3932(instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
3933else call GC_default_stop_func() before getting "current_time".
3934* alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
3935FIXME comment).
3936* alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
3937replacing GC_never_stop_func with GC_default_stop_func (if
3938possible).
3939* alloc.c (GC_gcollect): Use GC_default_stop_func.
3940* alloc.c (GC_collect_or_expand): Use GC_default_stop_func
3941(instead of GC_never_stop_func) unless it is trigged due to out of
3942memory; don't increment GC_fail_count and don't output warning
3943(before trying to collect again) in case the collection has been
3944interrupted (by GC_default_stop_func) and the heap expansion has
3945failed too.
3946* include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
3947prototypes.
3948
3949* os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
3950GC_get_writable_length() result.
3951
3952* configure.ac: Don't use -lpthread -ldl for Cygwin.
3953
3954* NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
3955
3956* include/private/gcconfig.h (GWW_VDB): Undefine if
3957USE_GLOBAL_ALLOC (since incompatible).
3958* os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
3959is defined.
3960* os_dep.c (GC_unmap_threshold): Declare (for use in
3961GC_init_win32) if USE_MUNMAP.
3962* os_dep.c (GC_init_win32): Turn off memory unmapping if
3963GlobalAlloc() is used.
3964* os_dep.c (GC_win32_get_mem): Define and use new
3965VIRTUAL_ALLOC_PAD macro; don't waste a extra memory page unless
3966MPROTECT_VDB is in use.
3967
3968* Makefile: Replace "version.h" with "include/gc_version.h".
3969* include/gc_version.h: Likewise.
3970
3971* alloc.c (GC_collect_or_expand): Output heap size in WARN()
3972(before returning FALSE) for convenience.
3973
3974* allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
3975string.
3976* pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
3977* win32_threads.c (GC_delete_thread): Likewise.
3978* include/private/gc_priv.h (GC_PRIdPTR): New macro.
3979* pthread_stop_world.c (GC_suspend_handler_inner): Remove
3980unnecessary cast for WARN argument.
3981* pthread_support.c (start_mark_threads): if pthread_create()
3982failed then don't try to create other marker threads and (after
3983printing a warning) adjust GC_markers and GC_parallel values; log
3984GC_markers value (possibly adjusted) after that.
3985
3986* win32_threads.c (start_mark_threads): if pthread_create() is
3987failed then don't try to create other marker threads and (after
3988printing a warning) adjust GC_markers and GC_parallel values.
3989* win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
3990the definition upper (to be visible in start_mark_threads()).
3991* win32_threads.c (start_mark_threads): if CreateThread() or
3992_beginthreadex() is failed then don't try to create other marker
3993threads and (after printing a warning) adjust GC_markers,
3994GC_parallel values, and destroy the event objects (either only
3995some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
3996not a single thread is created).
3997* win32_threads.c (GC_thr_init): Log GC_markers value (possibly
3998adjusted) after start_mark_threads() call.
3999
4000* Makefile.am: Back remove "GC_" prefix for PTHREADS,
4001DARWIN_THREADS, WIN32_THREADS (for configure.ac).
4002
4003* include/private/gc_priv.h: Change include of config.h to
4004private/config.h.
4005* include/private/gc_pmark.h: Likewise.
4006* gc_cpp.cc: Likewise.
4007* tests/test.c: Likewise.
4008* tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
4009undefine GC_BUILD.
4010
4011* finalize.c (GC_general_register_disappearing_link): Return
4012GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
4013respectively).
4014* include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
4015* include/gc.h (GC_register_disappearing_link,
4016GC_general_register_disappearing_link): Update the comment.
4017* typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
4018* finalize.c (GC_general_register_disappearing_link,
4019GC_register_finalizer_inner): Recalculate the hash table index
4020after GC_oom_fn succeeded (since the table may grow while not
4021holding the lock) and check again that the entry is still not in
4022the table (free the unused entry otherwise unless DBG_HDRS_ALL).
4023* finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
4024local variable (to prevent a compiler warning).
4025* finalize.c (GC_register_finalizer_inner): Don't modify the data
4026pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
4027(due to out of memory).
4028
4029* alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
4030suppress compiler "variable might be uninitialized" warnings.
4031
4032* Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
4033* win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
4034WinCE.
4035* win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
4036HANDLE thru word type (to avoid a compiler warning) for WinCE.
4037* win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
4038(only if DONT_USE_SIGNALANDWAIT).
4039* win32_threads.c (start_mark_threads): Initialize GC_marker_Id
4040and GC_marker_cv for each helper thread (only if
4041DONT_USE_SIGNALANDWAIT).
4042* win32_threads.c (GC_mark_mutex_state): New static variable (only
4043if DONT_USE_SIGNALANDWAIT).
4044* win32_threads.c (GC_mark_mutex_waitcnt,
4045signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
4046* win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
4047Use InterlockedExchange() over GC_mark_mutex_state (instead of
4048AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
4049* win32_threads.c (GC_wait_marker, GC_notify_all_marker):
4050Implement wait/broadcast primitives using Win32 multiple events
4051(one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
4052using Win32 SignalObjectAndWait).
4053* win32_threads.c (GC_thr_init): Don't declare hK32 local
4054variable, don't check for GC_wnt, and don't initialize
4055signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
4056
4057* alloc.c (GC_finish_collection): Call GC_print_finalization_stats
4058if GC_print_stats (after getting "done_time").
4059* finalize.c (GC_old_dl_entries): New static variable (only if not
4060SMALL_CONFIG).
4061* finalize.c (GC_finalize): Save current GC_dl_entries value (only
4062if not SMALL_CONFIG).
4063* finalize.c (GC_print_finalization_stats): Define if and only if
4064not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
4065instead of GC_printf(); use "%lu" (instead of "%u") print format
4066specifier; use unsigned long type for "ready" counter (for LP64
4067targets).
4068* misc.c (GC_dump): No longer call GC_print_finalization_stats()
4069here (since it is called from GC_finish_collection()).
4070* misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
4071ECOS).
4072
4073* alloc.c (GC_expand_hp): Replace GC_init_inner() call with
4074GC_init() one.
4075* malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
4076* mallocx.c (GC_generic_malloc_many): Likewise.
4077* misc.c (GC_enable_incremental): Likewise.
4078* alloc.c (GC_expand_hp): Update the comment.
4079* mark.c (GC_obj_kinds): Likewise.
4080* win32_threads.c (GC_allow_register_threads): Likewise.
4081* private/gc_priv.h (GC_init_inner): Remove function declaration.
4082* misc.c (GC_init_inner): Replace with public GC_init().
4083
4084* gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
4085* gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
4086GC_gcj_fake_mark_proc (aborting with the appropriate message)
4087instead.
4088
4089* os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
4090to out of memory) then don't increment GC_n_heap_bases and don't
4091call VirtualAlloc() again (with MEM_COMMIT).
4092* os_dep.c (GC_remap): Abort with a more informatory message if
4093VirtualAlloc() fails due to out of memory; update FIXME.
4094
4095* Makefile: Fix typo for msvc_dbg.c.
4096* Makefile.direct: Likewise.
4097* Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
4098"GC_".
4099* Makefile.dj: Don't reference remove files (nursery.c,
4100gc_nursery.h, gc_copy_descr.h).
4101* NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
4102* NT_STATIC_THREADS_MAKEFILE: Likewise.
4103* NT_THREADS_MAKEFILE: Likewise.
4104* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4105* NT_X64_THREADS_MAKEFILE: Likewise.
4106* gc.mak: Likewise.
4107* NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
4108defined in the source files).
4109* NT_THREADS_MAKEFILE: Likewise.
4110* NT_X64_THREADS_MAKEFILE: Likewise.
4111* gc.mak: Likewise.
4112* NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
4113* NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
4114GC_THREADS.
4115* NT_THREADS_MAKEFILE: Likewise.
4116* NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4117* NT_X64_THREADS_MAKEFILE: Likewise.
4118* gc.mak: Likewise.
4119* NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
4120compiler warnings.
4121* NT_STATIC_THREADS_MAKEFILE: Likewise.
4122* NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
4123before "$*.C" (and "$*.CPP").
4124* NT_X64_THREADS_MAKEFILE: Likewise.
4125
4126* doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
4127* doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
4128* doc/README.win64: Add info about mingw-w64; add note for VC++
4129warnings suppression.
4130
4131* os_dep.c (GC_forward_exception): Fix logic in several places.
4132(OSX-specific)
4133
4134* include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
4135
4136* Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
4137from Makefile.
4138* Makefile: Remove the information about "define arguments" (which
4139is incomplete and outdated compared to that in Makefile.direct);
4140add help reference to Makefile.direct.
4141* Makefile.dj: Likewise.
4142
4143* alloc.c (world_stopped_total_time, world_stopped_total_divisor):
4144Replace "STATIC" with "static" in the definition (since the
4145symbols aren't prefixed with "GC_").
4146* win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
4147start_mark_threads, mark_mutex, builder_cv, mark_cv,
4148mark_mutex_event, signalObjectAndWait_func, main_thread_start):
4149Likewise.
4150* pthread_support.c (GC_wait_builder): Define as STATIC.
4151* win32_threads.c (GC_wait_builder): Likewise.
4152
4153* misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
4154API function.
4155* include/gc_pmark.h (GC_get_heap_size_inner,
4156GC_get_free_bytes_inner): New function declaration.
4157
4158* include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
4159* include/gc_config_macros.h: Likewise.
4160* include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
4161* include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
4162internal use).
4163* include/gc_config_macros.h: Always include stddef.h if GCC.
4164* include/gc_config_macros.h (GC_API): Define for CeGCC in the
4165same way as for MinGW.
4166* include/gc_config_macros.h (GC_API): Group the definition for
4167all cases together (check for GC_DLL only once).
4168* include/gc_pthread_redirects.h: Group non-Darwin code together.
4169* tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
4170
4171* Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
4172GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
4173GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
4174comment for.
4175* misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
4176macro).
4177* dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
4178FIXME and the comment for WinCE.
4179* gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
4180(new macro).
4181* include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
4182WinCE (since backtrace() is unimplemented).
4183* include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
4184(since static).
4185* os_dep.c (GC_n_heap_bases): Define as STATIC; move the
4186definition to be above GC_is_heap_base().
4187* include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
4188(both for MinGW and CeGCC toolchains).
4189* include/private/gcconfig.h: Recognize __CEGCC__ and
4190__MINGW32CE__ (as synonyms for __WIN32_WCE).
4191* include/private/gcconfig.h: If SH4 then don't set config
4192parameters for SH.
4193* include/private/thread_local_alloc.h (GC_key_create): Don't
4194abort on failures, just return -1 in these cases (this also
4195prevents compilation error for targets where ABORT is defined
4196indirectly as an inline assembler sequence).
4197* mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
4198the GCC-based cross-compiler.
4199* mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
4200WRAP_MARK_SOME is defined; define also for WinCE case; don't
4201check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
4202* mark.c (GC_mark_some): Use __try/__except also for WinCE; update
4203the comment.
4204* misc.c: Include signal.h after gc_pmark.h included; check for
4205MSWINCE instead of _WIN32_WCE.
4206* misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
4207* misc.c: Don't include <crtdbg.h> for WinCE targets.
4208* misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
4209CeGCC toolchain).
4210* misc.c (GC_write): Use OutputDebugStringW() instead of
4211_CrtDbgReport() for WinCE targets.
4212* os_dep.c (GC_least_described_address): Define as STATIC.
4213* os_dep.c (GC_register_data_segments): Fix code indentation.
4214* os_dep.c (GC_wince_get_mem): Initialize "result" local variable
4215(to prevent a compiler warning).
4216* os_dep.c (GC_dirty_init): Add comment for WinCE target.
4217* tests/test.c: Don't include winbase.h directly if GCC for WinCE,
4218include assert.h instead.
4219* tests/test.c (tiny_reverse_test): Define and use
4220TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
4221useful for WinCE.
4222* win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
4223for WinCE (since thread Id is used as a "real" thread handle).
4224* win32_threads.c (THREAD_HANDLE): New macro.
4225* win32_threads.c (GC_register_my_thread_inner): Don't recognize
4226DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
4227WinCE.
4228* Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
4229* win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
4230for MSWINCE.
4231* win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
4232close thread handle on WinCE (since it's a thread Id).
4233* win32_threads.c (GC_suspend): Don't check for MSWINCE in the
4234MPROTECT-related code (for the case if MPROTECT_VDB would be
4235implemented for WinCE).
4236* win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
4237Use THREAD_HANDLE(t) to obtain thread handle.
4238* win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
4239implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
4240pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
4241GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
4242parallel mark support).
4243* win32_threads.c (start_mark_threads): Use int type for "i" local
4244variable (instead of "unsigned") to prevent a compiler warning.
4245* win32_threads.c (start_mark_threads): Don't check CreateThread()
4246result for -1; call CloseHandle() for the handle created by
4247CreateThread() (on WinCE); don't use errno (since errno.h is
4248missing on some targets like WinCE) when printing warning on a
4249marker thread creation failure.
4250* win32_threads.c (signalObjectAndWait_func): Define for WinCE.
4251* win32_threads.c (GC_wait_marker): Remove unnecessary assertion
4252for non-zero signalObjectAndWait_func (to make the code compilable
4253for WinCE).
4254* win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
4255use GC_sysinfo to get processors count if WinCE; don't check for
4256SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
4257GC_PTHREADS_PARAMARK.
4258* win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
4259macro (useful for testing parallel marking on WinCE).
4260* win32_threads.c (GC_win32_start, main_thread_start): Define as
4261STATIC.
4262* win32_threads.c: Don't define main_thread_args,
4263main_thread_start(), WinMain() for WinCE if GC_DLL.
4264* win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
4265(since the stack size parameter is ignored on WinCE).
4266* win32_threads.c (main_thread_start): Remove forward declaration;
4267place its definition before WinMain() one.
4268* win32_threads.c (WinMain): Abort if GC_CreateThread() or
4269WaitForSingleObject() failed (for the main thread).
4270
4271* allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
4272a function.
4273* allchblk.c (GC_unmap_threshold): New global variable definition
4274(initialized to MUNMAP_THRESHOLD).
4275* allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
4276MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
4277* doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
4278* misc.c (GC_unmap_threshold): New variable declaration.
4279* misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
4280environment variable to set GC_unmap_threshold value (only if
4281USE_MUNMAP).
4282
4283* dbg_mlc.c (OFN_UNSET): New macro (to detect
4284GC_register_finalizer() failures).
4285* dbg_mlc.c (store_old): Add a check for register_finalizer()
4286failure caused by an out-of-memory event (leave *ofn and *ocd
4287unmodified in that case).
4288* dbg_mlc.c (GC_debug_register_finalizer,
4289GC_debug_register_finalizer_no_order,
4290GC_debug_register_finalizer_unreachable,
4291GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
4292to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
4293as in GC_register_finalizer_inner()).
4294
4295* Makefile.direct (GC_DLL): Add the comment for.
4296* doc/README.macros: Fix a typo.
4297* doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
4298* doc/README.macros (__STDC__): Remove info.
4299* dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
4300GC_generate_random_valid_address, GC_print_backtrace,
4301GC_generate_random_backtrace, GC_register_describe_type_fn): Add
4302GC_API and GC_CALL to function definition.
4303* malloc.c (GC_generic_malloc): Likewise.
4304* mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
4305* mark.c (GC_mark_and_push): Likewise.
4306* misc.c (GC_new_free_list_inner, GC_new_free_list,
4307GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
4308Likewise.
4309* include/gc_backptr.h (GC_get_back_ptr_info,
4310GC_generate_random_heap_address, GC_generate_random_valid_address,
4311GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
4312GC_CALL to function prototype.
4313* include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
4314GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
4315GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
4316GC_register_describe_type_fn): Likewise.
4317* include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
4318GC_generic_malloc_words_small): Likewise.
4319* gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
4320* include/private/gc_pmark.h: Likewise.
4321* include/private/gc_priv.h: Likewise.
4322* tests/test.c: Likewise.
4323* gc_cpp.cc: Define GC_BUILD.
4324* include/private/gc_pmark.h: Likewise.
4325* include/private/gc_priv.h: Likewise.
4326* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
4327* gc_dlopen.c (dlopen): Add GC_API to the wrapper function
4328definition.
4329* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
4330GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
4331pthread_detach, pthread_create): Likewise.
4332* win32_threads.c (GC_pthread_join, GC_pthread_create,
4333GC_pthread_sigmask, GC_pthread_detach): Likewise.
4334* gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
4335* include/gc_backptr.h: Include "gc.h".
4336* include/gc_backptr.h: Use extern "C" for the exported functions.
4337* include/gc_mark.h: Likewise.
4338* include/gc_config_macros.h (GC_THREADS): Define the macro if any
4339GC_XXX_THREADS is defined.
4340* include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
4341Move the definitions below the place where GC_NETBSD_THREADS and
4342GC_DGUX386_THREADS are defined.
4343* include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
4344is defined) for GCC.
4345* include/gc_config_macros.h (GC_API): Define for Cygwin (in the
4346same way as for VC++); define for GCC v4+ (other than already
4347recognized MinGW/Cygwin) as a "default" visibility attribute if
4348GC_DLL is defined.
4349* include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
4350New macro.
4351* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
4352GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
4353GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
4354GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
4355GC_debug_malloc_atomic, GC_debug_strdup,
4356GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
4357GC_debug_malloc_ignore_off_page,
4358GC_debug_malloc_atomic_ignore_off_page,
4359GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
4360* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
4361GC_gcj_malloc_ignore_off_page): Likewise.
4362* include/gc.h (GC_malloc, GC_malloc_atomic,
4363GC_malloc_uncollectable, GC_malloc_stubborn,
4364GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
4365GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
4366GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
4367GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
4368GC_debug_malloc_atomic_ignore_off_page,
4369GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
4370(for the first argument).
4371* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
4372GC_gcj_malloc_ignore_off_page): Likewise.
4373* include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
4374GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
4375(for the second argument).
4376* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
4377GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
4378GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
4379GC_realloc, GC_expand_hp, GC_set_max_heap_size,
4380GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
4381GC_register_displacement, GC_debug_register_displacement,
4382GC_try_to_collect, GC_malloc_ignore_off_page,
4383GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
4384GC_debug_malloc_atomic, GC_debug_strdup,
4385GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
4386GC_debug_malloc_ignore_off_page,
4387GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
4388GC_debug_realloc, GC_debug_malloc_replacement,
4389GC_debug_realloc_replacement, GC_finalization_proc,
4390GC_register_finalizer, GC_debug_register_finalizer,
4391GC_register_finalizer_ignore_self,
4392GC_debug_register_finalizer_ignore_self,
4393GC_register_finalizer_no_order,
4394GC_debug_register_finalizer_no_order,
4395GC_register_finalizer_unreachable,
4396GC_debug_register_finalizer_unreachable,
4397GC_register_disappearing_link,
4398GC_general_register_disappearing_link,
4399GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
4400GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
4401GC_call_with_alloc_lock, GC_stack_base_func,
4402GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
4403GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
4404GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
4405GC_malloc_many, GC_CreateThread, GC_beginthreadex,
4406GC_endthreadex): Comment out (or remove if single and meaningless)
4407function argument names (to avoid identifiers out of the name
4408space).
4409* include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
4410GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
4411* include/gc.h (GC_try_to_collect): Update the comment.
4412* include/gc.h (GC_size, GC_register_my_thread): Add const
4413qualifier for the argument referent.
4414* misc.c (GC_size): Likewise.
4415* pthread_support.c (GC_register_my_thread_inner,
4416GC_register_my_thread): Likewise.
4417* win32_threads.c (GC_register_my_thread_inner,
4418GC_register_my_thread): Likewise.
4419* include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
4420(define instead of GC_INIT() for Cygwin and AIX).
4421* include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
4422GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
4423GC_INITIAL_HEAP_SIZE): Recognize new macro.
4424* include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
4425GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
4426GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
4427GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
4428* include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
4429* include/gc_mark.h: Prefix GC_H with '_'.
4430* include/gc_mark.h (GC_least_plausible_heap_addr,
4431GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
4432for the public variable declaration.
4433* include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
4434GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
4435* include/gc_pthread_redirects.h (GC_pthread_create,
4436GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
4437Use GC_API for the wrapper prototype.
4438* include/gc_pthread_redirects.h (pthread_create, pthread_join,
4439pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
4440before redirecting.
4441* include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
4442GC_incr_bytes_freed(); remove FIXME.
4443* include/private/gc_priv.h (GC_make_closure,
4444GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
4445function.
4446* tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
4447the target.
4448
4449* finalize.c (GC_general_register_disappearing_link,
4450GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
4451guard for LOCK/UNLOCK().
4452* finalize.c (GC_general_register_disappearing_link,
4453GC_register_finalizer_inner): Get GC_oom_fn value before releasing
4454the lock (to prevent data races).
4455* gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
4456GC_gcj_malloc_ignore_off_page): Likewise.
4457* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
4458* include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
4459instead of GC_oom_fn (to prevent data races).
4460* malloc.c (GC_generic_malloc): Likewise.
4461* mallocx.c (GC_memalign): Likewise.
4462* pthread_support.c (pthread_create): Likewise.
4463* gcj_mlc.c (maybe_finalize): Acquire the lock before setting
4464last_finalized_no value to prevent data races.
4465* include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
4466GC_set_find_leak, GC_set_finalize_on_demand,
4467GC_set_java_finalization, GC_set_finalizer_notifier,
4468GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
4469GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
4470GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
4471the comment.
4472* misc.c (GC_set_oom_fn): Likewise.
4473* include/gc.h (GC_general_register_disappearing_link): Refine the
4474comment (replace "soft" word with "weak").
4475* misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
4476GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
4477* misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
4478GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
4479
4480* dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
4481"private/dbg_mlc.h" before it.
4482* malloc.c: Likewise.
4483* dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
4484for WinCE (since deprecated); evaluate strlen() only once; don't
4485set errno for WinCE.
4486* malloc.c (GC_strdup): Likewise.
4487* dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
4488* include/gc.h (GC_unregister_my_thread): Refine the comment.
4489* include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
4490Don't declare for WinCE.
4491* include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
4492* include/gc.h (GC_WinMain): Remove GC_API.
4493* include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
4494lpCmdLine.
4495* tests/test.c (GC_WinMain): Likewise.
4496* win32_threads.c (main_thread_args, GC_WinMain): Likewise.
4497* include/gc_config_macros.h (ptrdiff_t): Guard with
4498ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
4499* include/private/gc_locks.h: Guard include "atomic_ops.h" with
4500ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
4501* mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
4502* thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
4503* win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
4504* include/private/gc_locks.h: Use include "atomic_ops.h" instead
4505of include <atomic_ops.h>.
4506* include/private/gc_priv.h: Likewise.
4507* include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
4508Don't export (replace GC_API to "extern").
4509* win32_threads.c (GC_allocate_ml): Don't export.
4510* include/private/gc_priv.h (DebugBreak): Define as macro for
4511WinCE (if not UNDER_CE and DebugBreak is not defined yet).
4512* include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
4513(since "UNALIGNED" is defined in winnt.h of WinCE).
4514* mark.c (UNALIGNED): Likewise.
4515* include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
4516* include/private/gcconfig.h (ALIGNMENT): Check always defined.
4517* include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
4518* include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
4519for WinCE (since __declspec(thread) is unsupported).
4520* include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
4521Define for WinCE (if undefined).
4522* malloc.c (GC_malloc): Remove outdated comment about disabling
4523signals.
4524* misc.c: Don't include <tchar.h> (since not used anymore and may
4525break TEXT() macro defined in winnt.h).
4526* misc.c (GC_init_inner): Don't use GetModuleHandle() and
4527InitializeCriticalSectionAndSpinCount() for WinCE.
4528* misc.c (GC_init_inner): Replace GetModuleHandleA() with
4529GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
4530* misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
4531* misc.c (GC_CreateLogFile): New static function (Win32/WinCE
4532only); move the code from GC_write(); replace GETENV() with
4533GetEnvironmentVariable(); replace CreateFileA() with
4534CreateFile(); use TEXT() macro (for Unicode support); replace
4535strcat() with memcpy() (since deprecated in WinCE).
4536* misc.c (GC_write): Define as STATIC.
4537* win32_threads.c (GC_attached_thread): Likewise.
4538* misc.c (GC_write): Use GC_CreateLogFile().
4539* misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
4540* misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
4541(Win32 only) if DONT_USE_USER32_DLL is defined.
4542* misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
4543WinCE).
4544* misc.c (GC_abort): Use a more user-friendly abort if
4545NO_DEBUGGING (Win32 only).
4546* os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
4547THREADS).
4548* os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
4549(for Unicode support); check GetModuleHandle() result.
4550* tests/test.c: Don't define assert for WinCE (since may be
4551redefined by "assert.h" included from libatomic_ops).
4552* tests/test.c (FAIL): Define as ABORT for all targets (except
4553for PCR).
4554* tests/test.c (n_tests): Don't use AO_t.
4555* tests/test.c (check_heap_stats): Don't cast n_tests.
4556* tests/test.c (inc_int_counter): New function (for n_tests atomic
4557incrementation).
4558* tests/test.c (run_one_test): Test GC_memalign() for all targets.
4559* tests/test.c (run_one_test): Avoid unbalanced brackets in
4560#if-#else-#endif blocks.
4561* tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
4562private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
4563* tests/test.c (check_heap_stats): Replace
4564"if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
4565"unreachable code" compiler warning.
4566* tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
4567"UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
4568* tests/test.c (thr_window): Replace "L" string prefix with
4569TEXT().
4570* thread_local_alloc.c: Check THREADS is defined (to prevent other
4571compiler errors and warnings otherwise).
4572* tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
4573GC_use_DllMain()).
4574* Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
4575the comments for.
4576* win32_threads.c (GC_register_my_thread_inner): Recognize
4577DONT_IMPORT_GETCURTHREAD macro.
4578* win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
4579DllMain support if needed).
4580* win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
4581thread registration is unsupported for a given configuration.
4582* win32_threads.c (GC_use_DllMain): Update the comment; refine
4583ABORT message.
4584* win32_threads.c (GC_use_DllMain,
4585GC_started_thread_while_stopped, GC_register_my_thread_inner,
4586GC_lookup_thread_inner, GC_delete_gc_thread,
4587GC_allow_register_threads, GC_lookup_pthread,
4588GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
4589Check for GC_NO_DLLMAIN.
4590* win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
4591DllMain): Don't define if GC_NO_DLLMAIN.
4592* win32_threads.c (GC_stop_world): Declare "i" and "max" local
4593variables only if not GC_NO_DLLMAIN (to suppress compiler
4594warning).
4595* win32_threads.c (GC_mark_thread, start_mark_threads): Use
4596CreateThread() instead of _beginthreadex() for WinCE.
4597* win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
4598New macros defined (used by start_mark_threads(), WinMain()).
4599* win32_threads.c (GC_thr_init): Exclude parallel-specific code on
4600WinCE for now (since getenv(), GetProcessAffinityMask() and
4601SignalObjectAndWait() are missing on WinCE).
4602* win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
4603GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
4604TEXT() macro (for Unicode support).
4605
4606* include/gc.h (GC_has_static_roots_func): New typedef (user filter
4607callback).
4608* include/gc.h (GC_register_has_static_roots_callback): Use
4609GC_has_static_roots_func type.
4610* dyn_load.c (GC_has_static_roots,
4611GC_register_has_static_roots_callback): Likewise.
4612* dyn_load.c (GC_has_static_roots,
4613GC_register_has_static_roots_callback): Define on all platforms.
4614* dyn_load.c (GC_register_dynlib_callback,
4615GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
4616functions definition with the ANSI C one.
4617* dyn_load.c (GC_register_dynlib_callback): Use new local variable
4618"callback" (initialized from GC_has_static_roots) to minimize data
4619races.
4620* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
4621GC_cond_add_roots): Define as STATIC.
4622* mark_rts.c (GC_remove_roots_inner): Likewise.
4623* dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
4624sections smaller than pointer size (just to avoid acquiring the
4625lock unnecessarily).
4626* dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
4627only for DARWIN_DEBUG).
4628* dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
4629LOCK + GC_add_roots_inner() + UNLOCK.
4630* dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
4631callback (if set) holding the lock; if it returns 0 then don't call
4632GC_add_roots_inner() for that region.
4633* dyn_load.c (GC_register_has_static_roots_callback): Put
4634"callback" value to GC_has_static_roots on all platforms.
4635* dyn_load.c (GC_has_static_roots): Update the comments.
4636* include/gc.h (GC_exclude_static_roots, GC_add_roots,
4637GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
4638* include/private/gc_priv.h (struct roots): Likewise.
4639* include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
4640to mark_rts.c and declare it as STATIC.
4641* include/private/gc_priv.h (GC_exclude_static_roots_inner): New
4642prototype.
4643* dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
4644GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
4645* misc.c (GC_init_inner): Likewise.
4646* mark_rts.c (GC_exclude_static_roots_inner): New function (move
4647all the code from GC_exclude_static_roots(); add the comment.
4648* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
4649add alignment assertion for the lower bound; add assertion for the
4650lower bound to be less than the upper one.
4651* mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
4652the upper bound (round down to be of a pointer-aligned value);
4653return in case of an empty range.
4654* mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
4655GC_exclude_static_roots_inner().
4656* mark_rts.c (GC_remove_roots): Quickly check the bounds and return
4657in case of a do-nothing case (before acquiring the lock).
4658
4659* finalize.c (GC_fail_count): New external variable declaration.
4660* finalize.c (GC_reset_finalizer_nested,
4661GC_check_finalizer_nested): New function declarations (if THREADS
4662only).
4663* finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
4664static global variables (used internally by GC_finalize() and
4665GC_check_finalizer_nested()).
4666* finalize.c (GC_check_finalizer_nested): New static function
4667definition (only if not THREADS, used internally by
4668GC_notify_or_invoke_finalizers() to minimize the probability of
4669a deep recursion when a client finalizer tries to allocate GC
4670memory).
4671* finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
4672call GC_reset_finalizer_nested()) if last heap expansion failed.
4673* finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
4674GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
4675last_finalizer_notification variables holding the lock (to avoid
4676data races).
4677* finalize.c (GC_finalizer_notifier): Add comment.
4678* finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
4679for an empty finalization queue (only if THREADS and not
4680KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
4681* finalize.c (GC_notify_or_invoke_finalizers): Call
4682GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
4683if appropriate.
4684* include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
4685finalizer_nested and finalizer_skipped fields (for internal use
4686by the multi-threaded GC_check_finalizer_nested()).
4687* win32_threads.c (GC_Thread_Rep): Likewise.
4688* pthread_support.c (GC_reset_finalizer_nested,
4689GC_check_finalizer_nested): New function definitions (the
4690multi-threaded variants of that in finalize.c).
4691* win32_threads.c (GC_reset_finalizer_nested,
4692GC_check_finalizer_nested): Likewise.
4693
4694* alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
4695anymore and GCC produces a warning for it).
4696* alloc.c (GC_stopped_mark): Adjust printf argument type
4697specifier.
4698* backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
4699the case when the configuration information comes from aconfig
4700file).
4701* checksums.c: Likewise.
4702* include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
4703keyword instead of "unused".
4704* include/gc_allocator.h: Fix typos in comments.
4705* thread_local_alloc.c: Likewise.
4706* include/javaxfc.h (GC_finalize_all): Update comment.
4707* include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
4708GC_API and serves only as a marker for the private but exported
4709symbols used by test.c only).
4710* include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
4711GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
4712GC_API_PRIV one.
4713* include/private/gc_priv.h (GC_fo_entries): Don't export it
4714outside a DLL.
4715* include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
4716designated to check the arguments correctness of printf-like
4717functions (currently works only for GCC v3+).
4718* include/private/gc_priv.h (GC_printf, GC_err_printf,
4719GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
4720
4721* dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
4722Define for FreeBSD 7.0+.
4723
4724* mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
4725
4726* include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
4727comment.
4728
4729* allchblk.c (GC_merge_unmapped): Don't assume that adjacent
4730free blocks have different mapping status.  Correctly handle gap
4731between blocks.
4732(GC_split_block): Remove dead code setting hb_flags.  Add comment.
4733(GC_allochblk): Split blocks also in generational-only mode.
4734* os_dep.c (GC_unmap_gap): Don't really use munmap.
4735
4736* include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
4737not USE_MUNMAP case.
4738
4739* Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
4740USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
4741* Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
4742PARALLEL_MARK, STATIC): Update the comments.
4743* include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
4744recognized (only if MPROTECT_VDB).
4745* Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
4746Add the comments for.
4747* os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
4748environment variable (only if MPROTECT_VDB, if the variable is
4749unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
4750* doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
4751* include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
4752USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
4753the future).
4754* misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
4755space returned to OS (GC_unmapped_bytes).
4756* include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
4757comments.
4758* misc.c (GC_get_unmapped_bytes): New API function.
4759* include/gc.h (GC_get_unmapped_bytes): New API prototype.
4760* os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
4761"ifdef MSWIN32" one (for Cygwin).
4762
4763* pthread_support.c (GC_allow_register_threads): New API function.
4764* win32_threads.c (GC_allow_register_threads): Likewise.
4765* include/gc.h (GC_allow_register_threads): New API prototype.
4766* include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
4767Update the comments.
4768* pthread_support.c (GC_register_my_thread): Check the collector
4769is in the multi-threaded mode.
4770* win32_threads.c (GC_register_my_thread): Likewise.
4771
4772* finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
4773instead, following Ivan's original patch.
4774
4775* allchblk.c (GC_allochblk_nth): Add assertion.
4776* checksums.c: Add GC_record_fault, GC_was_faulted,
4777CC_n_faulted_dirty_errors.
4778(GC_check_dirty): Remove register declarations, print
4779dirty bit errors on faulted pages.
4780* os_dep.c (GC_write_fault_handler): Call GC_record_fault().
4781* os_dep.c (GC_remove_protection): Compute index correctly.
4782
4783
4784== [7.2alpha2] 2009-06-12 ==
4785
4786* dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
4787calls into a single one (for output atomicity).
4788* typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
4789GC_finalization_failures variable; check the result of
4790GC_general_register_disappearing_link() (for lack of memory)
4791instead.
4792* finalize.c (GC_finalization_failures): Remove unused global
4793variable.
4794* finalize.c (GC_general_register_disappearing_link,
4795GC_general_register_disappearing_link): Don't update the value of
4796GC_finalization_failures (since unused).
4797* include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
4798GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
4799word type now (as FIXUP_POINTER requires numeric argument).
4800* finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
4801requires the first parameter of word type.
4802* mark.c (PUSH_GRANULE): Likewise.
4803* mark.c (GC_push_one, GC_push_all_eager): Likewise.
4804* finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
4805GC_finalizer_notifier directly, instead
4806of GC_INVOKE_FINALIZERS() to prevent infinite looping.
4807* include/javaxfc.h: Clarify GC_finalize_all comment.
4808* gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
4809after) for configuration information.
4810* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
4811* gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
4812variable for NULL before dereferencing it, return GC_oom_fn() in
4813this case.
4814* typd_mlc.c (GC_malloc_explicitly_typed,
4815GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
4816suppress compiler warning (for uninitialized "lg" variable).
4817
4818* win32_threads.c (GC_unregister_my_thread): add false assertion
4819in unreachable code.
4820
4821* pthread_support.c (GC_inner_start_routine): Don't release the
4822GC lock between GC_register_my_thread_inner() and
4823GC_init_thread_local() calls (post the "registered" even after
4824calling GC_init_thread_local()).
4825* win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
4826Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
4827acquire the GC lock only once.
4828* win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
4829directly instead of GC_register_my_thread() since I_HOLD_LOCK
4830and our (main) thread is not registered yet (add assertion for it).
4831* win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
4832directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
4833* win32_threads.c (GC_lookup_thread): Remove unused function.
4834* win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
4835* win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
4836also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
4837* win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
4838(for Cygwin).
4839* win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
4840(inside GC_ASSERT) to prevent compiler warning.
4841* win32_threads.c (GC_push_all_stacks): Remove FIXME for
4842PARALLEL_MARK.
4843* win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
4844to a place before GC_get_next_stack().
4845* win32_threads.c (marker_sp, marker_bsp): New static arrays (same
4846as in pthread_support.c).
4847* win32_threads.c (marker_last_stack_min): New static arrays (the
4848same semantics as for last_stack_min of GC_Thread_Rep).
4849* win32_threads.c (GC_get_next_stack): Handle marker threads.
4850* win32_threads.c (GC_mark_thread): Save the current stack pointer
4851to marker_[b]sp.
4852* win32_threads.c (start_mark_threads): Initialize
4853marker_last_stack_min elements (to "unset" value).
4854
4855* misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
4856GC_set_finalize_on_demand, GC_set_java_finalization,
4857GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
4858GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
4859GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
4860Change return type to void (these API functions no longer return
4861the old value).
4862* include/gc.h: Likewise.
4863* tests/test.c (main, WinMain, test): Remove explicit cast to void
4864for GC_set_warn_proc().
4865* misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
4866GC_get_finalize_on_demand, GC_get_java_finalization,
4867GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
4868GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
4869GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
4870API functions (to get the current value of the corresponding R/W
4871public variables).
4872* include/gc.h: Likewise.
4873* include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
4874Update the comment.
4875* misc.c (GC_ignore_warn_proc): New API call-back function.
4876* include/gc.h (GC_ignore_warn_proc): Likewise.
4877* misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
4878GC_get_non_gc_bytes): New API setter and getter functions (for the
4879public GC_find_leak and GC_non_gc_bytes variables, respectively).
4880* include/gc.h: Likewise.
4881* include/gc.h (GC_memalign): Add proto to GC API.
4882* mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
4883* tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
4884remove GC_memalign() proto.
4885* misc.c (GC_write): Use multi-byte (A) variants of Win32
4886GetModuleFileName() and CreateFile().
4887* tests/test.c (main): Replace K&R-style function definition with the
4888ANSI C one.
4889
4890* include/private/gcconfig.h (PLATFORM_ANDROID): New macro
4891recognized (for Linux on ARM32 without glibc).
4892* include/private/gcconfig.h (STRTOULL): Define for all targets
4893(define as "strtoul" for most targets except for LLP64/Win64).
4894* misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
4895(cast the result to word type) to decode values of "GC_TRACE",
4896"GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
4897variables.
4898
4899* include/gc_allocator.h: Add gc_allocator_ignore_off_page.
4900* tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
4901
4902* win32_threads.c (GC_release_mark_lock): Correct misspelling of
4903AO_load in assertion.
4904
4905* win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
4906is defined as FALSE (otherwise the size of dll_thread_table is near
4907200 KiB for 32-bit).
4908* win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
4909* win32_threads.c (GC_Thread_Rep): Add backing_store_end and
4910backing_store_ptr fields for IA64 support.
4911* win32_threads.c (GC_register_my_thread_inner): Set
4912backing_store_end field to reg_base value for IA64 (same as in
4913pthread_support.c).
4914* win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
4915"right" places, remove ';'.
4916* win32_threads.c (GC_fault_handler_lock): Declare only
4917if MPROTECT_VDB (and not WinCE).
4918* win32_threads.c (GC_suspend): Acquire and release
4919GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
4920* win32_threads.c (GC_suspend): Define as STATIC.
4921* win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
4922(should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
4923* win32_threads.c (GC_push_all_stacks): Convert a group of printf()
4924calls into a single one (for output atomicity).
4925* win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
4926before altering its last_stack_min ("thread" variable is added).
4927* win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
4928"s" is non-NULL.
4929* win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
4930if WinCE.
4931* win32_threads.c (GC_get_next_stack): Pass current_min value to
4932GC_get_stack_min as-is (without -1).
4933* win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
4934version of AO_fetch_and_sub1().
4935* win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
4936to pointer (and vice versa) thru word type to suppress warnings.
4937* win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
4938access atomically.
4939* misc.c: Change GC_THREADS tests back to THREADS.
4940
4941* allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
4942a group of printf() calls into a single one (for output atomicity).
4943* include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
4944GC_set_time_limit): New prototypes.
4945* misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
4946GC_set_time_limit): New public setter/getter functions.
4947* include/gc.h: Fix (and remove outdated) comments for thread-local
4948allocation.
4949* include/gc.h: Fix typos in comments.
4950* misc.c (GC_init_inner, GC_printf): Likewise.
4951* include/gc.h (GC_unregister_disappearing_link): Refine comment.
4952* include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
4953* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
4954GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
4955* misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
4956GC_bytes_allocd_at_reset): Define as STATIC.
4957* misc.c (GC_get_heap_size, GC_get_free_bytes,
4958GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
4959avoid data races.
4960* misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
4961* misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
4962* misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
4963set the default initial value of initial_heap_sz.
4964* misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
4965* misc.c (GC_init_inner): Fix WARN() format specifier (should be
4966word-compliant, "%p" is used w/o "0x").
4967* misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
4968environment variable if SMALL_CONFIG.
4969* misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
4970variable to set initial GC_full_freq value (if not SMALL_CONFIG).
4971* doc/README.environment (GC_FULL_FREQUENCY): Add information.
4972* doc/README.environment (GC_MARKERS): Refine information.
4973* misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
4974possible.
4975* misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
4976* misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
4977* misc.c (GC_abort): Don't define if SMALL_CONFIG.
4978* misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
4979(to prevent possible infinite recursion).
4980
4981* finalize.c (finalization_mark_proc): Replace K&R-style declaration
4982with ANSI C one.
4983* finalize.c (GC_grow_table, GC_register_finalizer_inner,
4984GC_enqueue_all_finalizers): Remove outdated comments about disabling
4985signals.
4986* finalize.c (GC_general_register_disappearing_link): Fix assertion
4987to catch NULL "obj" value.
4988* finalize.c (GC_unregister_disappearing_link): Check "link"
4989alignment before gaining the lock.
4990* finalize.c (GC_finalize): Refine comment.
4991* finalize.c (GC_finalize): Fix WARN() format specifier (should be
4992word-compliant, "%p" is used w/o "0x").
4993* finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
4994variable (to 0) to suppress compiler warning.
4995* include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
4996* include/gc_gcj.h: add "extern C" header and tail.
4997* include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
4998GC_help_wanted, GC_helper_count, GC_active_count declarations (move
4999the comments to the place where these symbols are defined in mark.c).
5000* mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
5001GC_mark_some_inner, if PARALLEL_MARK only).
5002* mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
5003GC_active_count, GC_do_parallel_mark): Define as STATIC.
5004* pthread_support.c (GC_mark_thread): Likewise.
5005* typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
5006GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
5007GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
5008GC_arobjfreelist): Likewise.
5009* include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
5010for HBLKSIZE to GC_STATIC_ASSERT.
5011* mark.c (GC_noop): Define for Borland C the same as for Watcom.
5012* mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
5013* pthread_support.c (GC_do_blocking_inner): Likewise.
5014* mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
5015switch branch to suppress compiler warning.
5016* mark.c (GC_return_mark_stack): Append new-line to printf message.
5017* mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
5018* pthread_support.c (GC_mark_thread): Add dummy "return 0" to
5019suppress compiler warning.
5020* pthread_support.c (start_mark_threads): Move the code limiting
5021"GC_markers" value (and printing a warning) to GC_thr_init().
5022* pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
5023if based on the number of CPUs.
5024* pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
5025values as one.
5026* pthread_support.c (GC_register_my_thread_inner): Add a check for
5027"stack_end" is non-NULL (the same as in win32_threads.c).
5028* pthread_support.c (pthread_create): Call GC_oom_fn before giving up
5029with ENOMEM.
5030* thread_local_alloc.c (return_single_freelist): Convert "for" loop
5031to "while" one to suppress "possible extraneous ';'" warning.
5032
5033* darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
5034* include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
5035(Darwin only).
5036* include/private/gcconfig.h: Add machine-specific part for DARWIN.
5037* include/private/gcconfig.h (ARM32): Define config parameters for
5038DARWIN (iPhone).
5039
5040* alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
5041GC_TIME_LIMIT): New macros (used to control the default initial
5042values of GC_full_freq variable, GC_dont_expand,
5043GC_free_space_divisor, GC_time_limit respectively).
5044* include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
5045with GC_TIME_LIMIT in alloc.c).
5046* alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
5047Define as STATIC.
5048* mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
5049* include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
5050Move the prototypes to alloc.c, make STATIC.
5051* include/private/gc_priv.h (GC_push_current_stack,
5052GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
5053(move the comments to the places where these functions are defined).
5054* mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
5055as STATIC.
5056* alloc.c (GC_timeout_stop_func, GC_stopped_mark,
5057GC_print_heap_sects): Convert a group of printf() calls into
5058a single one (for output atomicity).
5059* mark_rts.c (GC_print_static_roots): Likewise.
5060* alloc.c (GC_stopped_mark): Output blank line (when logging) for
5061convenience to delimit collections.
5062* alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
5063make "frames" local variable volatile (to prevent optimization).
5064* alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
5065GC_finish_collection, GC_allocobj): Remove outdated comments about
5066disabling signals.
5067* include/private/gc_priv.h (GC_register_displacement_inner,
5068GC_gcollect_inner): Likewise.
5069* alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
5070GC_finish_collection): Initialize "start_time" local variable (to 0)
5071to suppress compiler warning.
5072* mark_rts.c (GC_add_roots_inner): Likewise.
5073* alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
5074* include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
5075GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
5076GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
5077K&R-style function prototypes with ANSI C one.
5078* include/private/gc_priv.h (ABORT): Define as DebugBreak() for
5079Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
5080* include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
5081macros.
5082* include/private/gc_priv.h (GC_noop): Declare for Borland C the
5083same as for Watcom.
5084* mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
5085
5086* dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
5087outdated comment about disabling signals.
5088* mallocx.c (GC_malloc_uncollectable,
5089GC_malloc_atomic_uncollectable): Likewise.
5090* os_dep.c: Likewise.
5091* dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
5092Add ARGSUSED tag.
5093* pthread_stop_world.c (GC_suspend_handler,
5094GC_suspend_handler_inner): Likewise.
5095* dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
5096* dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
5097switch branch to suppress compiler warning.
5098* dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
5099* include/private/darwin_semaphore.h (sem_init): Likewise.
5100* include/javaxfc.h: Replace "GC_H" with "_GC_H".
5101* include/private/dbg_mlc.h (GC_has_other_debug_info,
5102GC_store_debug_info): Replace K&R-style function prototypes with ANSI
5103C one.
5104* include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
5105GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
5106* include/private/pthread_support.h (GC_stop_init): Likewise.
5107* include/private/gcconfig.h: Refine comment about setting
5108GC_stackbottom.
5109* include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
5110"right" places.
5111* include/private/pthread_support.h (GC_Thread_Rep): Refine comment
5112for "stack_end" field.
5113* mallocx.c (GC_malloc_uncollectable,
5114GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
5115* os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
5116GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
5117* os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
5118format specifier (should be word-compliant, "%p" is used w/o "0x").
5119* pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
5120* os_dep.c (GC_dirty_init): Append new-line to printf messages.
5121* os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
5122* os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
5123* pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
5124as STATIC.
5125* pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
5126"thread_blocked" is not set for the current thread.
5127* real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
5128* reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
5129suppress compiler warning.
5130
5131* tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
5132
5133* win32_threads.c: restructure parallel marking mutex initialization.
5134* win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
5135pthread_stop_world.c, pthread_support.c: Add runtime conditions
5136on GC_parallel were appropriate.
5137* pthread_support.c: Condition marker_bsp on ia64.
5138(GC_segment_is_thread_stack): Fix loop upper bound.
5139* reclaim.c: Limit some assertions to PARALLEL_MARK.
5140* pthread_support.c: Don't acquire mark lock for thread-local
5141allocation.
5142* include/private/gc_priv.h: Don't define parallel mark sync
5143support just for THREAD_LOCAL_ALLOC.
5144
5145* include/private/gcconfig.h: refine MINGW32 test.
5146* mark.c: Add win64/gcc tests.
5147
5148* test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
5149typed_test, run_one_test, check_heap_stats, main, test): Replace
5150all K&R-style function definitions with ANSI C ones.
5151* trace_test.c (main): Likewise.
5152* test.c (GC_COND_INIT): Define as GC_INIT() also in case of
5153THREAD_LOCAL_ALLOC.
5154* test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
5155or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
5156* test.c (reverse_test): Use "volatile" when clearing "b" and "c"
5157local variables (to suppress "assigned value is never used"
5158compiler warning).
5159* test.c (tree_test): Use public GC_noop1() instead of private
5160GC_noop().
5161* test.c (typed_test): Likewise.
5162* test.c (check_heap_stats): Define and assign value to
5163"late_finalize_count" local variable only if its value is used
5164(if FINALIZE_ON_DEMAND defined).
5165* test.c (main): Remove DJGPP-specific initialization of
5166GC_stackbottom (not needed anymore, handled in gcconfig.h).
5167* trace_test.c: Guard #define GC_DEBUG with #ifndef.
5168* trace_test.c: Include "gc_backptr.h".
5169* trace_test.c (main): Call GC_INIT().
5170* trace_test.c (main): Add "return 0" statement.
5171
5172* dyn_load.c (GC_register_dynlib_callback): Use new index j
5173instead of i in the inner loop.
5174
5175* tests/test.c: Increment n_tests with fetch_and_add when possible,
5176avoiding need to export lock.
5177
5178* include/gc_pthread_redirects.h:
5179- dlfcn.h is included for dlopen() proto before undefining
5180"dlopen" (so, it's possible now to include dlfcn.h after
5181gc.h from user code);
5182- GC_dlopen() proto is added (except for Darwin as
5183it's missing there);
5184- "dlopen" is explicitly undefined (before its redefinition).
5185* include/gc.h:
5186- "process.h" is included besides "windows.h"
5187(for _beginthreadex/_endthreadex); win32 only.
5188- GC_NO_THREAD_DECLS is moved to the right place
5189(before closing "extern C").
5190* pthread_support.c: Fix out of memory handling for Thread_Reps.
5191* win32_threads.c: Don't include process.h on winCE,
5192improve out of memory handling for thread structures, don't
5193define GC_beginthreadex and GC_endthreadex for winCE.
5194
5195* tests/test.c: Change gcj vtable decriptor type from size_t to
5196GC_word.
5197
5198* gcj_mlc.c: Add comment.
5199* tests/test.c: Change NTEST to NTHREADS.  Fork 5 threads by default.
5200Run reverse_test a second time in each thread.Add comments.
5201Don't rely on AO_fetch_and_add.
5202
5203* dyn_load.c (GC_register_dynlib_callback,
5204GC_register_dynamic_libraries_dl_iterate_phdr): Add support
5205for GNU_PT_RELRO relocations.
5206
5207* Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
5208by GC_SOLARIS_THREADS.
5209* include/gc.h: Improve finalizer documentation.
5210* mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
5211* pthread_stop_world.c, Makefile.dj: Fix typos.
5212
5213* win32_threads.c (GC_new_thread): Make first_thread
5214visible to the whole file.
5215(UNPROTECT): New macro.
5216(GC_push_stack_for, GC_suspend, GC_start_world): unprotect
5217thread structures before writing.
5218(GC_suspend): Acquire GC_fault_handler_lock before suspending
5219thread.
5220* os_dep.c: export GC_fault_handler_lock.
5221(GC_remove_protection): Check if already unprotected.
5222
5223* doc/README.win32: Add OpenWatcom warning.
5224* include/private/gcconfig.h: Really check it in.
5225
5226* os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
5227code from gcc version.
5228* os_dep.c: make gc compilable (optionally) for Cygwin with
5229GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
5230* os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
5231* mark.c (GC_noop): fix declaration definition mismatch for DMC.
5232* include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
5233Watcom (Win32 only).  It works.
5234
5235* mach_dep.c: Don't use __builtin_unwind_init for register
5236state on PowerPC/Darwin.
5237
5238* doc/gcdescr.html: Improve description of object freelist
5239structure.
5240* include/private/gc_priv.h: Fix comment for _size_map.
5241
5242* os_dep.c (GC_linux_stack_base): Relax sanity test.
5243
5244* include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
5245MARK_BIT_PER_OBJ): Add missing backslash before eoln.
5246
5247* misc.c (GC_set_warn_proc): Implicitly intialize GC on
5248non-Cygwin win32.
5249
5250* configure.ac: Enable thread-local allocation for sparc-linux.
5251
5252* alloc.c (GC_try_to_collect): Remove duplicate initialization
5253check.
5254* malloc.c (GC_generic_malloc): Remove lw to eliminate single-
5255threaded warnings.
5256* mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5257
5258* allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
5259finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
5260os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
5261thread_local_alloc.c.
5262* misc.c: Refine comment.
5263
5264* os_dep.c: Define GC_GWW_BUF_LEN more intelligently.  Add FIXME
5265comment.
5266
5267* win32_threads.c (GC_push_stack_for): Yet another attempt
5268at the stack_min finding logic.  Try to clean up the existing code
5269while minimizing VirtualQuery calls.
5270(GC_win32_start_inner): Register thread before GC_printf.
5271Produce more output with DEBUG_THREADS.
5272*include/gc.h: Update obsolete comments.
5273
5274* tests/test.c:
5275(gcj_class_struct2): Use cast instead of l suffix.
5276Cast GetLastError to int in various places.
5277Avoid unused result warning from incr/decr macros.
5278Add cast for fake_gcj_mark_proc.
5279Cast GC_gc_no to unsigned in printf.
5280
5281* include/gc.h: Fix two typos in comments.
5282
5283* finalize.c: Fix typo in comment.
5284
5285* blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
5286with lock.
5287
5288* reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
5289if we are checking for leaks.
5290
5291* win32_threads.c: Remove mark lock spinning.
5292* win32_threads.c, pthread_support.c: Update GC_unlocked_count,
5293GC_spin_count, and GC_block_count using atomic operations.
5294* tests/test.c: Declare n_tests as AO_t only if we have threads.
5295
5296* win32_threads.c: Support PARALLEL_MARK.  Make printf arg
5297types agree with format specifiers.
5298Add STATIC for GC_threads.
5299* include/private/gcconfig.h: Add FIXME comment.
5300* tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
5301AO_fetch_and_add1_full.  Declare n_tests as AO_t.
5302(WinMain): Don't call GC_use_DllMain.
5303with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
5304
5305* alloc.c (GC_try_to_collect_inner): Don't print redundant
5306GC_bytes_allocd and GC_gc_no.
5307(GC_stopped_mark): Print average world stop time.
5308* include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
5309
5310* misc.c, doc/README.environment: Add support  for
5311GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
5312* include/gc.h: Make GC_set_free_space_divisor correspond to
5313(somewhat unfortunate) reality.
5314
5315(Mostly improves LLP64 support.)
5316* backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
5317misc.c, reclaim.c: Changed some int and long type to word or size_t
5318(and vice versa where appropriate)
5319* gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
5320include/private/thread_local_alloc.h, mark.c,
5321misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
5322casts to word type when casting from int to pointer (or pointer
5323to int, or data pointer to code pointer) - just to remove the
5324corresponding compiler warning.
5325* ptr_chck.c (GC_is_visible): cast int const to word type to
5326prevent left shift overflow.
5327* os_dep.c: change the type of GC_mem_top_down global variable
5328(containing a flag) to DWORD.
5329* include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
5330is defined on SunOS x86_64.
5331* misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
5332for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
5333(the compiler gets hung if invoked with -Ox -D
5334ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
5335* backgraph.c: cast GC_gc_no value to unsigned short when
5336assigned/compared to height_gc_no field of back_edges.
5337* os_dep.c (GC_remove_protection): Add ARGSUSED.
5338* win32_threads.c (GC_thread_exit_proc): Remove unused local
5339variable.
5340* mark.c (GC_check_dirty): Move declaration out of func body.
5341
5342* doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
5343* include/gc.h (GC_register_my_thread): Improve comment.
5344
5345* Makefile.direct: Add comment for -DCHECKSUMS.
5346
5347* thread_local_alloc.c, include/private/thread_local_alloc.h:
5348Fix typos in comments.
5349* finalize.c: Declare mark_procs and GC_register_finalizer_inner
5350STATIC.
5351* malloc.c (GC_free): Move size calculation below assertion.
5352
5353* win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
5354Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
5355(GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
5356
5357* finalize.c (GC_general_register_disappearing_link): Add
5358assertion.
5359* malloc.c (GC_generic_malloc): Round lb to granules, not words.
5360* mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
5361granules, not words.
5362
5363* mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
5364* configure.ac: Define mach_dep for sparc-linux.
5365
5366* mark_rts.c (GC_approx_sp): Use volatile to avoid common
5367warning.
5368
5369* dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
5370order.
5371
5372* alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
5373include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
5374include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
5375include/javaxfc.h, include/private/gc_locks.h,
5376include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
5377misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
5378stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
5379win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
5380* test.c: Remove some old K&R code.
5381
5382* win32_threads.c (GC_may_be_in_stack): New.  (GC_Thread_Rep):
5383Add last_stack_min.  (GC_push_stack_for): Use last_stack_min.
5384(GC_get_next_stack): Add limit argument, use_last_stack_min.
5385(GC_suspend): make stack_base assignment conditional.
5386* dyn_load.c (win32 GC_cod_add_roots): Pass limit to
5387GC_get_next_stack.
5388* configure_atomic_ops.sh: Remove.
5389* build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
5390Makefile.direct: Partially support build directories whose path
5391name contains blanks.
5392* Makefile.am: Support new files (build_atomic_ops.sh,
5393build_atomic_ops.sh.cygwin)
5394
5395* include/private/gc_locks.h, include/private/gc_pmark.h,
5396include/private/gc_priv.h, include/private/gcconfig.h,
5397mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
5398pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
5399Fix comments.
5400
5401* pthread_support.c: Comment out LOCK_STATS.
5402* include/gc.h: Fix comments.
5403
5404* misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
5405* include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
5406* os_dep.c (GC_get_main_stack_base): Use alternate definition
5407with USE_MMAP.
5408* include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
5409
5410* doc/README: Make it clearer when Makefile.direct is assumed.
5411* cord/cord.am: install include/cord.h.
5412
5413* win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
5414Remove unused variables.
5415* darwin_stop_world.c: Always declare GC_thr_init().
5416* dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
5417SHORT_DBG_HDRS is defined.
5418* include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
5419mark, USE_MARK_BITS version): Refer to correct parameter name.
5420
5421* finalize.c (GC_general_register_disappearing_link): Remove
5422redundant code.
5423* gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
5424* os_dep.c: (GC_write_fault_handler): Remove remaining
5425references to deleted variable "code".  Remove redundant
5426FREEBSD definitions.
5427* include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
5428defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
5429
5430* include/private/gc_priv.h: Update MAX_HEAP_SECTS.
5431
5432* dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
5433smashed string, (GC_debug_free_inner): Mark as free.
5434* mallocx.c (GC_malloc_many): Always clear new block if
5435GC_debugging_started.
5436* reclaim.c: Move GC_debugging_started from
5437GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
5438which is also called directly.
5439* doc/README: Fix spelling error.  Update license summary.
5440* include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
5441* tests/test.c: Don't define GC_DEBUG if already defined.
5442
5443* doc/simple_example.html: update --enable-full-debug reference,
5444Make HTML formatting standards compliant.
5445* doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
5446* doc/gcinterface.html: specify encoding.
5447
5448* doc/simple_example.html: Update thread-local allocation
5449description.
5450
5451* configure.ac: Check for gc-debug earlier; replace remaining
5452full-debug tests.
5453* include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
5454Use signed offset type.  Use ptr_t internally.
5455* doc/gcinterface.html: Update LOCAL_MALLOC description.
5456* doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
5457Fix full-debug reference.
5458* include/gc.h: Rewrite GC_..._INCR and friends.
5459* tests/test.c: Minimally test GC_..._INCR and friends.
5460
5461* mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
5462GC_push_next_marked_uncollectable): Never invoke GC_push_marked
5463on free hblk.
5464* headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
5465(GC_header_cache_miss): Always blacklist pointers for free
5466hblks.  Add assertion and comment.
5467* pthread_support.c (GC_register_my_thread): Fix #if indentation.
5468* include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
5469Delete it.
5470* include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
5471
5472* alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
5473
5474* configure.ac: Set win32_threads on MinGW.
5475
5476Ivan's description of the patch follows. Note that a few pieces like
5477the GC_malloc(0) patch, were not applied since an alternate had been
5478previously applied.  A few differed stylistically from the rest of
5479the code (mostly casts to void * instead of target type),
5480or were classified as too minor to bother.  Note that
5481all of Ivan's static declarations which did not correct outright
5482naming bugs (as a few did), where replaced by STATIC, which is
5483ignored by default.
5484
5485- minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
5486GC_malloc(0));
5487- addition of missing getter/setter functions for public variables
5488(may be useful if compiled as Win32 DLL);
5489- addition of missing GC_API for some exported functions;
5490- addition of missing "static" declarator for internal functions
5491and variables (where possible);
5492- replacement of all remaining K&R-style definitions with ANSI
5493C ones (__STDC__ macro is not used anymore);
5494- addition of some Win32 macro definitions (that may be missing in
5495the standard headers supplied with a compiler) for GWW_VDB mode;
5496- elimination of most compiler warnings (except for
5497"uninitialized data" warning);
5498- several typos correction;
5499- missing parenthesis addition in macros in some header files of
5500"libatomic_ops" module.
5501
5502My highlights based on reading the patch:
5503
5504* allchblk.c: Remove GC_freehblk_ptr decl.
5505Make free_list_index_of() static.
5506* include/gc.h: Use __int64 on win64, define GC_oom_func,
5507GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
5508add getter and setters: GC_get_gc_no, GC_get_parallel,
5509GC_set_oom_fn, GC_set_finalize_on_demand,
5510GC_set_java_finalization, GC_set_dont_expand,
5511GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
5512GC_set_finalizer_notifier.  Always define GC_win32_free_heap.
5513gc_config_macros.h: Define _REENTRANT after processing
5514GC_THREADS.
5515* include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
5516handling of operator new[] for old Windows compilers.
5517* include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
5518around arguments.
5519* dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
5520* mark.c (GC_mark_and_push_stack): Fix source argument for
5521blacklist printing.
5522* misc.c: Fix log file naming based on environment variable
5523for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
5524just return current value with 0 argument.  Add DONT_USE_USER32_DLL.
5525Add various getters and setters as in gc.h.
5526* os_dep.c: Remove no longer used GC_disable/enable_signals
5527implementations.  (GC_get_stack_base): Add pthread_attr_destroy
5528call.  No longer set GC_old_bus_handler in DARWIN workaround.
5529* pthread_support.c: GC_register_my_thread must also
5530call GC_init_thread_local.
5531
5532* Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
5533* mach_dep.c: Include signal.h.
5534* gc_priv.h: Factor out INLINE declaration.
5535
5536* include/private/gcconfig.h: Update MIPS/LINUX config.
5537* doc/gcdescr.html: Fix typo.
5538* mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
5539for MIPS/LINUX.
5540
5541* configure.ac: SPARC fixes.
5542* thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
5543size 0, except for gcj.
5544* doc/gc.man: Expand C++ cautions.
5545* include/gc_inline.h: Fix comments.
5546
5547
5548== [7.1] 2008-05-03 ==
5549
5550* doc/gcinterface.html: Improve C++ interface documentation.
5551
5552* allchblk.c (GC_allochblk): Check for overflow during size
5553rounding.
5554* tests/huge_test.c: New.
5555* Makefile.direct, tests/tests.am: Add huge_test.c
5556
5557* pthread_support.c: Fix typo in comment.
5558* os_dep.c (GC_win32_get_mem): Add heap section only if
5559allocation succeeded.
5560
5561* malloc.c: (free replacement) Fix caller address space check.
5562
5563* finalize.c (GC_grow_table): Dereference table in null-check.
5564
5565* win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
5566Consistently call CloseHandle. (GC_suspend): Call
5567GC_delete_gc_thread.
5568* tests/test.c: Don't reference GC_print_stats if not exported.
5569
5570* tests/test.c (run_one_test): Don't mention pthread_self().
5571* misc.c: Declare GC_thr_init().
5572
5573* allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
5574and refine assertions to handle huge unmergable blocks.
5575(GC_allochblk_nth): Add comment.
5576
5577* include/private/gcconfig.h: Add missing FREEBSD macro
5578consistency test.
5579
5580* allchblk.c (GC_enough_large_bytes_left): No longer take
5581parameters; return free list index bound.
5582(GC_merge_unmapped): Don't access nexthdr until after null test.
5583(Fixes bug in 1/29/08 check-in.)  (GC_allochblk): Calculate
5584when splitting is allowable only once here, not when considering each
5585block. (GC_allchblk_nth): Accept new may_split parameter.
5586Avoid some redundant tests for exact size matches.
5587* alloc.c (GC_should_collect): Cache min_bytes_allocd.
5588(GC_maybe_gc): Make locking assertion testable.
5589* mark_rts.c: Fix indentation.
5590* pthread_stop_world.c: Replace old GC_err_printf1 reference.
5591* tests/test.c: Remove (void) casts.  Optionally print some
5592timing information.
5593
5594* windows-untested/gc.def: Remove CreateThread line.
5595* windows-untested/README: New file.
5596* win32_threads.c (GC_use_DllMain): Force collector initialization.
5597* include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
5598* mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
5599* include/gc_cpp.h: Add matching placement delete overloads
5600everywhere.
5601* include/private/gc_locks.h (NO_THREAD): Add cast.
5602* include/private/gcconfig.h: Add test for __HP_aCC.
5603* configure.ac, tests/tests.am:  Avoid libgccpp on HP/UX.
5604
5605* doc/README.win32: Fix typo.
5606* configure.ac: Fix printing of enable-shared result.
5607
5608* misc.c (GC_init_inner): Assert !GC_need_to_lock only when
5609defined.  (GC_call_with_stack_base): Add GC_API.
5610* os_dep.c (GC_get_stack_base): Add GC_API.
5611* win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
5612Add GC_API.
5613* include/gc.h: Add GC_API annotations.
5614* include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
5615PCR.
5616* include/private/gc_pmark.h: Fix comments.
5617
5618* include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
5619Add GC_push_typed_structures() to push GC_ext_descriptors.
5620
5621* tests/test.c: Call GC_INIT for DARWIN; test system type using
5622gcconfig.h-defined macros.
5623
5624* allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
5625blocks large enough that their size, when interpreted as a signed
5626value, would be negative.
5627* include/private/gc_priv.h: Comment hb_sz range limit.
5628
5629* mark.c (GC_push_next_marked): correct comment.
5630* Makefile.direct: document NO_PROC_STAT.
5631* include/private/gcconfig.h: Accommodate NO_PROC_STAT.
5632
5633
5634== [7.1alpha2] 2008-01-10 ==
5635
5636* Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
5637again.  Refer to build directory as ".".
5638
5639* configure.ac: Ignore --enable-parallel-mark on Darwin for now.
5640* darwin_stop_world.c: Add FIXME comment for parallel marker.
5641
5642* include/private/gc_priv.h: Update MAX_ROOT_SETS
5643and LOG_PHT_ENTRIES to handle larger heaps.
5644
5645* include/gc.h (GC_INIT,GC_init): Update comments.
5646
5647* allchblk.c, alloc.c, include/private/gc_priv.h:
5648Track GC_bytes_dropped and use in GC triggering decisions.
5649* alloc.c (min_bytes_allocd): Weight atomic blocks less.
5650
5651* alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
5652adjusting p.
5653
5654* Makefile.am: Add NT_X64_THREADS_MAKEFILE.
5655
5656* NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
5657* alloc.c: Add declaration for GC_add_current_malloc_heap.
5658* win32_threads.c (GC_beginthreadex): Clean up error
5659return code.
5660* doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
5661Add NT_X64_THREADS_MAKEFILE.
5662
5663* alloc.c: Define GC_version instead of in version.h.
5664* version.h: Remove.
5665* include/gc_version.h: Move most of version.h here.
5666* include/gc.h: Include gc_version.h.
5667* gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
5668* Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
5669Adjust for version.h rename.
5670
5671* configure.ac: Put libatomic_ops links in build directory.
5672* Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
5673as nodist sources.
5674
5675* include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
5676GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
5677
5678* alloc.c: Deal correctly with address wrapping for
5679GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
5680* finalize.c, include/gc.h (GC_register_disappearing_link,
5681GC_register_finalizer_inner): Improve out-of-memory handling.
5682* include/private/gc_pmark.h: Fix comment spelling.
5683
5684* include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
5685in other contexts.
5686
5687* include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
5688
5689* gc_cpp.cc: Don't include gc_cpp.h from local directory.
5690
5691* allchblk.c, configure.ac (add --enable-munmap)
5692
5693* dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
5694GC_GETSECTBYNAME instead.
5695* include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
5696architecture (Darwin).
5697
5698* reclaim.c (GC_bytes_found): Expand comment.
5699* thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
5700granules, not bytes, to GC_FAST_MALLOC_GRANS.
5701* include/gc.h: Never include gc_local_alloc.h.
5702* tests/test.c: Add size zero allocation tests.
5703
5704* malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
5705* allchblk.c: Sanity check GC_max_large_allocd_bytes.
5706
5707* Makefile.direct: Invoke $(MAKE) instead of make.
5708
5709* doc/scale.html: Reflect gc7 thread local allocation behavior.
5710
5711* include/extra/gc.h, include/extra/gc_cpp.h: New.
5712* include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
5713again.
5714
5715* pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
5716for HURD.
5717
5718* include/private/gcconfig.h: Add Linux/mips-64 support.
5719
5720* dbg_mlc.c: Use random() on all glibc systems.
5721* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
5722HURD.  Add comment.
5723* pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
5724systems without SA_SIGINFO.
5725
5726* include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
5727* tests/test.c (run_one_test): Add GC_PTR_STORE test.
5728No longer test for RS6000.
5729
5730* alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
5731Maintain GC_our_memory and GC_n_memory.
5732* dbg_mlc.c (GC_print_smashed_obj): Improve message.
5733(GC_print_all_smashed_proc): Pass client object address instead of
5734base.
5735* dyn_load.c (sort_heap_sects): New.  (GC_register_map_entries):
5736Register sections that are contiguous and merged with our heap.
5737* malloc.c, os_dep.c (GC_text_mapping): Check for just base name
5738of libraries.
5739* malloc.c (calloc): Check for special callers even with
5740USE_PROC_FOR_LIBRARIES. Move assertion.  Add rudimentary
5741malloc/free tracing.
5742* misc.c: No longer call GC_init_lib_bounds explicitly.
5743* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
5744initialize on demand.
5745* tests/test.c: Call GC_INIT only when required.
5746
5747* Makefile.direct: Remove comment fragment.
5748* tests/tests.am: Add smashtest.
5749* configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
5750* pthread_support.c: Fix comment spelling.
5751* include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
5752GC_LINUX_THREADS and REDIRECT_MALLOC.
5753* tests/smash_test.c: Initial check-in.
5754* obj_map.c: Print log entry to correct file.
5755* include/private/thread_local_alloc.h: Add TlsAlloc error check.
5756
5757* alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
5758while world is still running.
5759* os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
5760with world stopped.
5761* include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
5762* misc.c (GC_init/GC_init_inner): Perform all work in
5763GC_init_inner.
5764* Makefile.direct: Expand -DUSE_MUNMAP comment.
5765
5766* include/gc.h: Define uintptr_t explicitly for VC++6.
5767* msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
5768exist.
5769
5770
5771== [7.0] 2007-07-02 ==
5772
5773* include/gc_config_macros.h: Also check for IA64 when setting
5774GC_HPUX_THREADS.
5775* mallocx.c: Change my_bytes_allocd to signed_word.
5776* include/gc_pthread_redirects.h: Remove obsolete Solaris threads
5777(as opposed to pthreads) support.
5778
5779* mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
5780on ARM/Linux.  Check getcontext() return value.
5781
5782* backgraph.c (per_object_func): Make argument types consistent.
5783(GC_traverse_back_graph): Mark GC_deepest_obj.
5784
5785* finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
5786* os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
5787
5788* doc/README.win32, doc/README, README.QUICK: Fix some of the worst
5789anachronisms.
5790* dyn_load.c: Partially support cygwin, but don't enable it yet.
5791
5792* Makefile.am: Use -no-undefined for libgc.
5793* Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
5794* dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
5795consistently.
5796* misc.c: Fix some WARN calls.  Move GC_is_initialized setting and
5797GC_thr_init() call.
5798* os_dep.c: Consistently use WARN where appropriate.
5799* thread_local_alloc.c: Revert change to GC_WIN32_THREADS test.  Instead
5800remove inappropriate pthread.h include.
5801* doc/README.linux: Remove some anachronisms.
5802
5803* alloc.c: Also use GC_check_tls on non-Linux systems.
5804* mallocx.c (GC_reclaim_generic): Remove bogus declaration.
5805* include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
5806with prototype.
5807
5808* alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
5809(GC_print_heap_sects): Use size_t instead of unsigned long.
5810* thread_local_alloc.c (GC_lookup_thread): Define in the correct
5811context.
5812* win32_threads.c, include/gc_config_macros.h: The last of Romano
5813Paolo Tenca's patch.  Move stdint.h include to gc_config_macros.h.
5814* include/gc_inline.h: Avoid gc_priv.h dependencies.
5815* tests/test.c (check_heap_stats): Replace unsigned long with size_t.
5816
5817* NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
5818* mark_rts.c (GC_push_roots): Fix kind type.
5819
5820* doc/README.win64: New file.
5821* doc/doc.am, Makefile.direct: Add README.win64.
5822
5823* Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
5824* NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
5825* allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
5826finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
5827obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
5828win32_threads.c, cord/de_win.c, include/gc_mark.h,
5829include/private/gc_hdrs.h, include/private/gc_pmark.h,
5830include/private/gc_priv.h, tests/test_cpp.cc:
5831Replace old style function declarations.  Clean up integral types.
5832Remove register declarations.  The change in malloc.c and the
5833"int descr" declaration in mark.c are the most likely to have
5834been real bugs outside of win64.
5835* msvc_dbg.c: Disable on win64.
5836* win32_threads.c: Add AMD64 support.
5837* include/gc.h: no backtrace on AMD64 for now.
5838
5839* msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
5840
5841* include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
5842Don't include windows.h in an extern "C" context.
5843* include/private/gcconfig.h: Fix win64/X86_64 configuration.
5844* tests/test.c: Eliminate more old style function definitions.
5845Cleanup pointer and integer casts for win64.
5846* tests/test_cpp.cc: Don't include gc_priv.h.
5847* NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
5848* NT_X64_STATIC_THREADS_MAKEFILE: New.
5849
5850* win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK.  Ignore
5851FINISHED threads for suspension.  (GC_pthread_join): Add
5852pthread_self() cast.  (GC_pthread_start_inner): Execute cleanup
5853handler when popping it.
5854* include/private/gc_locks.h: Inline THREAD_EQUAL for
5855GC_WIN32_PTHREADS.  Define USE_PTHREAD_LOCKS only if we have
5856pthreads.
5857
5858* gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
5859tests/test.c: Accommodate GC_WIN32_PTHREADS.
5860* include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
5861* include/gc_config_macros.h: Define both PTHREADS and
5862GC_WIN32_THREADS.
5863* include/private/gc_locks.h: Nonstandard definitions of
5864NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
5865* doc/README.win32, Makefile.direct: Include documentation
5866for GC_WIN32_PTHREADS.
5867* Makefile.direct: Remove some anachronisms in the documentation.
5868
5869* Makefile.am: Move includes to bottom.  Add better library
5870dependencies.  Increment library version.  Remove "SUBDIRS += .".
5871* cord/cord.am, tests/tests.am: Add better library dependencies.
5872Remove now unnecessary dependencies.
5873* include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
5874Move to define on all Windows platforms.  (_beginthread): define
5875to generate error if used.
5876
5877* include/private/gc_locks.h: Format to 80 columns.
5878
5879* malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
5880* NT_MAKEFILE: msvc_dbg.h is in include/private.  Don't use cvars
5881rc.
5882* misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
5883case.
5884* win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
5885(GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
5886* include/gc.h: Add GC_reachable_here().  (GC_WinMain): Add GC_API.
5887(GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
5888* tests/test.c: Add GC_reachable_here() call.
5889
5890* alloc.c (GC_try_to_collect): Call GC_init if necessary.
5891* tests/thread_leak_test.c: Don't unconditionally define
5892GC_LINUX_THREADS.
5893
5894* Makefile.am: Remove extra_ldflags_libgc definition.
5895
5896* include/private/gc_priv.h: Define AO_REQUIRE_CAS.
5897
5898* finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
5899value.
5900
5901
5902== [7.0alpha9] 2007-05-15 ==
5903
5904* Some gc6.9 changes.
5905* Change FindTopOfStack decl in darwin_stop_world.c.
5906* Move some static tests from misc.c to gcconfig.h.  Use #error.
5907* Add GC_print_free_list() function (thanks to Bruce Hoult).
5908* Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
5909Barry DeFreese, and possibly other Debian maintainers).
5910* __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
5911Peter Wang).
5912* Integrated various MacOSX patches and tried to reconcile them (thanks to
5913Allan Hsu, several contributors at Apple, and probably others).
5914* Added some casts to powerpc.h in libatomic_ops to silence warnings.
5915
5916* Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
5917* include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
5918remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New.  GC_lock_holder: now
5919unsigned long.  I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
5920* pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
5921NUMERIC_THREAD_ID, THREAD_EQUAL.
5922* include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
5923* include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
5924ARM.
5925
5926* dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
5927GC_debug_register_finalizer_unreachable() patch from gcc tree.
5928* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
5929to check GC has been initialized.
5930
5931* include/gc_cpp.h: Documentation updates.
5932* include/gc_config_macros.h: Don't check for __ppc__ to set
5933DARWIN_THREADS.
5934* Makefile.am: Include configure_atomic_ops.sh in dist.
5935
5936* Makefile.am: Don't distribute copied atomic_ops files.  Include
5937libatomic_ops with "make dist".
5938* configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
5939* win32_threads.c: Report error for Cygwin + GC_DLL.
5940
5941* Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
5942* cord/de_win.c: Rename and move AboutBox.  Call GC_INIT.  Remove
5943MakeProcInstance anachronism.
5944* doc/README.macros: Officially remove elif prohibition.
5945Remove documentation for defunct SRC_M3 support.
5946* include/gc.h: Remove more SRC_M3 references.
5947* include/private/gcconfig.h: Remove still more SRC_M3 references.
5948GC_SOLARIS_THREADS no longer needs to be checked separately.
5949
5950* thread_local_alloc.c, include/private/thread_local_alloc.h:
5951Spell __declspec correctly.
5952* NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
5953
5954* doc/README.win32: Adjust GC_win32_dll_threads rules again.
5955
5956* mark.c (GC_mark_some wrapper): Restructure for readability, handle
5957GC_started_thread_while_stopped.
5958* misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
5959* win32_threads.c: (client_has_run): remove,
5960GC_started_thread_while_stopped, GC_attached_thread: add.
5961(GC_push_all_stacks): Add verbose output.
5962(DllMain): Avoid initializing collector or the like.
5963Never update both thread tables.
5964* doc/README.win32: Adjust GC_win32_dll_threads rules.
5965
5966* pthread_stop_world.c (GC_push_all_stacks): Print thread count with
5967GC_PRINT_VERBOSE_STATS.
5968
5969* configure.ac: Comment out redundant
5970AC_DEFINE(NO_EXECUTE_PERMISSION).
5971* sparc_mach_dep.S: Remove single quote in comment.
5972* include/private/gcconfig.h: Fix DATAEND for NONSTOP.
5973* win32_threads.c: Include stdint.h for Mingw.  Add GC_API for DllMain.
5974(GC_use_DllMain): Fix assertion.
5975
5976* configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
5977* Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
5978* include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
5979targets. Remove comments.
5980Prepare ppc64 support for Darwin.
5981
5982* darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
5983Make i unsigned.
5984(GC_stop_world): Likewise. Remove unused GC_thread p.
5985(GC_start_world): Likewise.
5986
5987* os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
5988Remove double SIG_HNDLR_PTR definition.
5989(GC_forward_exception): Fix compiler warnings, make i unsigned.
5990Initialize thread_state to NULL.
5991(catch_exception_raise): Fix compiler warnings, make i unsigned.
5992
5993* include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
5994also define for X86_64.
5995* configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
5996* README.changes: Point to ChangeLog.
5997
5998* darwin_stop_world.c: Move THREAD_FLD defines to ...
5999* include/private/gc_priv.h: ... here.
6000Fix THREAD_STATE definitions for ppc64.
6001* os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
6002access.
6003
6004* configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
6005HAS_X86_THREAD_STATE32_*.
6006(x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
6007HAS_X86_THREAD_STATE64_*.
6008Added value 1 in the above AC_DEFINE's. Important for the upcoming
6009Leopard.
6010* include/private/gcconfig.h: Modified X86_64 define for Darwin.
6011Removed __x86_64__ check in POWERPC section. Added base definitions
6012for the X86_64 Darwin port.
6013* include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
6014to distinguish between 32 and 64-bit applications. Added definitions
6015for X86_64 Darwin.
6016* darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
6017replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
6018(GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
6019!DARWIN_DONT_PARSE_STACK. Maybe obsolete.
6020* dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
6021(GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
6022Distinguish between getsectbynamefromheader_64 and
6023getsectbynamefromheader.
6024* os_dep.c (catch_exception_raise): Introduce exception definition for
6025X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
6026x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
6027
6028
6029== [7.0alpha7] 2006-09-19 ==
6030
6031* More 6.7 changes.
6032* Declare GC_dump() in gc.h.
6033* Add --enable-large-config, which just defines the LARGE_CONFIG macro.
6034* Make GlobalAlloc address alignment a bit more intuitive (thanks to
6035Charles Mills).
6036* Use #elif in the definitions of GET_MEM.
6037* Overhaul porting.html.  Remove corresponding text from README.
6038* Fix typo in DARWIN section of gcconfig.h.
6039* Fix Darwin thread memory leak (thanks to Bruce Mitchener).
6040* Update x86 AO_test_and_set implementation to use "=q".
6041* Add $(EXEEXT) to many tests in tests/tests.am.  (Corresponds to a
60426.7 fix, which no longer applied.)
6043* Fix Darwin/PPC port.
6044* Fix Cygwin/threads port.
6045* Fix gcj malloc support.
6046* For GNU-style make, don't build libatomic_ops unless threads are requested.
6047This should allow single-threaded builds on platforms which do not
6048currently support libatomic_ops.
6049* Clean up and hopefully fix the CFLAGS calculation for GNU build.
6050(Substantially improves things on HP/UX.)
6051* Integrated Andrei Polushin's Visual C++ patches.  These provide for
6052stack traces, better C++ debug support, and better log file handling.
6053Note that these change the location of the log file to a the path of the
6054executable with a .log extension.  To get the old behavior back, define
6055OLD_WIN32_LOG_FILE.  For the time being, I'm checking his project
6056files and the like into a windows-untested subdirectory.  They
6057are almost certainly already out of date, but better than what we had
6058before.
6059* Fixed some win32 threads bugs, and added support for _beginthreadex.
6060* Fix zero size thread local allocation so that explicit deallocation
6061works correctly.
6062* Removed serious bug in GC_malloc_uncollectable(large size).
6063* Do not try to do thread-local gcj allocation in incremental mode.  There
6064are races in setting up the descriptor.
6065* Add GC_INIT() to middle.c, fix some more GC_printfn calls.
6066* Some assertions erroneously used I_HOLD_LOCK() negatively, even though
6067it can now spuriously return TRUE.
6068* Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
6069* On Linux and some Un*x variants, allocate memory by first trying sbrk,
6070and then switching to mmap if that fails.
6071* Fixed /proc/x/maps reading to deal with asynchronous deletions.
6072* Fix REDIRECT_MALLOC with threads on Linux.  It now usually seems to work
6073with ugly hacks that include having calloc behave differently when it is
6074called from ld.so or the pthreads library.  A reasonable amount of
6075infrastructure was added to support some of this.  (Thanks to Roland McGrath
6076for ideas and information.)
6077* Import various updated build scripts.
6078* Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
6079* Fix serious bugs in GC_malloc_atomic_uncollectable().
6080* Return GC_SUCCESS form GC_get_stack_base().
6081* Fix several atomic_ops problems on IA64 with HP Compiler.
6082* Update to atomic_ops-1.2.
6083* Fix hb_n_marks description and reclaim.c assertion.
6084* Various additional win32 threads fixes.
6085* Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
6086
6087
6088== [7.0alpha5] 2005-09-29 ==
6089
6090* More 6.6, 6.7 changes.
6091* Some Solaris fixes, including some more general changes in how
6092the assembly pieces of mach_dep.c are handled.
6093* Removed a lot of SOLARIS_THREADS-specific code that was only
6094needed with the old implementation.  This included many (mostly no-op)
6095versions of GC_is_fresh.
6096* Don't use atomic_ops in gc_locks.h unless we need threads.
6097* Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
6098* Removed Solaris GC_INIT hack.  It's a workaround for a long dead bug,
6099and it seemed to be wrong anyway.
6100* Changed win32_threads.c to require preprocessor-based interception
6101of thread routines by default.  A client call to GC_use_DllMain is
6102now required to get the old behavior in which DllMain is used to implicitly
6103register threads.  This was done for uniformity with other platforms, and
6104because the DllMain solution seemed to require very tricky code which,
6105at least in the past, imposed hard bounds on the number of threads.
6106* Many small changes to make thread support work again on Cygwin.
6107* Moved definition of allocator lock etc. to pthread_support.c and
6108win32_threads.c for those two cases.
6109* Got rid of the FASTLOCK() machinery.  It doesn't seem useful on modern
6110platforms.
6111* Cleaned up the uncollectible allocation routines, speeding up the
6112slower paths.  The code did enough unnecessary work off the critical path
6113that the underlying logic was getting hard to extract.
6114* No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL.  Indications
6115are it just works, and I think the reasons for it not working disappeared
6116a while ago.
6117* Fixed bugs in hb_n_marks calculation and assertion.
6118* Don't use __builtin_expect for pre-3.0 gcc.
6119* Define GWW_VDB only for recent Microsoft tool chains.
6120* Add overview.html to doc directory.
6121* Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
6122* Made thread local allocation sort of work with Cygwin.  The code should
6123be there to deal with other Windows variants, But non-Cygwin Windows
6124threads need more bug fixes.
6125
6126
6127== [7.0alpha4] 2005-08-02 ==
6128
6129* Various 6.5, 6.6 changes.
6130* Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
6131(thanks to Ben Maurer).
6132* Integrated build patches from Davide Angelocola and Petter Urkedal.
6133* Fix dynamic-linker-based pthread call redirection.
6134* Renamed RS6000 to POWERPC/AIX.
6135* Allow recovery from SIGSEGV in marker on Linux.  This works around
6136a race in thread stack marking if /proc is used to find roots.  We do
6137that by default with malloc redirection and threads.  This involved
6138moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
6139* Added doc/porting.html file.
6140* Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
6141memory overwrite errors.
6142* Added trivial NO_INCREMENTAL flag to facilitate debugging.
6143* Added GC_getattr_np-based GC_get_stack_base (untested).
6144* Separated thread local allocation into a separate file and added the
6145beginning of win32 support for that.
6146
6147
6148== [7.0alpha3] 2005-04-28 ==
6149
6150* Added support for dlopen-based interception of pthread functions.
6151This is only half done.  The gc.h redefinitions currently interfere.
6152* Integrated major automake overhaul from Petter Urkedal.
6153
6154
6155== [7.0alpha2] 2005-04-07 ==
6156
6157* GC_bytes_allocd was incremented by a possibly uninitialized variable
6158in GC_generic_malloc_inner.  (Bug introduced in gc7.0alpha1.  Thanks
6159to Ben Hutchings for tracking it down.)
6160* Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
6161* Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
6162implementation for win32.
6163* Removed pc_gc.tar and floppy targets in Makefile.direct.  Removed
6164pc_excludes file.
6165* No longer include GC_bytes_wasted when evaluating allocation progress.
6166Since we are now counting live memory, it no longer makes sense.
6167* Applied Davide Angelocola's configure patch.  There are now separate
6168Makefile.am's in the cord and tests subdirectory, more tests, etc.
6169* Renamed configure.in to configure.ac.
6170* Merged a very small number of Nathanael Nerode's configure.ac
6171cleanups from the gcc tree.  Unfortunately, that file is a bit
6172different from ours.
6173* Changed EINTR handling in sem_wait slightly.
6174* Restructure the root marking code.  Remove all traces of
6175USE_GENERIC_PUSH_REGS, and effectively make it the default.
6176Make it easier to pass a context pointer to the mark routine, in
6177case we ever want to do precise stack marking.
6178* Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
6179This remains undocumented, and only implemented for pthreads.  But it
6180removes an otherwise unavoidable race with stores of callee-save
6181registers.
6182* Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case.  This
6183resulted in bogus complaints in heap dumps.
6184* Upgrade to libatomic_ops-1.0, and update build structure to match.
6185* Remove SRC_M3 support. Clean up lock initialization code in misc.c.
6186* Removed gc_local_alloc.h.  If THREAD_LOCAL_ALLOC is defined, the
6187thread local allocation routines are now called automatically.
6188* Renamed gc_inl.h back to gc_inline.h.  Changed the interface appreciably
6189since locking has turned into a dominant issue, and in-line allocation
6190only makes sense if it's no worse than thread-local allocation.
6191Gc_inline.h is now also used to implement thread-local allocation.
6192* Finished replacing stubborn allocation with manual write barrier.
6193Untested.
6194* Use thread-local allocation code by default.
6195* Added GC_register_my_thread and friends for Posix and win32.
6196* Patch for GWW_VDB from Ben Hutchings.
6197* Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
6198redefines GC_malloc.
6199* Removed now unused AIX memory allocation code.
6200* Various minor fixes for bugs introduced in 7.0alpha1.
6201
6202
6203== [7.0alpha1] 2004-11-09 ==
6204
6205* Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST.  Assume ANSI C compiler
6206and use ANSI constructs unconditionally.
6207* Introduce #elif and #error in some of the appropriate places.
6208* Remove GC_printf cruft. Use stdargs.
6209* Remove separate Solaris threads support.  Use the more generic Posix
6210implementation.
6211* Use atomic_ops for atomic operations and memory barriers.
6212* Clean up MPROTECT_VDB implementation.  Use SA_SIGINFO wherever
6213possible.
6214* Remove broken SIGNALS stuff.
6215* Use size_t instead of word, where appropriate.
6216* Add .S.o rule to Makefile.am.
6217* Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
6218A/UX, HP), IBM PC/RTs and RISCOS/Irix4.  (I doubt the old code worked.
6219If anyone cares, these should be easy to resurrect.)
6220* Add EXPECT() in some critical places.
6221* Redefined hb_sz and hb_body to deal with bytes rather than words.
6222This affected a great deal of code.  I would like to consistently use
6223byte offsets and sizes where there's not a convincing reason to do
6224otherwise.
6225* Redefined several other variables (GC_mem_found, GC_words_allocd)
6226etc. to use units of bytes.  Most of these were also renamed to
6227reflect that fact.
6228* Killed as many "register" declarations as possible.
6229* Partially replaced stubborn allocation with manual write barrier.
6230It's currently broken.
6231* Restructured mark code, to allow mark bits to be kept either on
6232a per allocation granule or per object basis.  The emphasis is
6233now on the -DUSE_MARK_BYTES option, since individual bits perform
6234quite badly on hyper-threaded P4s, and are probably suboptimal on
6235other architectures.  -DUSE_MARK_BITS is currently broken, and may
6236be resurrected only for the single-threaded case.  This significantly
6237reduced the cache footprint required by auxiliary GC data structures.
6238It also reduces space overhead for small heaps.  It probably slows
6239things down slightly if interior pointers are very common.
6240* As part of the above, we now maintain an approximate count of set
6241mark bits in each heap block.
6242* As part of the above, the semantics of hb_map changed drastically.
6243For MARK_BIT_PER_OBJ, it doesn't exist.  For MARK_BIT_PER_GRANULE,
6244it is purely a way to replace a mod instruction with a table lookup.
6245(Somewhat to my surprise, this still wins on modern hardware.)
6246* Removed PRINTSTATS, GATHERSTATS, and SILENT macros.  Everything is
6247now controlled by GC_print_stats variable and GC_PRINT_STATS
6248and new GC_PRINT_VERBOSE_STATS environment variables.
6249* Add GC_log_printf and use it consistently for logging output.
6250* Unconditionally count the objects we reclaim in the sweep phase.
6251For thread local allocation, we need that anyway, and we expect
6252that's increasingly the only case that matters.  And it simplifies
6253the code.  In general expect minor performance hacks that benefit
6254only the single-threaded case to disappear.
6255* Remove GC_quiet from gc.h and elsewhere.
6256* Changed the heap expansion heuristic, and the definition of
6257GC_free_space_divisor, to refer to live data size, instead of total
6258heap size.  I believe this is much more robust.  It wasn't previously
6259possible, because we didn't have access to live data size.
6260* Thread local allocation added the extra byte in twice: Once in
6261thread_local_alloc, and once in malloc_many.
6262* Removed GC_malloc_words_small and GC_gcj_fast_malloc.  A new
6263mechanism based on the thread local allocation data structures
6264is expected to be added instead.  This should allow inlined code
6265that is both fast and doesn't rely on collector internals.
6266* Changed both free lists and reclaim lists to be indexed by granules
6267instead of words, norming halving their size.
6268* MERGE_SIZE is now the only option, and the macro was removed.
6269(Without it, we need a memory reference to GC_all_interior_pointers
6270anyway.  Thus it costs us nothing.)
6271* Change GC_size_map to map to granules instead of words.  Make sure
6272that every possible size up to TINY_FREELISTS is present.
6273* Split of macros need for fast inline allocation into gc_tiny_fl.h
6274in anticipation of a new inline allocator that doesn't rely on GC
6275internals.
6276* Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
6277in anticipation of a merge with the inline allocation code.
6278* Removed ALIGN_DOUBLE.  This is mostly handled by GRANULE_BYTES.
6279* Make locking on most platforms conditional on GC_need_to_lock.
6280
6281
6282== [6.9] ==
6283
6284* Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
6285* Fix M68K LINUX port (thanks to Debian packagers).
6286* __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
6287* Integrated Allan Hsu's patch for OS X VM deallocation problems.
6288* Applied FreeBSD/X86_64 patch.
6289
6290
6291== [6.8] 2006-07-08 ==
6292
6293* Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
6294Thomas Klausner).
6295* Improvements to the HP/UX section of configure.in/configure.ac (thanks
6296to Andreas Tobler).
6297* GC_unix_get_mem could neglect to release the malloc lock on Irix, under
6298extremely unlikely circumstances.  (Thanks to Jean-Baptiste Nivois for
6299some careful code inspection.)
6300* Added support for kFreeBSD + glibc (thanks to Petr Salinger).
6301* Fix more MacOS threads memory leaks (thanks to Allan Hsu).
6302* Added initial Solaris/X86-64 support (thanks to Rainer Orth).
6303
6304
6305== [6.7] 2006-03-03 ==
6306
6307* Add "int" to Solaris "end" and "etext" declaration in gc.h.  Declared
6308the symbols with underscores and as arrays, since that's what's actually
6309used.  Perhaps this could all just be removed.  (Thanks to John Bowman.)
6310* Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
6311* Added casts for assignments to hb_last_reclaimed, which truncate the
6312value.  Added a cast to GC_adj_words_allocd.  Use GetModuleHandleA
6313when retrieving a handle to kernel32.dll under win32.
6314* Added Tandem S-Series support.  (Thanks to Craig McDaniel.  A modified
6315version of his patch was applied, and hence breakage is probably not
6316his fault.)
6317* Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
6318to Hanno Boeck).
6319* Changed a test for LINUX in config_macros.h to one for __linux__.
6320* Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
6321David Ayers).
6322* Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
6323(thanks to Andreas Tobler).
6324* Add support for Darwin/X86 (thanks to Geoff Norton and the Mono
6325developers).
6326* Merge in some recent gcc fixes.  Add ppc64 asm code.  (Thanks to
6327Bryce McKinlay and other GCJ developers.)
6328* Scan MEM_PRIVATE sections under Windows ME and predecessors.
6329* Interior pointers with some largish offsets into large objects could
6330be ignored, if GC_all_interior_pointers was set.  (Oddly this worked
6331correctly for stack references if it was not set.  Otherwise it failed
6332for both stack and heap references.  Thanks to Andrew McKinlay for the
6333critical test case.)
6334* Integrated Tatsuya Bizenn's NETBSD threads support, with some
6335untested changes.
6336* Added GC_strdup and friends to make leak detection work correctly
6337for strdup clients (thanks to Jon Moore).  Fixed the existing strdup
6338with malloc redirection to handle a null malloc return correctly.
6339
6340
6341== [6.6] 2005-09-09 ==
6342
6343* Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
6344* Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
6345* Integrated Andreas Tobler's FreeBSD/PowerPC patch.
6346* Don't access the GC thread structure from the restart handler.  It's
6347unsafe, since the handler may run too late.  (Thanks to Ben Maurer for
6348tracking this down.)
6349* Applied Christian Thalinger's patch to change comment syntax in
6350alpha_mach_dep.S.
6351* Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
6352Juan Jose Garcia-Ripoll).
6353* Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
6354Sugioka Toshinobu and Christian Thalinger).
6355* Rewrote GC_parse_map_entry.  This assumed a fixed column layout of
6356/proc/self/maps on Linux.  This ceased to be true about 2 years ago.
6357The old code is probably quite problematic with -DREDIRECT_MALLOC.  It
6358is also used by default for IA64, though I haven't seen actual failures
6359there.
6360* More consistently define HBLKSIZE to 4096 on 64 bit architectures with
63614K pages (thanks to Andrew Haley).
6362* With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
6363to Ben Hutchings for the observation and patch).
6364* Move up struct callinfo declaration to make gcc 4.0.2 happy.
6365
6366
6367== [6.5] 2005-05-22 ==
6368
6369* Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
6370* Make GC_approx_sp() write to dummy location to ensure that stack
6371is grown here, when sp looks reasonable, rather than later, when
6372it might look like a bad memory reference.  (Problem was never
6373observed that I know of.  But on rereading the code it seemed
6374dubious.)
6375* Separate out GC_with_callee_saves_pushed and sometimes call
6376it from GC_suspend_handler in pthread_stop_world.c.  Callee-save
6377register values sometimes failed to get traced under HP/UX on
6378PA-RISC.  Linux/IA64 had the same problem, though non-stacked
6379callee-save registers seem to be so rarely used there that nobody
6380ever noticed.
6381* Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
6382from Andreas Tobler, which I had lost.
6383* Fix compare_and_exchange implementation for gcc/IA64 to deal with
6384pickier compiler versions.
6385* Fixed Itanium 32-bit ABI support (HP/UX).  In particular, the
6386compare_and_exchange implementation didn't consider that possibility.
6387* Undefine GC_pthread_detach in win32_threads.c (thanks to
6388Tommaso Tagliapietra).
6389* Fixed inclusion of frame.h for NETBSD in os_dep.c.
6390* Applied Dan Bonachea's patch to use mmap on AIX.
6391* Several fixes to resurrect the Irix port on recent OS versions.
6392* Change ALPHA to use LINUX_STACKBOTTOM.
6393* Change SPARC64/LINUX to also use LINUX_STACKBOTTOM.  Deal with potential
6394bad values of __libc_stack_end on that platform (thanks to David Miller).
6395* Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
6396(Unnecessary in 7.0)
6397* Force a define of __STDC__=0 for the IBM compiler on AIX, so that
6398we get prototypes.  (Unnecessary in 7.0)
6399* GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
6400which are only defined in private include files.
6401* Integrated some small gcconfig.h patches from Dan Bonachea.  Also
6402relaxed assertion about FreeBSD stack size in pthread_support.c.
6403* Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
6404support.  This may need additional work.
6405* Avoided potentially infinite recursion in GC_save_callers if
6406the system backtrace calls malloc.  The workaround currently requires
6407__thread support if this code is used with threads.
6408* Avoided another similar infinite recursion by conditionally
6409invoking GC_save_callers in alloc.c (thanks to Matthias Andree
6410for helping to track down both of these).
6411* Removed all traces of aix_irix_threads.c.  AIX and Irix now use
6412pthread_support.c and pthread_stop_world.c.  The old code appeared
6413to be unreliable for AIX, and was not regularly maintained.
6414* On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
6415they're not always safe to read.
6416* Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
6417in GC_remove_from_fl.
6418* Fix stack_size assertion in GC_pthread_create.
6419* Fix assertion in GC_steal_mark_stack.
6420
6421
6422== [6.4] 2004-12-21 ==
6423
6424* Merge gcconfig.h changes from gcc tree.
6425* Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
6426aix_irix_threads.c, and solaris_threads.c to get thread definitions.
6427* Start marker threads in GC_thr_init, so that they get started even
6428if no other threads are ever started.  (Oddly enough, the parallel
6429collector worked correctly, though not well, with no helper threads.)
6430* Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
6431is set (thanks to Alexander Petrossian).
6432* GC_PRINT_BACK_HEIGHT would deadlock with thread support.
6433* Let in_progress_space in backgraph.s grow dynamically.
6434* Fix README.solaris2.  The GC_thr_init() hack doesn't work anymore.
6435* Convert GC_finalizer_mem_freed to bytes in allchblk.c.
6436* Add missing declaration for GC_generic_malloc_words_small_inner.
6437Without it, s390x breaks.  (Thanks to Ulrich Weigand.)
6438* Applied several MacOSX patches to support older tool chains (thanks
6439to Stefan Ring).
6440* Bug fix for NetBSD/amd64 (thanks to Marc Recht).
6441* Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
6442* Fixed an uninitialized variable in cordprnt.c.
6443* Eliminated some, but not all, gcc -Wall warnings.
6444* Changed some old style casts to reinterpret_cast in new_gc_alloc.h
6445(thanks to Dan Grayson).
6446* GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
6447GC_DONT_ADD_BYTE_AT_END is set.
6448* Changed some (long) casts to (word) in preparation for win64 (thanks
6449to Peter Colson).
6450* Changed "int stack_size" declaration in pthread_support.c to use
6451size_t.  (Only mattered with GC_ASSERTIONS enabled.)
6452* Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
6453* Removed GC_IGNORE_FB frame buffer recognition, and replaced
6454it with a check that the mapping type is MEM_IMAGE.
6455In theory, this should work much better, but it is a high
6456risk change for win32.  (Thanks to Ashley Bone for the crucial
6457experimental data behind this, and to Rutger Ovidius for
6458some further experiments.)
6459* GC_allochblk_nth incremented GC_words_wasted by bytes rather than
6460words.
6461* Consider GC_words_wasted in GC_adj_words_allocd only if it is within
6462reason.  (A hack to avoid some extremely unlikely scenarios in which
6463we manage to allocate only "wasted" space.  7.0 has a better fix.)
6464* Changed PowerPC GC_clear implementation to use lwsync instead of
6465eieio, since the documentation recommends against eieio, and
6466it seems to be incorrect if the preceding memory op is a load.
6467* Fixed print_block_list to print the correct kind number for
6468STUBBORN (thanks to Rutger Ovidius).
6469* Have configure.in generate an error if it is asked to support
6470pthreads, but doesn't know how to.
6471* Added Kazuhiro Inaoka's patch for Renesas M32R support.
6472* Have the GNU build mechanism link with -ldl.  Rename THREADLIBS
6473to THREADDLLIBS to reflect this.  (Thanks to Sven Verdoolaege.)
6474* Added Hannes Mehnert's patch for FreeBSD/SPARC support.
6475* Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
6476(Thanks to John Merryweather Cooper.)
6477* Define MPROTECT_VDB on MACOSX only if threads are being used, since the
6478dirty page tracking mechanism uses threads.  (This avoids an undefined
6479reference to _GC_darwin_register_mach_handler_thread.)
6480* By popular demand, use __libc symbols only if we are built with
6481USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
6482* Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
6483The GC itself will dirty lots of pages in this cases, probably making
6484it counterproductive on all platforms.  And the DARWIN port crashes.
6485
6486
6487== [6.3] 2004-07-08 ==
6488
6489* Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
6490* Very large allocations could cause a collector hang.  Correct
6491calculation of GC_collect_at_heapsize.
6492* GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
6493was defined.
6494* Include gc_config_macros.h in threadlibs.c.
6495* Correct MacOSX thread stop code (thanks to Dick Porter).
6496* SMALL_OBJ definition was off by one.  This could cause crashes
6497at startup.  (Thanks to Zoltan Varga for narrowing this down to
6498a trivial test case.)
6499* Integrate Paolo Molaro's patch to deal with a race in the Darwin
6500thread stopping code.
6501* Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
6502implementation.  The old approach appears to have been broken by
6503recent kernels.
6504* Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
6505to Andrew Begel).
6506* Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
6507* Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
6508
6509
6510== [6.3alpha6] 2004-05-06 ==
6511
6512* Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
6513* Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
6514different prefetch instructions from AMD64).  (Thanks to H.J. Lu.)
6515* GC_config_macros.h did not correctly define GC_WIN32_THREADS from
6516GC_THREADS.
6517* Added simple_example.html.
6518* Merged Andrew Gray's patch to correctly restore signal handlers on
6519FreeBSD.
6520* Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
6521on x86-64.  Added some other casts so that the PREFETCH macros
6522always get a ptr_t argument.  Removed some casts in the PREFETCH
6523implementations.
6524* Added a header guard for gc_allocator.h and changed GC_debug_free to
6525clobber contents of deallocated object (suggested by Jesse Jones).
6526* The signal masking code in pthread_stop_world.c contained some errors.
6527In particular SIGSEGV was masked in the handler, in spite of the fact that
6528it wrote to the heap.  This could lead to an uncaught SIGSEGV, which
6529apparently became much more likely in Linux 2.6.  Also fixed some
6530typos, and reduced code duplication in the same area.
6531* Remove ltconfig, clean up configure messages for DG/UX (thanks to
6532Adrian Bunk for the patches).
6533* Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
6534
6535
6536== [6.3alpha5] 2004-03-30 ==
6537
6538* Fix & vs && typo in GC_generic_malloc and
6539GC_generic_malloc_ignore_off_page.  (Propagated from the gcc tree.)
6540* Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
6541(According to Christian Limpach, the NetBSD problem is fixed.
6542Presumably so is the Solaris 2.3 problem.)
6543* Removed placement delete from gc_cpp.h for the SGI compiler (thanks
6544to Simon Gornall for the patch).
6545* Changed semantics of the GC_IGNORE_FB environment variable, based
6546on experimentation by Nicolas Cannasse pointing out that the old
6547interpretation was useless.  We still need help in identifying win32
6548graphics memory mappings.  The current "solution" is a hack.
6549* Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
6550It probably made more sense in the gcc context.
6551* Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
6552* Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
6553supports the same extension on various platforms.
6554* Added some basic (completely untested) defines for win64, in support
6555of future work.
6556* Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
6557a memory overwrite bug on Solaris and perhaps other platforms.
6558* Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
6559Jakub Jelinek for the patch and explaining the problem).
6560Otherwise pre-linking could cause the collector to fail.
6561* Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
6562for HP/UX with gcc.  The compiler-based implementation appears to work
6563only with the vendor compiler.
6564* Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
6565making client mark code cleaner and less dependent on GC version.
6566* Export several new procedures and GC_generic_malloc from gc_mark.h
6567to support user-defined kinds.  Use the new procedures to replace existing
6568code in gcj_mlc.c and typd_mlc.c.
6569* Added support for GC_BACKTRACES.
6570* Fixed a remaining problem in CORD_str with signed characters (thanks
6571to Alexandr Petrosian for the patch).
6572* Removed supposedly redundant, but very buggy, definitions of finalizer
6573macros from javaxfc.h.  Fortunately this file probably has no users.
6574The correct declarations were already in gc.h.
6575* Also need to set GC_in_thread_creation while waiting for GC during
6576thread termination, since it is also possible to collect from an
6577unregistered thread in that case.
6578* Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
6579Plus some other minor WinCE fixes (thanks to Alain Novak).
6580* Added GC_register_describe_type_fn.
6581* Arrange for debugging finalizer registration to ignore non-heap
6582registrations, since the regular version of the routine also behaves
6583that way.
6584* GC_gcj_malloc and friends need to check for finalizers waiting to be run.
6585One of the more obscure allocation routines with missing a LOCK() call.
6586* Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
6587to work with VS.NET.
6588* Cleaned up GC_INIT calls in test.  Updated gc.man to encourage GC_INIT
6589use in portable code.
6590* Taught the GC to use libunwind if --enable-full-debug is specified on
6591IA64 and libunwind is present.
6592* The USE_MUNMAP code could get confused about the age of a block and
6593prematurely unmap it.  GC_unmap_old had a bug related to wrapping of
6594GC_gc_no.  GC_freehblk and GC_merge_unmapped didn't maintain
6595hb_last_reclaimed reasonably when blocks were merged.  The code was
6596fixed to reflect original intent, but that may not always be an
6597improvement.
6598
6599
6600== [6.3alpha4] 2004-01-01 ==
6601
6602* USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
6603* Darwin support was broken in alpha3 as a result of my mis-integration of
6604Andrew Begel's patches.  Fixed with another patch from Andrew Begel.
6605* A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
6606overly aggressive.  We may collect from an unregistered thread during
6607thread creation.  Fixed by explicitly checking for that case.  (Added
6608GC_in_thread_creation.)
6609
6610
6611== [6.3alpha3] 2003-12-20 ==
6612
6613* Removed -DSMALL_CONFIG from BCC_MAKEFILE.
6614* Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
6615* Mostly applied a DJGPP patch from Doug Kaufman.  Especially Makefile.dj
6616had suffered from serious bit rot.
6617* Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
6618and a call to alloca (for lcc compatibility).
6619* Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
6620the memory with PROT_NONE instead of unmapping it.  The latter risks
6621an intervening mmap grabbing the address space out from underneath us.
6622Updated this code to reflect a cleaner patch from Ulrich Drepper.
6623* Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
6624(Patch from Andrew Begel.)
6625* Dynamically choose whether or not lock should spin on win32 (thanks
6626to Maurizio Vairani for the patch).  This may be a significant performance
6627improvement for win32.
6628* Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
6629in the distribution (thanks to Maurizio Vairani).
6630* Maybe_install_looping_handler() was accidentally exported, violating
6631our name space convention.
6632* Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD.  (Thanks to
6633Christian Limpach.  I generalized the patch to use sigsetjmp on all
6634UNIX_LIKE platforms, admittedly a slightly risky move.  But it may avoid
6635similar problems on some other platforms.  I also cleaned up the definition
6636of UNIX_LIKE a bit.)
6637* Integrated Andrew Begel's Darwin threads patch, adjusted according to
6638some of Fergus Hendersons's comments.  (Patch didn't apply cleanly,
6639errors are possible.)
6640* Added another test or two for the Intel 8.0 compiler to avoid
6641confusing it with gcc.  The single-threaded collector should now build
6642with icc, at least on ia64.
6643
6644
6645== [6.3alpha2] 2003-11-04 ==
6646
6647* Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
6648* Put back the WINABI qualifier for GC_CreateThread.  (Thanks to
6649Danny Smith for the patch.  6.3alpha1 had the qualifier in one place
6650but not elsewhere, which was clearly wrong.)
6651* Sometimes explicitly define __private_extern__ before DARWIN dyld.h
6652include.  (Thanks to Andreas Tobler for posting the patch.)
6653* Included signal.h from pthread_support.c.  Removed GC_looping_handler,
6654which was dead code.
6655* GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
6656defined (thanks to Glauco Masotti for testing and reporting this).
6657Changed GC_find_start to never just return 0.  According to its
6658comment it doesn't, and it's unclear that's correct.
6659* GC_alloc_large had several largely compensating bugs in the
6660computation of GC_words_wasted.  (It was confused about bytes vs.
6661words in two places.)
6662* Integrated Slava Sysoltsev's patch to support more recent versions of
6663the Intel compiler on IA64/Linux.
6664* Changed win32 spinlock initialization to conditionally set a spin count.
6665(Emmanual Stumpf pointed out that enabling this makes a large performance
6666difference on win32 multiprocessors.)  Also cleaned up the win32 spinlock
6667initialization code a bit.
6668* Fixed thread support for HP/UX/IA64.  The register backing store base for
6669the main thread was sometimes not set correctly.  (Thanks to
6670Laurent Morichetti.)
6671* Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
6672* Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
6673avoid 64-bit size mismatches (thanks to Bernie Solomon).
6674* Fixed GC_generic_push_regs to avoid a potential and very unfortunate
6675tail call optimization.  This could lead to prematurely reclaimed
6676objects on configurations that used the generic routine and the new
6677build infrastructure (which potentially optimizes mach_dep.c).
6678This was a serious bug, but it's unclear whether it has resulted in
6679any real failures.
6680* Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
6681for noticing the problem and supplying the patch).
6682* Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
6683to Anthony Green).
6684* Partially merged a win32 patch from Ben Hutchings, and substantially
6685revised other parts of win32_threads.c.  It had several problems.
6686Under MinGW with a statically linked library, the main thread was
6687not registered.  Cygwin detached threads leaked thread descriptors.
6688There were several race conditions.  For now, unfortunately the
6689static threads limit remains, though we increased it, and made table
6690traversal cost depend on the actual thread count.
6691There is also still some code duplication with pthread_support.c.
6692(Thread descriptors did become much smaller, since Ben Hutchings
6693removed the thread context from them.)
6694* Integrated a Solaris configure.in patch from Rainer Orth.
6695* Added GC_IGNORE_FB and associated warning to very partially address
6696the issue of the collector treating a mapped frame buffer as part
6697of the root set.  (Thanks to David Peroutka for providing some
6698insight.  More would be helpful.  Is there anything that can be used
6699to at least partially identify such memory segments?)
6700
6701
6702== [6.3alpha1] 2003-07-26 ==
6703
6704* Integrated some NetBSD patches by Marc Recht.  These
6705were already in the NetBSD package.
6706* GC_pthread_create waited for the semaphore even if pthread_create failed.
6707(Thanks to Dick Porter for the pthread_support.c patch.)  Applied the
6708analogous fix for aix_irix_threads.c.
6709* Added Rainer Orth's Tru64 fixes.
6710* The check for exceeding the thread table size in win32 threadDetach
6711was incorrect (thanks to Alexandr Petrosian for the patch).
6712* Applied Andrew Begel's patch to correct some reentrancy issues
6713with dynamic loading on Darwin.
6714* GC_CreateThread() was neglecting to duplicate the thread handle in
6715the table (thanks to Tum Nguyen for the patch).
6716* Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
6717Roger Sayle for the patch).
6718* Applied more AIX threads patches from Scott Ananian.
6719
6720
6721== [6.2] 2003-06-21 ==
6722
6723* Integrated a second round of Irix/AIX patches from Dan Bonachea.
6724Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
6725the Irix assembler to do the C preprocessing; gcc -E doesn't work.
6726* Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
6727* There was a race between GC_pthread_detach and thread exit that could
6728result in a thread structure being deallocated by GC_pthread_detach
6729even though it was still needed by the thread exit code (thanks to
6730Dick Porter for the small test case that allowed this to be debugged).
6731* Fixed version parsing for non-alpha versions in acinclude.m4 and
6732version checking in version.h.
6733* Issues identified (not yet fixed):
6734- A dynamic libgc.so references dlopen unconditionally, but doesn't link
6735against libdl.
6736- GC_proc_fd for Solaris is not correctly updated in response to a
6737fork() call.  Thus incremental collection in the child won't work
6738correctly.  (Thanks to Ben Cottrell for pointing this out.)
6739- --enable-redirect-malloc is mostly untested and known not to work
6740on some platforms.
6741- There seem to be outstanding issues on Solaris/X86, possibly with
6742finding the data segment starting address.
6743- Very large root set sizes (> 16 MB or so) could cause the collector
6744to abort with an unexpected mark stack overflow.  (Thanks to
6745Peter Chubb.)  NOT YET FIXED.  Workaround is to increase the initial
6746size.
6747- The SGI version of the collector marks from mmapped pages, even
6748if they are not part of dynamic library static data areas.  This
6749causes performance problems with some SGI libraries that use mmap
6750as a bitmap allocator.  NOT YET FIXED.  It may be possible to turn
6751off DYNAMIC_LOADING in the collector as a workaround.  It may also
6752be possible to conditionally intercept mmap and use GC_exclude_static_roots.
6753The real fix is to walk rld data structures, which looks possible.
6754- Incremental collector should handle large objects better.  Currently,
6755it looks like the whole object is treated as dirty if any part of it is.
6756
6757
6758== [6.2alpha6] 2003-06-05 ==
6759
6760* There was an extra underscore in the name of GC_save_registers_in_stack
6761for NetBSD/SPARC (thanks to Jaap Boender for the patch).
6762* Integrated Brian Alliet's patch for Darwin.  This restructured the
6763linuxthreads/pthreads support to separate generic pthreads support
6764from more the system-dependent thread-stopping code.  I believe this
6765should make it easier to eliminate the code duplication between
6766pthreads platforms in the future.  The patch included some other
6767code cleanups.
6768* Integrated Dan Bonachea's patch to support AIX threads.  This required
6769substantial manual integration, mostly due to conflicts with other
6770recent threads changes.  It may take another iteration to
6771get it to work.
6772* Removed HPUX/PA-RISC support from aix_irix_threads.c.  It wasn't used
6773anyway and it cluttered up the code.  And anything we can do to migrate
6774towards generic pthreads support is a good thing.
6775* Added a more explicit test for tracing of function arguments to test.c.
6776* Added Akira Tagoh's PowerPC64 patch.
6777* Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
6778pointing it out).  gc.h now includes just windows.h, not winbase.h.
6779* Declared GC_save_regs_in_stack() in gc_priv.h.  Remove other declarations.
6780* Changed --enable-cplusplus to use automake consistently.  The old way
6781confused libtool.  "Make install" didn't work correctly for the old version.
6782Previously --enable-cplusplus was broken on cygwin.
6783* Changed the C version of GC_push_regs to fail at compile time if it is
6784generated with an empty body.  This seems to have been the cause of one
6785or two subtle failures on unusual platforms.  Those failures should
6786now occur at build time and be easily fixable.
6787
6788
6789== [6.2alpha5] 2003-05-14 ==
6790
6791* GC_invoke_finalizers could, under rare conditions, set
6792GC_finalizer_mem_freed to an essentially random value.  This could
6793possibly cause unbounded heap growth for long-running applications
6794under some conditions.  (The bug was introduced in 6.1alpha5, and
6795is not in gcc3.3.)
6796* Attempted to sanitize the various DLL macros.  GC_USE_DLL disappeared.
6797GC_DLL is used instead.  All internal tests are now on GC_DLL.
6798README.macros is now more precise about the intended meaning.
6799* Include DllMain in the multi-threaded win32 version only if the
6800collector is actually built as a dll (thanks to Mohan Embar for
6801a version of the patch).
6802* Hide the cygwin threadAttach/Detach functions.  They were violating our
6803namespace rules.
6804* Fixed an assertion in GC_check_heap_proc.  Added GC_STATIC_ASSERT
6805(thanks again to Ben Hutchings).
6806* Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
6807* CORD_cat was not rebalancing unbalanced trees in some cases, violating
6808a CORD invariant.  Also tweaked the re-balancing rule for
6809CORD_cat_char_star.  (Thanks to Alexandr Petrosian for the bug report
6810and patch.)
6811* Added hand-coded structured exception handling support to mark.c.
6812This should enable support of dynamic libraries under win32 with
6813gcc-compiled code.  (Thanks to Ranjit Mathew for the patch.)
6814Turned on dynamic library scanning for win32/gcc.
6815* Removed some remnants of read wrapping (thanks to Kenneth Schalk).
6816GC_USE_LD_WRAP was probably broken in recent versions.
6817* The build could fail on some platforms since gcconfig.h could include
6818declarations mentioning ptr_t, which was not defined, e.g. when if_mach
6819was built (thanks to Yann Dirson for pointing this out).  Also
6820cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
6821* The GC_LOOP_ON_ABORT environment variable interfered with incremental
6822collection, since the write fault handler was erroneously overridden.
6823Handlers are now set up in the correct order.
6824* It used to be possible to call GC_mark_thread_local_free_lists() while
6825the world was not stopped during an incremental GC.  This was not safe.
6826Fortunately, it was also unnecessary.  Added GC_world_stopped flag
6827to avoid it.  (This caused occasional crashes in GC_set_fl_marks
6828with thread local allocation and incremental GC.  This probably happened
6829primarily on old, slow multiprocessors.)
6830* Allowed overriding of MAX_THREADS in win32_threads.c from the build
6831command line (thanks to Yannis Bres for the patch).
6832* Taught the IA64/linux code to determine the register backing store base from
6833/proc/self/maps after checking the __libc symbol, but before guessing.
6834(__libc symbols are on the endangered list, and the guess is likely to not
6835always be right for 2.6 kernels.)  Restructured the code to read and parse
6836/proc/self/maps so it only exists in one place (all platforms).
6837* The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux.  It claimed that it
6838also registered the main data segment, but didn't actually do so.  (I don't
6839think anyone actually uses this configuration, but ...)
6840* Made another attempt to get --enablecplusplus to do the right thing.
6841Since there are unavoidable problems with C programs linking against a
6842dynamic library that includes C++ code, I separated out the c++ code into
6843libgccpp.
6844
6845
6846== [6.2alpha4] 2003-03-10 ==
6847
6848* Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS.  (See Debian bug
6849# 177204)
6850* Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
6851* Integrated Grzegorz Jakacki's substantial GNU build patch.  "Make dist"
6852should now work for the GNU build process.  Documentation files
6853are installed under share/gc.
6854* Tweaked gc_cpp.h to again support the Borland compiler (thanks to
6855Rene Girard for pointing out the problems).
6856* Updated BCC_MAKEFILE (thanks to Rene Girard).
6857* Added GC_ASSERT check for minimum thread stack size.
6858* Added --enable-gc-assertions.
6859* Added some web documentation to the distribution.  Updated it in the
6860process.
6861* Separate gc_conf_macros.h from gc.h.
6862* Added generic GC_THREADS client-defined macro to set the appropriate
6863GC_XXX_THREADS internal macro.  (gc_config_macros.h.)
6864* Add debugging versions of _ignore_off_page allocation primitves.
6865* Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
6866from gc.h to gc_priv.h.
6867* Reset GC_fail_count even if only a small allocation succeeds.
6868* Integrated Brian Alliet's patch for dynamic library support on Darwin.
6869* gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
6870when it should have called the lower case version, since it was
6871explicitly computing a base pointer.
6872
6873
6874== [6.2alpha3] 2003-01-30 ==
6875
6876* Don't include execinfo.h in os_dep.c when it's not needed, and may not
6877exist.
6878
6879
6880== [6.2alpha2] ==
6881
6882* Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
6883Hironori Sakamoto for the patch).
6884* Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
6885* Attempted to work around the problems with .S filenames and the SGI
6886compiler.  (Untested.)
6887* Worked around an HP/UX make issue with the GNU-style build process.
6888* Fixed the --enable-cplusplus build machinery to allow builds without
6889a C++ compiler.  (That was always the intent ...)
6890* Changed the debugging allocation macros to explicitly pass the return
6891address for Linux and XXXBSD on hardware for which we can't get stack
6892traces.  Use __builtin_return_address(0) to generate it when possible.
6893Some of the configuration work was cleaned up (good) and moved to gc.h
6894(bad, but necessary).  This should make leak detection more useful
6895on a number of platforms.  (Thanks to Fabian Thylman for the suggestion.)
6896* Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
6897* Bumped revision number for dynamic library.
6898
6899
6900== [6.2alpha1] 2003-01-23 ==
6901
6902* Guard the test for GC_DUMP_REGULARLY in misc.c with
6903"#ifndef NO_DEBUGGING".  Otherwise it fails to build with NO_DEBUGGING
6904defined.  (Thanks to Manuel Serrano.)
6905* Message about retrying suspend signals was incorrectly generated even when
6906flag was not set.
6907* Cleaned up MACOSX/NEXT root registration code.  There was apparently a
6908separate ifdef case in GC_register_data_segments() for no reason.
6909* Removed MPROTECT_VDB for MACOSX port, based on one negative report.
6910* Arrange for gc.h and friends to be correctly installed with GNU-style
6911"make install".
6912* Enable the GNU-style build facility include C++ support in the library
6913with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
6914* Mark from GC_thread_key in linux_threads.c, in case that's allocated
6915from the garbage collected heap, as it is with our own thread-specific
6916storage implementation (thanks to Jeff Sturm).
6917* Mark all free list header blocks if they are heap allocated.  This avoids
6918some unnecessary tracing.  And it remains correct if we clear the
6919root set.  (Thanks to Jeff Sturm for identifying the bug.)
6920* Improved S390/Linux support.  Add S390/Linux 64-bit support (thanks to
6921Ulrich Weigand).
6922* Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
6923GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h.  This is technically
6924an interface change.  Based on the fact that nobody reported this,
6925I suspect/hope there were no clients.
6926* Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
6927when appropriate, (2) doesn't generate references to undefined internal
6928macros, and (3) allows easier manual construction of descriptors.
6929* Close the file descriptor used by GC_print_address_map().
6930* Set the "close-on-exec" bit for various file descriptors maintained
6931for the collector's internal use.
6932* Added a hack to find memory segments owned by the system allocator
6933under win32.  Based on my tests, this tends to eventually find all
6934segments, though it may take a while.  There appear to be cleaner,
6935but slower solutions under NT/XP.  But they rely on an API that's
6936unsupported under 9X.
6937* Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM.  (Thanks
6938to Akira Tagoh for pointing out that HEURISTIC1 does not work on
693964-bit kernels.)
6940* Added GC_set_free_space_divisor to avoid some Windows dll issues.
6941* Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
6942of candidate pointers for tagging, etc.
6943* Always lock around GC_notify_full_gc().  Simplified code for
6944invoking GC_notify_full_gc().
6945* Changed the way DATASTART is defined on FreeBSD to be robust against
6946an unmapped page after etext.  (Thanks to Hironori Sakamoto for
6947tracking down the intermittent failure.)
6948* Made GC_enable() and GC_disable() official.  Deprecated direct update
6949of GC_dont_gc.  Changed GC_gcollect to be a noop when garbage collection
6950is disabled.
6951* Call GC_register_dynamic_libraries before stopping the world on Linux,
6952in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
6953* Introduced a more general mechanism for platform-dependent code to
6954decide whether the main data segment should be handled separately
6955from dynamic libraries, or registered by GC_register_dynamic_libraries.
6956The latter is more reliable and easier on Linux with dl_iterate_phdr.
6957
6958
6959== [6.1] ==
6960
6961* Added GC_MAXIMUM_HEAP_SIZE environment variable.
6962* Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
6963* Double page hash table size for -DLARGE_CONFIG.
6964* Integrated Bo Thorsen's X86-64 support.
6965* STACKBOTTOM definition for LINUX/MIPS was partially changed back
6966(thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
6967* Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
6968SEARCH_FOR_DATA_START.  It doesn't hurt to fall back to a search.
6969And __data_start doesn't seem to get defined correctly of the GC
6970library is loaded with LD_PRELOAD, e.g. for leak detection.
6971* If the GC_find_leak environment variable is set, do a
6972atexit(GC_gcollect) to give us at least one chance to detect leaks.
6973This may report some very benign leaks, but ...
6974* Addeded REDIRECT_FREE.  It's necessary if we want leak detection with
6975LD_PRELOAD.
6976* Defer printing of leaked objects, as for smashed objects.
6977* Fixed process and descriptor leak in GC_print_callers.  Try for
6978line number even if we got function name.)
6979* Ported parallel GC support and thread local allocation to Alpha.
6980Not yet well-tested.
6981* Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
6982* Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
6983alpha_mach_dep.s.
6984* Incorporated a change to new_gc_alloc.h,
6985which should make it work with gcc3.1.
6986* Use alpha_mach_dep.S only on Linux.  (It's not clear that this is
6987optimal, but it otherwise didn't build on Tru64.  Thanks to Fergus Henderson.)
6988* Added ifdef to guard free() in os_dep.c.  Otherwise we get a
6989compilation error on Irix (thanks to Dai Sato).
6990* Added an experimental version of GC_memalign to mallocx.c.  This can't
6991always work, since we don't handle alignment requests in the hblk-level
6992allocator, and we can't handle arbitrary pointer displacements unless
6993GC_all_interior_pointers is enabled.  But it should work for alignment
6994requests up to HBLKSIZE.  This is not yet documented in the standard
6995places.
6996* Finally debugged the OSF1/Tru64 thread support.  This needs more testing,
6997since I needed to add a somewhat unconvincing workaround for signal
6998delivery issues that I don't yet completely understand.  But it does
6999pass my tests, even in parallel GC mode.  Incremental GC support is
7000disabled if thread support is enabled, due to the signal issues.
7001* Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
7002* Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
7003declarations to gc.h.  On IA64, this is required for REDIRECT_MALLOC
7004to work correctly with these.
7005* Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
7006
7007
7008== [6.1alpha5] 2002-06-19 ==
7009
7010* Added GC_finalizer_mem_freed, and changed some of the code that
7011decided on heap expansion to look at it.  Memory explicitly
7012deallocated by finalizers essentially needs to be counted as reclaimed
7013by the GC.  Otherwise there are cases in which the heap can grow
7014infinitely.  (Thanks to Mark Reichert for the test case.)
7015* Integrated Adam Megacz patches to not scan dynamic libraries if
7016we are compiling with gcc on win32.  Otherwise we need structured
7017exception handling to deal with asynchronously unmapped root
7018segments, and gcc doesn't directly support that.
7019* Integrated Anthony Green's patch to support Wine.
7020* GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
7021places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
7022* Integrated Loren J. Rittle's Alpha FreeBSD patches.  These also
7023changed the declarations of symbols like _end on many platforms to
7024that they wouldn't mistakenly be declared as short data symbols (suggested by
7025Richard Henderson).
7026* Integrated changes from the Debian distribution (thanks to Ryan Murray
7027for pointing these out).
7028Fix C++ comments in POWERPC port.  Add ARM32
7029incremental GC support.  Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
7030this time for real.  Use va_copy to get rid of cord printf problems
7031(finally).
7032* Close file descriptor used to count CPUs (thanks to Jeff Sturm for
7033pointing out the omission).
7034* Don't just drop gcj free lists in GC_start_reclaim, since that can
7035eventually cause the marker to see a bogus mark descriptor in the
7036dropped objects.  The usual symptom was a very intermittent segmentation
7037fault in the marker.  This mattered only if one of the GC_gcj_malloc
7038variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
7039Tom Tromey for helping to track this down).
7040* Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
7041Jeff Sturm, Tom Tromey, and Christian Joensson).
7042* Fixed a typo in strdup definition (thanks to Gerard A Allan).
7043* Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
7044This is needed on Linux.  I'm not sure whether it's better or worse
7045on Tru64.
7046* Changed gc_cpp.h once more to declare operator new and friends only in
7047a Microsoft environment.  This may need further fine tuning (thanks to
7048Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
7049* Don't ever override strdup if it's already macro defined (thanks to
7050Adnan Ali for pointing out the problem).
7051* Changed gc_cpp.h yet again to also overload placement new.  Due to the
7052C++ overloading rules, the other overloaded new operations otherwise hide
7053placement new, which causes many STL uses to break (thanks to Reza Shahidi
7054for reporting this, and to Matt Austern for proposing a fix).
7055* Integrated cygwin pthreads support from Dan Bonachea.
7056* Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
7057* Changed printing code to print more complete GC times.
7058* Applied Mark Mitchell's Irix patch to correct some bit rot.
7059* Clarified which object-printing routines in dbg_mlc.c should hold
7060the allocation lock.  Restructured the code to allow reasonable object
7061printing with -DREDIRECT_MALLOC.
7062* Fix the Linux mmap code to always start with 0x1000 as the initial hint.
7063Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
7064Jeffrey Mark Siskind).
7065* Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
7066with a system header (thanks to Philip Brown).
7067* Cause win32_threads.c to handle an out of range stack pointer correctly,
7068though currently with a warning.  (Thanks to Jonathan Clark for
7069observing that win32 applications may temporarily use the stack
7070pointer for other purposes, and suggesting a fix.  Unfortunately, it's
7071not clear that there is a complete solution to this problem.)
7072
7073
7074== [6.1alpha4] 2002-06-16 ==
7075
7076* Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
7077building.  Increased 64-bit heap size limit in test.c slightly, since
7078a functional SPARC collector seems to slightly exceed the old limits.
7079* Use NPRGREG in solaris_threads.c, thus printing all registers if things
7080go wrong.
7081* Added GC_MARKERS environment variable to allow use of a single marker
7082thread on an MP without confusing the lock implementation.
7083* Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
7084This is really a purely generational mode, and we can afford to
7085postpone the collection until the heap is (nearly) full.
7086* Remove read() wrapper for MPROTECT_VDB.  It was causing more harm than
7087good.  It is often no longer needed if system calls avoid writing to
7088pointerfull heap objects.
7089* Fix MACOSX test in gcconfig.h (thanks to John Clements).
7090* Change GC_test_and_set so that it consistently has one argument.
7091Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
7092Ryan Murray).
7093* Fixed a formatting error in dbg_mlc.c.  Added prototype to GC_abort()
7094declaration (thanks to Michael Smith).
7095* Removed "source" argument to GC_find_start().  Eliminate GC_FIND_START().
7096* Added win32 recognition code in configure.in.  Changed some of the
7097dllimport/export defines in gc.h (thanks to Adam Megacz).
7098* GC_malloc_many didn't set hb_last_reclaimed when it called
7099GC_reclaim_generic.  (I'm not sure this matters much, but ...)
7100* Allocating uncollectible objects with debug information sometimes
7101allocated objects that were one byte too small, since uncollectible
7102objects don't have the extra byte added at the end (thanks to
7103Wink Saville for pointing this out).
7104* Added a bit more assertion checking to make sure that gcj objects
7105on free lists never have a nonzero second word.
7106* Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
7107* Upgraded libtool, cinfigure.in and some related files to hopefully
7108support NetBSD/SPARC (thanks to Adrian Bunk).  Unfortunately,
7109libtool 1.4.2 seemed to be buggy due to missing quotes in several
7110"test" invocations.  Fixed those in the ltmain.sh script.
7111* Some win32-specific patches, including the introduction of
7112GC_CreateThread (thanks to Adam Megacz).
7113* Merged in gcj changes from Anthony Green to support embedded systems.
7114* Tried to consistently rename preprocessed assembly files with a capital
7115.S extension.
7116* Use alpha_mach_dep.S on ALPHA again.  It doesn't really matter, but this
7117makes our distribution consistent with the gcc one, avoiding future merge
7118problems.
7119* Move GET_MEM definition into gcconfig.h.  Include gcconfig.h slightly
7120later in gc_priv.h to avoid forward references to ptr_t.
7121* Add some testing of local allocation to test.c.
7122* Change definition of INVALID_QTID in specific.h.  The -1 value was used
7123inconsistently, and too likely to collide with a valid stack address.
7124Some general clean-up of specific.[ch].  Added assertions.  (Thanks
7125to Michael Smith for tracking down an intermittent bug to this
7126general area.  I'm not sure it has been squashed yet, however.)
7127* On Pthread systems it was not safe to call GC_malloc() between fork()
7128and exec().  According to the applicable standards, it doesn't appear
7129to be safe to call malloc() or many other libc functions either, thus
7130it's not clear this is fixable.  Added experimental support for
7131-DHANDLE_FORK in linux_threads.c which tries to support it.  It may
7132succeed if libc does the right thing.  I'm not sure whether it does.
7133(Thanks to Kenneth Schalk for pointing out this issue.)
7134* Documented thread local allocation primitives to require an
7135explicit GC_init call.  GC_init_parallel is no longer declared to
7136be a constructor function, since that isn't portable and often
7137seems to lead to initialization order problems.
7138* Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
7139compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
7140* Some more patches for Linux on HP PA-RISC.
7141* Added include/gc_allocator.h.  It implements (hopefully) standard
7142conforming (as opposed to SGI-style) allocators that allocate
7143collectible (gc_allocator) or GC-traceable, but not collectible
7144(traceable_allocator) objects.  This borrows heavily from libstc++,
7145which borrows heavily from the SGI implementation, this part of
7146which was written by Matt Austern.  Changed test_cpp.cc to very
7147minimally test this.
7148* On Linux/X86, retry mmap with a different start argument.  That should
7149allow the collector to use more (closer to 3GB) of the address space.
7150* Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
7151patch to the gcc tree).
7152* Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
7153to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
7154* Compensated for the fact that current versions of glibc set
7155__libc_stack_end incorrectly on Linux/IA64 while initialization code
7156is running.  This could cause the collector to miss 16 bytes of
7157the memory stack if GC_malloc or friends where called before main().
7158* Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
7159This will probably take another iteration to work, since his
7160patch conflicted with the libtool upgrade.
7161* Added README.arm.cross containing some information about cross-
7162compiling to an ARM processor from Margaret Fleck (original code provided by
7163Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
7164Tilman Vogel; also ported for iPAQ by Oliver Kurth).
7165
7166
7167== [6.1alpha3] 2002-02-07 ==
7168
7169* Minor cleanup on the gcconfig.h section for SPARC.
7170* Minor fix to support Intel compiler for I386/Linux (thanks to
7171Sven Hartrumpf).
7172* Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
7173* Restructured the way in which we determine whether or not to keep
7174call stacks for debug allocation.  By default SAVE_CALL_COUNT is
7175now zero on all platforms.  Added SAVE_CALL_NARGS parameters.
7176If possible, use execinfo.h to capture call stack.  (This should
7177add support for a number of new platforms, though often at
7178considerable runtime expense.)
7179* Try to print symbolic information for call stacks.  On Linux, we
7180do this with a combination of execinfo.h and running addr2line in
7181a separate process.  This is both much more expensive and much more
7182useful.  Amazingly, it seems to be fast enough for most purposes.
7183* Redefined strdup if -DREDIRECT_MALLOC is given.
7184* Changed incremental collector and MPROTECT_VDB implementation so that,
7185under favorable conditions, pointer-free objects are not protected.
7186Added GC_incremental_protection_needs() to determine ahead of time whether
7187pointer-free objects may be protected.  Replaced GC_write_hint() with
7188GC_remove_protection().
7189* Added test for GC_ENABLE_INCREMENTAL environment variable.
7190* Made GC_time_limit runtime configurable.  Added GC_PAUSE_TIME_TARGET
7191environment variable.
7192* Eliminated GC_page_sz, a duplicate of GC_page_size.
7193* Caused the Solaris and Irix thread creation primitives to call
7194GC_init_inner().
7195
7196
7197== [6.1alpha2] 2001-12-20 ==
7198
7199* No longer wrap read by default in multi-threaded applications.  It was
7200pointed out on the libgcj list that this holds the allocation lock for
7201way too long if the read blocks.  For now, reads into the heap are
7202broken with incremental collection.  It's possible to turn this back on
7203if you make sure that read calls don't block (e.g. by calling select
7204first).
7205* Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
7206* Added check for environment variable GC_IGNORE_GCJ_INFO.
7207* Added printing of stop-the-world GC times if GC_PRINT_STATS environment
7208variable is set.
7209* The calloc definition in leak_detector.h was missing parentheses, and
7210realloc was missing a second argument to GC_REALLOC (thanks to
7211Elvenlord Elrond).
7212* Added GC_PRINT_BACK_HEIGHT environment variable and associated
7213code, mostly in the new file backgraph.c.  See doc/README.environment.
7214* Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
7215Jonathan Clark).
7216* Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
7217different address-space layout).  This may help for other machines with
7218holes in the data segment.  (Thanks to Hironori Sakamoto.)
7219* Changed the order in which GC_push_roots and friends push things onto
7220the mark stack.  GC_push_all calls need to come first, since we can't
7221necessarily recover if those overflow the mark stack.  (Thanks to
7222Matthew Flatt for tracking down the problem.)
7223* Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
7224
7225
7226== [6.1alpha1] 2001-09-22 ==
7227
7228* Non-debug, atomic allocations could result in bogus smashed object
7229reports with debugging on (thanks to Patrick Doyle for the small test case).
7230* Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
72312.2.4 bug.
7232* Initial port to HP/UX on Itanium.  Thread support and both 32 and 64
7233bit ABIs appear to work.  Parallel mark support doesn't yet, due to
7234some inline assembly code issues.  Thread local allocation does appear
7235to work.
7236* ifdef'ed out glibc2.1/Itanium workaround.  I suspect nobody is using
7237that combination anymore.
7238* Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
7239Dimitris Vyzovitis for the patch).
7240* Debugged 64-bit support on HP/UX PA-RISC.
7241* Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
7242* Unregistering of finalizers with debugging allocation was broken (thanks
7243to Jani Kajala for the test case).
7244* Old finalizers were not returned correctly from GC_debug_register_finalizer.
7245* Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
7246* Cleaned up some statistics gathering code in reclaim.c (thanks to
7247Walter Bright).
7248* Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
7249* Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
7250traversal to dyn_load.c.  Changed it to weakly reference dl_iterate_phdr,
7251so that the old code is still used with old versions of glibc.
7252* Cleaned up feature test macros for various threads packages and
7253integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
7254It's likely that the cleanup broke something, since it touched lots of
7255code.  It's also likely that it fixed some unreported bugs in the
7256less common thread implementations, since some of the original code
7257didn't stand up to close scrutiny.  Support for the next pthreads
7258implementation should be easier to add.
7259
7260
7261== [6.0] 2001-07-26 ==
7262
7263* Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
7264* Fixed a stack clearing problem that resulted in SIGILL with a
7265misaligned stack pointer for multi-threaded SPARC builds.
7266* Integrated another HURD patch (thanks to Igor Khavkine).
7267
7268
7269== [6.0alpha9] ==
7270
7271* added README.macros.
7272* Made gc.mak a symbolic link to work around winzip's tendency to ignore
7273hard links.
7274* Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
7275it on untested platforms.
7276* Integrated initial GNU HURD port (thanks to Chris Lingard and
7277Igor Khavkine).
7278* A few more fixes for Digital Mars compiler (by Walter Bright).
7279* Fixed gcc version recognition.  Renamed OPERATOR_NEW_ARRAY to
7280GC_OPERATOR_NEW_ARRAY.  Changed GC_OPERATOR_NEW_ARRAY to be the default.
7281It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
7282Cesar Eduardo Barros).
7283* Changed the byte size to free-list mapping in thread local allocation
7284so that size 0 allocations are handled correctly.
7285* Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
7286* Changed finalization registration to invoke GC_oom_fn when it runs out
7287of memory.
7288* Removed lvalue cast in finalize.c.  This caused some debug configurations
7289not to build with some non-gcc compilers.
7290
7291
7292== [6.0alpha8] 2001-06-15 ==
7293
7294* Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
7295so that they compile under Irix (thanks to Dave Love).
7296* Updated powerpc_macosx_mach_dep.s so that it works if the collector
7297is in a dynamic library (thanks to Andrew Begel).
7298* Transformed README.debugging into debugging.html, updating and
7299expanding it in the process.  Added gcdescr.html and tree.html
7300from the web site to the GC distribution.
7301* Fixed several problems related to PRINT_BLACK_LIST.  This involved
7302restructuring some of the marker macros.
7303* Fixed some problems with the sizing of objects with debug information.
7304Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST.  Reduced the
7305object size with SHORT_DEBUG_HDRS by another word.
7306* The "Needed to allocate blacklisted ..." warning had inadvertently
7307been turned off by default, due to a buggy test in allchblk.c.  Turned
7308it back on.
7309* Removed the marker macros to deal with 2 pointers in interleaved fashion.
7310They were messy and the performance improvement seemed minimal.  We'll
7311leave such scheduling issues to the compiler.
7312* Changed Linux/PowerPC test to also check for __powerpc__ in response
7313to a discussion on the gcc mailing list.
7314* Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
7315(suggested by Matthew Flatt).  This was causing problems in
7316systems that register all of their own roots.  It looks far more correct
7317to me without the "static" anyway.
7318* Fixed several problems with thread local allocation of pointer-free or
7319typed objects.  The collector was reclaiming thread-local free lists, since
7320it wasn't following the link fields.
7321* There was apparently a long-standing race condition related to
7322multi-threaded incremental collection.  A collection could be started and
7323a thread stopped between the memory unprotect system call and the setting of
7324the corresponding dirt bit.  I believe this did not affect Solaris or PCR,
7325which use a different dirty-bit implementation.  Fixed this by installing
7326signal handlers with sigaction instead of signal, and disabling the thread
7327suspend signal while in the write-protect handler.  (It is unclear
7328whether this scenario ever actually occurred.)
7329* Incremental collection did not cooperate correctly with the PARALLEL_MARK
7330implementation of GC_malloc_many or the local_malloc primitives.  It still
7331doesn't work well, but it shouldn't lose memory anymore.
7332* Integrated some changes from the gcc source tree that I had previously
7333missed (thanks to Bryce McKinlay for the reminder and patch).
7334* Added Makefile.direct as a copy of the default Makefile, which would
7335normally be overwritten if configure is run.
7336* Changed the gc.tar target in Makefile.direct to embed the version number
7337in the gc directory name.  This will affect future tar file distributions.
7338* Changed the Irix dynamic library finding code to no longer try to
7339eliminate writable text segments under Irix6.x, since that is probably no
7340longer necessary, and can apparently be unsafe on occasion (thanks to
7341Shiro Kawai for pointing this out).
7342* GC_cleanup with GC_DEBUG enabled passed a real object base address to
7343GC_debug_register_finalizer_ignore_self, which expected a pointer past the
7344debug header.  Call GC_register_finalizer_ignore_self instead, even with
7345debugging enabled (thanks to Jean-Daniel Fekete for catching this).
7346* The collector didn't build with call chain saving enabled but NARGS=0.
7347* Fixed up the GNU-style build files enough so that they work in some
7348obvious cases (thanks to Maarten Thibaut).
7349* Added initial port to Digital Mars compiler for win32 (thanks to Walter
7350Bright).
7351
7352
7353== [6.0alpha7] 2001-04-19 ==
7354
7355* Added GC_finalizer_notifier.  Fixed GC_finalize_on_demand.  (The variable
7356actually wasn't being tested at the right points.  The build-time flag
7357was.)
7358* Added Tom Tromey's S390 Linux patch.
7359* Added code to push GC_finalize_now in GC_push_finalizer_structures
7360(thanks to Matthew Flatt).
7361* Added GC_push_gc_structures() to push all GC internal roots.
7362* Integrated some FreeBSD changes from Matthew Flatt.
7363* It looks like USRSTACK is not always correctly defined under Solaris.
7364Hacked gcconfig.h to attempt to work around the problem.  The result
7365is not well tested.  (Thanks again to Matthew Flatt for pointing this out.)
7366* Added Ji-Yong Chung's win32 threads and C++ fixes.
7367* Arranged for hpux_test_and_clear.s to no longer be needed or built.
7368It was causing build problems with gas, and it's not clear this is
7369better than the pthreads alternative on this platform.
7370* Some MINGW32 fixes from Hubert Garavel.
7371* Added initial Hitachi SH4 port from Kaz Kojima.
7372* Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
7373* Made include/gc_mark.h more public and separated out the really private
7374pieces.  This is probably still not quite sufficient for clients that
7375want to supply their own kind of type information.  But it's a start.
7376This involved lots of identifier renaming to make it namespace clean.
7377* Added GC_dont_precollect for clients that need complete control over
7378the root set.
7379* GC_is_visible didn't do the right thing with gcj objects.  (Not that
7380many people are likely to care, but ...)
7381* Don't redefine read with GC_USE_LD_WRAP.
7382* Initial port to LINUX/HP_PA.  Incremental collection and threads are not
7383yet supported.  (Incremental collection should work if you have the
7384right kernel.  Threads may work with a sufficiently patched pthread
7385library.)
7386* Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
7387many places (thanks to Benjamin Lerman).
7388* Made win32_threads.c more tolerant of detaching a thread that it didn't
7389know about (thanks to Paul Nash).
7390* Added Makefile.am and configure.in from gcc to the distribution, with
7391minimal changes.  For the moment, those are just placeholders.  In the
7392future, we're planning to switch to a GNU-style build environment for
7393Un*x-like systems, though the old Makefile will remain as a backup.
7394* Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
7395option.
7396* Redistributed some functions between malloc.c and mallocx.c, so that
7397simple statically linked apps no longer pull in mallocx.o.
7398* Changed large object allocation to clear the first and last few words
7399of each block before releasing the lock.  Otherwise the marker could see
7400objects with nonsensical type descriptors.
7401* Fixed a couple of subtle problems that could result in not recognizing
7402interior pointers from the stack.  (I believe these were introduced
7403in 6.0alpha6.)
7404* GC_debug_free_inner called GC_free, which tried to reacquire the
7405allocator lock, and hence deadlocked.  (DBG_HDRS_ALL probably never worked
7406with threads.)
7407* Fixed several problems with back traces.  Accidental references to a free
7408list could cause the free list pointer to be overwritten by a back pointer.
7409There seemed to be some problems with the encoding of root and finalizer
7410references.
7411
7412
7413== [6.0alpha6] ==
7414
7415* Changed the definition of DATASTART on ALPHA and IA64, where data_start
7416and __data_start are not defined by earlier versions of glibc.  This might
7417need to be fixed on other platforms as well.
7418* Changed the way the stack base and backing store base are found on IA64.
7419This should now remain reliable on future kernels.  But since it relies
7420on /proc, it will no longer work in the simulated NUE environment.
7421* Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
7422on the OS.  On non-Unix systems, rand() should be used instead.  Handled
7423small RAND_MAX (thanks to Peter Ross for pointing this out).
7424* Fixed the cord make rules to create the cord subdirectory, if necessary
7425(thanks to Doug Moen).
7426* Changed fo_object_size calculation in finalize.c.  Turned finalization
7427of non-heap object into a no-op.  Removed anachronism from GC_size()
7428implementation.
7429* Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
7430It was missed in a previous renaming (thanks to Vladimir Tsichevski
7431for pointing this out).
7432* Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
7433* Added GC_no_dls hook for applications that want to register their own
7434roots.
7435* Integrated Kjetil Matheussen's Amiga changes.
7436* Added FREEBSD_STACKBOTTOM.  Changed the X86/FreeBSD port to use it
7437(thanks to Matthew Flatt).
7438* Added pthread_detach interception for platforms supported by linux_threads.c
7439and irix_threads.c.
7440* Changed the USE_MMAP code to check for the case in which we got the
7441high end of the address space, i.e. mem_ptr + mem_sz == 0.  It appears
7442that this can happen under Solaris 7.  It seems to be allowed by what
7443I would claim is an oversight in the mmap specification.  (Thanks to
7444Toshio Endo for pointing out the problem.)
7445* Cleanup of linux_threads.c.  Some code was originally cloned from
7446irix_threads.c and now unnecessary.  Some comments were obviously wrong.
7447* (Mostly) fixed a longstanding problem with setting of dirty bits from
7448a signal handler.  In the presence of threads, dirty bits could get lost,
7449since the etting of a bit in the bit vector was not atomic with respect
7450to other updates.  The fix is 100% correct only for platforms for which
7451GC_test_and_set is defined.  The goal is to make that all platforms with
7452thread support.  Matters only if incremental GC and threads are both
7453enabled.
7454* made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
7455initialization time, instead of build-time option.  This is a
7456nontrivial, high risk change.  It should slow down the code measurably
7457only if MERGE_SIZES is not defined, which is a very nonstandard
7458configuration.
7459* Added doc/README.environment, and implemented what it describes.  This
7460allows a number of additional configuration options to be set through
7461the environment.  It documents a few previously undocumented options.
7462* Integrated Eric Benson's leak testing improvements.
7463* Removed the option to throw away the beginning of each page (DISCARD_WORDS).
7464This became less and less useful as processors enforce stricter alignment.
7465And it hadn't been tested in ages, and was thus probably broken anyway.
7466
7467
7468== [6.0alpha5] ==
7469
7470* Changed the definition of GC_pause in linux_threads.c to use a volatile
7471asm.  Some versions of gcc apparently optimize away writes to local volatile
7472variables.  This caused poor locking behavior starting at about
74734 processors.
7474* Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
7475to linux_threads.c.
7476The first two calls could be used to generally avoid sending GC signals to
7477blocked threads, avoiding both premature wakeups and unnecessary overhead.
7478* Fixed a serious bug in thread-local allocation.  At thread termination,
7479GC_free could get called on small integers.  Changed the code for thread
7480termination to more efficiently return left-over free-lists.
7481* Integrated Kjetil Matheussen's BeOS support.
7482* Rearranged the directory structure to create the doc and tests
7483subdirectories.
7484* Sort of integrated Eric Benson's patch for OSF1.  This provided basic
7485OSF1 thread support by suitably extending hpux_irix_threads.c.  Based
7486on earlier email conversations with David Butenhof, I suspect that it
7487will be more reliable in the long run to base this on linux_threads.c
7488instead.  Thus I attempted to patch up linux_threads.c based on Eric's code.
7489The result is almost certainly broken, but hopefully close enough that
7490someone with access to a machine can pick it up.
7491* Integrated lots of minor changes from the NetBSD distribution.  (These
7492were supplied by David Brownlee.  I'm not sure about the original
7493authors.)
7494* Hacked a bit more on the HP/UX thread-support in linux_threads.c.  It
7495now appears to work in the absence of incremental collection.  Renamed
7496hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
7497support HPUX there.
7498* Changed gc.h to define _REENTRANT in cases in which it should already
7499have been defined. It is still safer to also define it on the command
7500line.
7501
7502
7503== [6.0alpha4] ==
7504
7505* Moved up the detection of mostly full blocks to the initiation of the
7506sweep phase.  This eliminates some lock contention in the PARALLEL_MARK case,
7507as multiple threads try to look at mostly full blocks concurrently.
7508* Restored the code in GC_malloc_many that grabs a prefix of the global
7509free list.  This avoids the case in which every GC_malloc_many call
7510tries and fails to allocate a new heap block, and the returns a single
7511object from the global free list.
7512* Some minor fixes in new_hblk.c.  (Attempted to build free lists in order
7513of increasing addresses instead of decreasing addresses for cache performance
7514reasons.  But this seems to be only a very minor gain with -DEAGER_SWEEP,
7515and a loss in other cases.  So the change was backed out.)
7516* Fixed some of the documentation (thanks in large part to Fergus Henderson).
7517* Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
7518large numbers of mmaps (thanks to Eric Benson).  Also fixed that code to
7519deal with short reads.
7520* Added GC_get_total_bytes().
7521* Fixed leak detection mode to avoid spurious messages under linuxthreads.
7522(This should also now be easy for the other supported threads packages.
7523But the code is tricky enough that I'm hesitant to do it without being able
7524to test.  Everything allocated in the GC thread support itself should be
7525explicitly deallocated.)
7526* Made it possible (with luck) to redirect malloc to GC_local_malloc.
7527
7528
7529== [6.0alpha3] 2000-09-26 ==
7530
7531* Fixed the /proc/self/maps code to not seek, since that apparently is not
7532reliable across all interesting kernels.
7533* Fixed some compilation problems in the absence of PARALLEL_MARK
7534(introduced in alpha2).
7535* Fixed an algorithmic problem with PARALLEL_MARK.  If work needs to
7536be given back to the main mark "stack", the BOTTOM entries of the local
7537stack should be given away, not the top ones.  This has substantial
7538performance impact, especially for > 2 processors, from what I can tell.
7539* Extracted gc_lock.h from gc_priv.h.  This should eventually make it a
7540bit easier to avoid including gc_priv.h in clients.
7541* Moved all include files to include/ and removed duplicate links to the
7542same file.  The old scheme was a bad idea because it was too easy to get the
7543copies out of sync, and many systems don't support hard links.
7544Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
7545the process, although I tried to update them appropriately.
7546* Removed the partial support for a copied nursery.  It's not clear that
7547this would be a tremendous win, since we don't consistently lose to
7548generational copying collectors.  And it would significantly complicate
7549many things.  May be reintroduced if/when it really turns out to win.
7550* Removed references to IRIX_JDK_THREADS, since I believe there never
7551were and never will be any clients.
7552* Added some code to linux_threads.c to possibly support HPUX threads
7553using the Linux code.  Unfortunately, it doesn't work yet, and is
7554currently disabled.
7555* Added support under Linux/X86 for saving the call chain, both in (debug)
7556objects for client debugging, and in GC_arrays._last_stack for GC
7557debugging.  This was previously supported only under Solaris.  It is
7558not enabled by default under X86, since it requires that code be compiled
7559to explicitly gave frame pointers on the call stack.  (With gcc this
7560currently happens by default, but is often turned off explicitly.)
7561To turn it on, define SAVE_CALL_CHAIN.
7562
7563
7564== [6.0alpha2] ==
7565
7566* Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
7567for which that's expensive.
7568* Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
7569* Added a missing volatile to OR_WORD and renamed the parameter to
7570GC_compare_and_swap so it's not a C++ reserved word (thanks to
7571Toshio Endo for pointing out both of those).
7572* Changed Linux dynamic library registration code to look at /proc/self/maps
7573instead of the rld data structures when REDIRECT_MALLOC is defined.
7574Otherwise some of the rld data data structures may be prematurely garbage
7575collected.
7576* Fixed USE_LD_WRAP a bit more, so it should now work without threads.
7577* Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
7578Temporarily added some backward compatibility definitions.  Renamed
7579USE_LD_WRAP to GC_USE_LD_WRAP.
7580* Many MACOSX POWERPC changes, some additions to the gctest output, and
7581a few minor generic bug fixes (thanks to Dietmar Planitzer).
7582
7583
7584== [6.0alpha1] ==
7585
7586* Added HP/PA prefetch support.
7587* Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
7588the reliability of generating pointer backtrace information, e.g. in
7589the Bigloo environment.
7590* Added parallel marking support (-DPARALLEL_MARK).  This currently
7591works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
7592to other platforms.  This is intended to be a lighter-weight (less
7593new code, probably not as scalable) solution than the work by Toshio Endo
7594et al, at the University of Tokyo.  A number of their ideas were
7595reused, though the code wasn't, and the underlying data structure
7596is significantly different.  In particular, we keep the global mark
7597stack as a single shared data structure, but most of the work is done
7598on smaller thread-local mark stacks.
7599* Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
7600with -DPARALLEL_MARK.
7601* Added full support for thread local allocation under Linux
7602(-DTHREAD_LOCAL_ALLOC).  This is a thin veneer on GC_malloc_many, and
7603should be easily portable to other platforms, especially those that
7604support pthreads.
7605* CLEAR_DOUBLE was not always getting invoked when it should have been.
7606* GC_gcj_malloc and friends used different out of memory handling than
7607everything else, probably because I forgot about one when I implemented
7608the other.  They now both call GC_oom_fn(), not GC_oom_action().
7609* Integrated Jakub Jelinek's fixes for Linux/SPARC.
7610* Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
7611GC_arrays, and separately registered the first two as excluded roots.
7612This makes code compiled with gc_inl.h less dependent on the
7613collector version.  (It would be nice to remove the inclusion of
7614gc_priv.h by gc_inl.h completely, but we're not there yet.  The
7615locking definitions in gc_priv.h are still referenced.)
7616This change was later conditioned on SEPARATE_GLOBALS, which
7617is not defined by default, since it involves a performance hit.
7618* Register GC_obj_kinds separately as an excluded root region.  The
7619attempt to register it with GC_arrays was usually failing.  (This wasn't
7620serious, but seemed to generate some confusion.)
7621* Moved backptr.h to gc_backptr.h.
7622
7623
7624== [5.4] ==
7625
7626* Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
7627Shawn Wagner for actually testing this).
7628* Fixed GC_is_thread_stack in solaris_threads.c.  It forgot to return a value
7629in the common case.
7630* Fixed another silly syntax problem in GC_double_descr (thanks to
7631Fergus Henderson for finding it).
7632* Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
7633
7634
7635== [5.3] 2000-09-24 ==
7636
7637* Fixed _end declaration for OSF1.
7638* There were lots of spurious leak reports in leak detection mode, caused
7639by the fact that some pages were not being swept, and hence unmarked
7640objects weren't making it onto free lists.  (This bug dated back to 5.0.)
7641* Fixed a typo in the liblinuxgc.so Makefile rule.
7642* Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
7643around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
7644
7645
7646== [5.2] ==
7647
7648* dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
7649was defined as a macro.  This prevented the collector from building on
7650Irix.
7651* We quietly assumed that indirect mark descriptors were never 0.
7652Our own typed allocation interface violated that.  This could result
7653in segmentation faults in the marker with typed allocation.
7654* Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
7655Ben Hutchings for the patch).
7656* Taught the collector about VC++ handling array operator new (thanks to
7657Ben Hutchings for the patch).
7658* The two copies of gc_hdrs.h had diverged.  Made one a link to the other
7659again.
7660
7661
7662== [5.1] ==
7663
7664* Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
7665* Fixed a typo in GC_double_descr in typd_mlc.c.
7666This probably could result in objects described by array descriptors not
7667getting traced correctly (thanks to Ben Hutchings for pointing this out).
7668* The block nearly full tests in reclaim.c were not correct for 64 bit
7669environments.  This could result in unnecessary heap growth under unlikely
7670conditions.
7671
7672
7673== [5.0] ==
7674
7675* Fixed threadlibs.c for linux threads.  -DUSE_LD_WRAP was broken and
7676-ldl was omitted.  Fixed Linux stack finding code to handle
7677-DUSE_LD_WRAP correctly.
7678* Added MSWIN32 exception handler around marker, so that the collector
7679can recover from root segments that are unmapped during the collection.
7680This caused occasional failures under Windows 98, and may also be
7681an issue under Windows NT/2000.
7682
7683
7684== [5.0alpha7] ==
7685
7686* -DREDIRECT_MALLOC was broken in alpha6. Fixed.
7687* Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
7688accept it.
7689* Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
7690linked into every executable.
7691* Added PREFETCH to bitmap marker.  Changed it to use the header cache.
7692* GC_push_marked sometimes pushed one object too many, resulting in a
7693segmentation fault in GC_mark_from_mark_stack.  This was probably an old
7694bug.  It finally showed up in gctest on win32.
7695* Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
7696when SMALL_CONFIG was defined.  This was no doubt a major performance bug for
7697the default win32 configuration.
7698* Removed -DSMALL_CONFIG from NT_MAKEFILE.  It seemed like an anachronism now
7699that the average PC has 64MB or so.
7700* Integrated Bryce McKinlay's patches for linux threads and dynamic loading
7701from the libgcj tree.  Turned on dynamic loading support for Linux/PPC.
7702* Changed the stack finding code to use environ on HP/UX (thanks
7703to Gustavo Rodriguez-Rivera for the suggestion).  This should
7704probably be done on other platforms, too.  Since I can't test those, that'll
7705wait until after 5.0.
7706
7707
7708== [5.0alpha6] ==
7709
7710* GC_malloc_explicitly_typed and friends sometimes failed to
7711initialize first word.
7712* Added allocation routines and support in the marker for mark descriptors
7713in a type structure referenced by the first word of an object.  This was
7714introduced to support gcj, but hopefully in a way that makes it
7715generically useful.
7716* Added GC_requested_heapsize, and inhibited collections in non-incremental
7717mode if the actual used heap size is less than what was explicitly
7718requested.
7719* The Solaris pthreads version of GC_pthread_create didn't handle a NULL
7720attribute pointer.  Solaris thread support used the wrong default thread
7721stack size (thanks to Melissa O'Neill for the patch).
7722* Changed PUSH_CONTENTS macro to no longer modify first parameter.
7723This usually doesn't matter, but it was certainly an accident waiting
7724to happen ...
7725* Added GC_register_finalizer_no_order and friends to gc.h.  They're
7726needed by Java implementations.
7727* Integrated a fix for a win32 deadlock resulting from clock() calling
7728malloc (thanks to Chris Dodd).
7729* Integrated Hiroshi Kawashima's port to Linux/MIPS.  This was designed
7730for a handheld platform, and may or may not be sufficient for other
7731machines.
7732* Fixed a va_arg problem with the %c specifier in cordprnt.c.  It appears
7733that this was always broken, but recent versions of gcc are the first to
7734report the (statically detectable) bug.
7735* Added an attempt at a more general solution to dlopen races/deadlocks.
7736GC_dlopen now temporarily disables collection.  Still not ideal, but ...
7737* Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
7738prefetch instructions.  May improve performance measurably, but I'm not
7739sure the code will run correctly on processors that don't support the
7740instruction.  Won't build except with very recent gcc.
7741* Added caching for header lookups in the marker.  This seems to result
7742in a barely measurable performance gain.  Added support for interleaved
7743lookups of two pointers, but unconfigured that since the performance
7744gain is currently near zero, and it adds to code size.
7745* Changed Linux DATA_START definition to check both data_start and
7746__data_start, since nothing else seems to be portable.
7747* Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
7748wrapping mechanism.  Probably currently useful only on Linux.
7749* Moved some variables for the scratch allocator into GC_arrays (suggested
7750by Martin Hirzel).
7751* Fixed a win32 threads bug that caused the collector to not look for
7752interior pointers from one of the thread stacks without
7753ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
7754* Added Mingw32 support (thanks to Jeff Sturm for the patch).
7755* Changed the alpha port to use the generic register scanning code instead
7756of alpha_mach_dep.s.  Alpha_mach_dep.s doesn't look for pointers in fp
7757registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
7758for helping debug this).  Changed the IA64 code to
7759do something similar for similar reasons.
7760
7761
7762== [5.0alpha4] 1999-10-30 ==
7763
7764* Added protection fault handling patch for Linux/M68K from Fergus
7765Henderson and Roman Hodek.
7766* Removed the tests for SGI_SOURCE in new_gc_alloc.h.  This was causing that
7767interface to fail on non-SGI platforms.
7768* Changed the Linux stack finding code to use /proc, after changing it
7769to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook).
7770* Added HP/UX incremental GC support and HP/UX 11 thread support.
7771Thread support is currently still flaky.
7772* Added basic Linux/IA64 support.
7773* Integrated Anthony Green's PicoJava support.
7774* Integrated Scott Ananian's StrongARM/NetBSD support.
7775* Fixed some fairly serious performance bugs in the incremental
7776collector.  These have probably been there essentially forever.
7777(Mark bits were sometimes set before scanning dirty pages.
7778The reclaim phase unnecessarily dirtied full small object pages.)
7779* Changed the reclaim phase to ignore nearly full pages to avoid
7780touching them.
7781* Limited GC_black_list_spacing to roughly the heap growth increment.
7782* Changed full collection triggering heuristic to decrease full GC
7783frequency by default, but to explicitly trigger full GCs during
7784heap growth.  This doesn't always improve things, but on average it's
7785probably a win.
7786* GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
7787bug report and fix).
7788
7789
7790== [5.0alpha3] 1999-09-15 ==
7791
7792(Also known as 4.15alpha3.)
7793* Added some highly incomplete code to support a copied young generation.
7794Comments on nursery.h are appreciated.
7795* Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
7796so the same effect could be obtained with a runtime switch.   This is
7797a step towards standardizing on a single dynamic GC library.
7798* Significantly changed the way leak detection is handled, as a consequence
7799of the above.
7800
7801
7802== [5.0alpha2] 1999-07-23 ==
7803
7804* Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
7805* Added -DKEEP_BACK_PTRS and backptr.h interface.  (The implementation
7806idea came from Alan Demers.)
7807
7808
7809== [5.0alpha1] 1999-06-30 ==
7810
7811(Also known as 4.15alpha1.)
7812* Reworked large block allocator.  Now uses multiple doubly linked free
7813lists to approximate best fit.
7814* Changed heap expansion heuristic.  Entirely free blocks are no longer
7815counted towards the heap size.  This seems to have a major impact on
7816heap size stability; the old version could expand the heap way too
7817much in the presence of large block fragmentation.
7818* added -DGC_ASSERTIONS and some simple assertions inside the collector.
7819This is mainlyt for collector debugging.
7820* added -DUSE_MUNMAP to allow the heap to shrink.  Supported on only
7821a few UNIX-like platforms for now.
7822* added GC_dump_regions() for debugging of fragmentation issues.
7823* Changed PowerPC pointer alignment under Linux to 4.
7824* Changed the Linux/Alpha port to walk the data segment backwards until
7825it encounters a SIGSEGV.  The old way to find the start of the data
7826segment broke with a recent release.
7827* cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
7828GC_register_finalizer, so that it would continue to work with GC_DEBUG.
7829* allochblk sometimes cleared the wrong block for debugging purposes
7830when it dropped blacklisted blocks.  This could result in spurious
7831error reports with GC_DEBUG.
7832* added MACOS X Server support (thanks to Andrew Stone).
7833* Changed the Solaris threads code to ignore stack limits > 8 MB with
7834a warning.  Empirically, it is not safe to access arbitrary pages
7835in such large stacks.  And the dirty bit implementation does not
7836guarantee that none of them will be accessed.
7837* Integrated Martin Tauchmann's Amiga changes.
7838* Integrated James Dominy's OpenBSD/SPARC port.
7839
7840
7841== [4.14] 1999-04-16 ==
7842
7843* changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
7844
7845
7846== [4.14alpha2] 1999-03-26 ==
7847
7848* -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
7849Recycling the mark stack during expansion could result in a size
7850zero heap segment, which confused things.  (This was probably also an
7851issue with the normal config and huge pages.)
7852* Did more work to make sure that callee-save registers were scanned
7853completely, even with the setjmp-based code.  Added USE_GENERIC_PUSH_REGS
7854macro to facilitate testing on machines I have access to.
7855* Added code to explicitly push register contents for win32 threads.
7856This seems to be necessary.  (Thanks to Pierre de Rop.)
7857
7858
7859== [4.14alpha1] 1999-03-10 ==
7860
7861* Fixed GC_print_source_ptr to not use a prototype.
7862* generalized CYGWIN test.
7863* gc::new did the wrong thing with PointerFreeGC placement (thanks to
7864Rauli Ruohonen).
7865* In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
7866values could fail to be scanned if the register was saved and
7867reused in a GC frame.  This showed up in verbose mode with gctest
7868compiled with an unreleased SGI compiler.  I vaguely recall an old
7869bug report that may have been related.  The bug was probably quite old.
7870(The problem was that the stack scanning could be deferred until
7871after the relevant frame was overwritten, and the new save location
7872might be outside the scanned area.  Fixed by more eager stack scanning.)
7873* PRINT_BLACK_LIST had some problems.  A few source addresses were garbage.
7874* Replaced Makefile.dj and added -I flags to cord make targets (thanks to
7875Gary Leavens).
7876* GC_try_to_collect was broken with the non-incremental collector.
7877* gc_cleanup destructors could pass the wrong address to
7878GC_register_finalizer_ignore_self in the presence of multiple
7879inheritance (thanks to Darrell Schiebel).
7880* Changed PowerPC Linux stack finding code.
7881
7882
7883== [4.13] 1999-02-19 ==
7884
7885* Fixed a crucial bug in the Watcom port.  There was a redundant declaration
7886of GC_push_one in gc_priv.h.
7887* Added FINALIZE_ON_DEMAND.
7888* Fixed some pre-ANSI cc problems in test.c.
7889* Removed getpagesize() use for Solaris.  It seems to be missing in one
7890or two versions.
7891* Fixed bool handling for SPARCCompiler version 4.2.
7892* Fixed some files in include that had gotten unlinked from the main
7893copy.
7894* Some RS/6000 fixes (missing casts).  (Thanks to Toralf Foerster.)
7895* Fixed several problems in GC_debug_realloc, affecting mostly the
7896FIND_LEAK case.
7897* GC_exclude_static_roots contained a buggy unsigned comparison to
7898terminate a loop (thanks to Wilson Ho).
7899* CORD_str failed if the substring occurred at the last possible position.
7900(Only affects cord users.)
7901* Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
7902os_dep.c code for dealing with various Linux versions.
7903* Added workaround for Irix pthreads sigaction bug and possible signal
7904misdirection problems.
7905
7906
7907== [4.13alpha3] 1998-12-08 ==
7908
7909* Fixed MSWIN32 recognition test, which interfered with cygwin.
7910* Removed unnecessary gc_watcom.asm from distribution.  Removed
7911some obsolete README.win32 text.
7912* Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
7913for code for retrieving the fault address in a signal handler).
7914Changed Linux signal handler context argument to be a pointer.
7915* Took care of some new warnings generated by the 7.3 SGI compiler.
7916* Integrated Phillip Musumeci's FreeBSD/ELF fixes.
7917* -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
7918
7919
7920== [4.13alpha2] 1998-08-08 ==
7921
7922* Fixed more Linux threads problems.
7923* Changed default GC_free_space_divisor to 3 with new large block allocation
7924(thanks to Matthew Flatt for some measurements that suggest the old
7925value sometimes favors space too much over time).
7926* More CYGWIN32 fixes.
7927* Integrated Tyson Dowd's Linux-M68K port.
7928* Minor HP PA and DEC UNIX fixes from Fergus Henderson.
7929* Integrated Christoffe Raffali's Linux-SPARC changes.
7930* Allowed for one more GC fixup iteration after a full GC in incremental
7931mode.  Some quick measurements suggested that this significantly
7932reduces pause times even with smaller GC_RATE values.
7933* Moved some more GC data structures into GC_arrays.  This decreases
7934pause times and GC overhead, but makes debugging slightly less convenient.
7935* Fixed namespace pollution problem ("excl_table").
7936* Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
7937that slightly.
7938* Added some win32 threads fixes.
7939* Integrated Ivan Demakov and David Stes' Watcom fixes.
7940* Various other minor fixes contributed by many people.
7941* Renamed config.h to gcconfig.h, since config.h tends to be used for
7942many other things.
7943* Integrated Matthew Flatt's support for 68K MacOS "far globals".
7944* Fixed up some of the dynamic library Makefile targets for consistency
7945across platforms.
7946* Fixed a USE_MMAP typo that caused out-of-memory handling to fail
7947on Solaris.
7948* Added code to test.c to test thread creation a bit more.
7949* Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
7950* Fixed Solaris 2.7 stack base finding problem.  (This may actually
7951have been done in an earlier alpha release.)
7952
7953
7954== [4.13alpha1] 1998-02-17 ==
7955
7956* Changed RS6000 STACKBOTTOM.
7957* Integrated Patrick Beard's Mac changes.
7958* Alpha1 didn't compile on Irix m.n, m < 6.
7959* Replaced Makefile.dj with a new one from Gary Leavens.
7960* Added Andrew Stitcher's changes to support SCO OpenServer.
7961* Added PRINT_BLACK_LIST, to allow debugging of high densities of false
7962pointers.
7963* Added code to debug allocator to keep track of return address
7964in GC_malloc caller, thus giving a bit more context.
7965* Changed default behavior of large block allocator to more
7966aggressively avoid fragmentation.  This is likely to slow down the
7967collector when it succeeds at reducing space cost.
7968* Integrated Fergus Henderson's CYGWIN32 changes.  They are untested,
7969but needed for newer versions.
7970* USE_MMAP had some serious bugs.  This caused the collector to fail
7971consistently on Solaris with -DSMALL_CONFIG.
7972* Added Linux threads support (thanks to Fergus Henderson).
7973
7974
7975== [4.12] 1997-08-26 ==
7976
7977* Fixed ElfW definition in dyn_load.c.
7978This prevented the dynamic library support from compiling on some
7979older ELF Linux systems.
7980* Fixed UTS4 port (which I apparently mangled during the integration).
7981(Thanks to Alistair Crooks.)
7982* "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
7983Fixed in gc_priv.h.
7984* Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
7985The current state of things should suffice for at least some
7986applications.
7987* Changed the out of memory retry count handling.  (This matters only
7988if GC_max_retries > 0, which is no longer the default.)
7989* If a /proc read failed repeatedly, GC_written_pages was not updated
7990correctly (thanks to Peter Chubb for diagnosing this).
7991* Under unlikely circumstances, the allocator could infinite loop in
7992an out of memory situation (thanks to Kenjiro Taura for
7993identifying the problem and supplying a fix).
7994* Fixed a syntactic error in the DJGPP code.  Also fixed a test program
7995problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
7996* Atomic uncollectible objects were not treated correctly by the
7997incremental collector.  This resulted in weird log statistics and
7998occasional performance problems (thanks to Peter Chubb for pointing this out).
7999* Fixed some problems resulting from compilers that don't define
8000__STDC__.  In this case void * and char * were used inconsistently
8001in some cases.  (Void * should not have been used at all.  If
8002you have an ANSI superset compiler that does not define __STDC__,
8003please compile with -D__STDC__=0.  Thanks to Manuel Serrano and others
8004for pointing out the problem.)
8005* Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
8006Also fixed some other IRIX_THREADS problems which may or may not have
8007had observable symptoms.
8008* Fixed an HP PA compilation problem in dyn_load.c (thanks to
8009Philippe Queinnec).
8010* SEGV fault handlers sometimes did not get reset correctly (thanks
8011to David Pickens).
8012* Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
8013This probably needs more work to become functional.
8014* Fixed struct sigcontext_struct in os_dep.c for compilation under
8015Linux 2.1.X (thanks to Fergus Henderson).
8016* Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
8017(by Kristian Kristensen).  These may still not be right, but it is
8018it is likely to work more often than what was there before.  They may
8019even be exactly right.
8020* Added a #include <string.h> to test_cpp.cc.  This appears to help
8021with HP/UX and gcc (thanks to Assar Westerlund).
8022* Version 4.11 failed to run in incremental mode on recent 64-bit Irix
8023kernels.  This was a problem related to page unaligned heap segments.
8024Changed the code to page align heap sections on all platforms.
8025(I had mistakenly identified this as a kernel problem earlier.
8026It was not.)
8027* Version 4.11 did not make allocated storage executable, except on
8028one or two platforms, due to a bug in a #if test (thanks to David Grove
8029for pointing this out).
8030* Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
8031* Added GC_exclude_static_roots.
8032* Fixed the object size mapping algorithm.  This shouldn't matter,
8033but the old code was ugly.
8034* Heap checking code could die if one of the allocated objects was
8035larger than its base address.  (Unsigned underflow problem.  Thanks
8036to Clay Spence for isolating the problem.)
8037* Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
8038to Fred Stearns).
8039* Added Fergus Henderson's patches for improved robustness with large
8040heaps and lots of blacklisting.
8041* Added Peter Chubb's changes to support Solaris Pthreads, to support
8042MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
8043through /proc, to add malloc_typed_ignore_off_page, and a few other
8044minor features and bug fixes.
8045* The Solaris 2 port should not use sbrk.  I received confirmation from
8046Sun that the use of sbrk and malloc in the same program is not
8047supported.  The collector now defines USE_MMAP by default on Solaris.
8048* Replaced the djgpp makefile with Gary Leavens' version.
8049* Fixed MSWIN32 detection test.
8050* Added Fergus Henderson's patches to allow putting the collector into
8051a DLL under GNU win32.
8052* Added Ivan V. Demakov's port to Watcom C on X86.
8053* Added Ian Piumarta's Linux/PowerPC port.
8054* Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
8055Brian Burton).  This is of course unsafe, and may be controversial.
8056On the other hand, it seems to be needed often enough that it's worth
8057adding as a standard facility.
8058* Add Lars Farm's suggestions on building the collector for MacOS.
8059
8060
8061== [4.12alpha2] ==
8062
8063(Changes not specified.)
8064
8065
8066== [4.11] 1996-12-03 ==
8067
8068* Rationalized (hopefully) GC_try_to_collect in an incremental collection
8069environment.  It appeared to not handle a call while a collection was in
8070progress, and was otherwise too conservative.
8071* Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
8072code.
8073* Added Patrick Beard's Mac fixes, with substantial completely untested
8074modifications.
8075* Fixed the MPROTECT_VDB code to deal with large pages and imprecise
8076fault addresses (as on an UltraSPARC running Solaris 2.5).  Note that this
8077was not a problem in the default configuration, which uses PROC_VDB.
8078* The DEC Alpha assembly code needed to restore $gp between calls (thanks to
8079Fergus Henderson for tracking this down and supplying a patch).
8080* The write command for "de" was completely broken for large files.
8081I used the easiest portable fix, which involved changing the semantics
8082so that f.new is written instead of overwriting f.  That's safer anyway.
8083* Added README.solaris2 with a discussion of the possible problems of
8084mixing the collector's sbrk allocation with malloc/realloc.
8085* Changed the data segment starting address for SGI machines.  The
8086old code failed under IRIX6.
8087* Required double word alignment for MIPS.
8088* Various minor fixes to remove warnings.
8089* Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
8090In particular, the collector could try to fork a thread with the
8091world stopped as part of GC_thr_init.  It also failed to deal with
8092the case in which the original thread terminated before the whole
8093process did.
8094* Added -DNO_EXECUTE_PERMISSION.  This has a major performance impact
8095on the incremental collector under Irix, and perhaps under other
8096operating systems.
8097* Added some code to support allocating the heap with mmap.  This may
8098be preferable under some circumstances.
8099* Integrated dynamic library support for HP (thanks to Knut Tvedten).
8100* Integrated James Clark's win32 threads support, and made a number
8101of changes to it (many of which suggested by Pontus Rydin).  This is still
8102not 100% solid.
8103* Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
8104370-class machine.
8105* Fixed a serious bug in explicitly typed allocation.  Objects requiring
8106large descriptors where handled in a way that usually resulted in
8107a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
8108for helping to track this down).
8109* Added partial support for GNU win32 development (thanks to
8110Fergus Henderson).
8111* Added optional support for Java-style finalization semantics (thanks to
8112Patrick Bridges).  This is recommended only for Java implementations.
8113* GC_malloc_uncollectable faulted instead of returning 0 when out of
8114memory (thanks to Daniel R. Grayson for noticing).
8115* Calls to GC_base before the collector was initialized failed on a
8116DEC Alpha (thanks to Matthew Flatt).
8117* Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
8118(thanks to Jeremy Fitzhardinge).
8119* GC_debug_realloc failed for uncollectible objects (thanks to
8120Jeremy Fitzhardinge).
8121* Explicitly typed allocation could crash if it ran out of memory (thanks to
8122Jeremy Fitzhardinge).
8123* Added minimal support for a DEC Alpha running Linux.
8124* Fixed a problem with allocation of objects whose size overflowed
8125ptrdiff_t.  (This now fails unconditionally, as it should.)
8126* Added the beginning of Irix pthread support.
8127* Integrated Xiaokun Zhu's fixes for djgpp 2.01.
8128* Added SGI-style STL allocator support (gc_alloc.h).
8129* Fixed a serious bug in README.solaris2.
8130Multi-threaded programs must include
8131gc.h with SOLARIS_THREADS defined.
8132* Changed GC_free so it actually deallocates uncollectible objects (thanks
8133to Peter Chubb for pointing out the problem).
8134* Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
8135* Changed the Borland cc configuration so that the assembler is not
8136required.
8137* Fixed a bug in the C++ test that caused it to fail in 64-bit
8138environments.
8139
8140
8141== [4.10t3] 1996-11-18 ==
8142
8143Some changes related to threads support.
8144
8145
8146== [4.10] 1996-02-19 ==
8147
8148* Fixed a typo around a call to GC_collect_or_expand in alloc.c.  It broke
8149handling of out of memory.  (Thanks to Patrick C. Beard for noticing.)
8150
8151
8152== [4.9] 1996-02-12 ==
8153
8154* More README.debugging fixes.
8155* Objects ready for finalization, but not finalized in the same GC
8156cycle, could be prematurely collected.  This occasionally happened
8157in test_cpp.
8158* Too little memory was obtained from the system for very large
8159objects.  That could cause a heap explosion if these objects were
8160not contiguous (e.g. under PCR), and too much of them was blacklisted.
8161* Due to an improper initialization, the collector was too hesitant to
8162allocate blacklisted objects immediately after system startup.
8163* Moved GC_arrays from the data into the bss segment by not explicitly
8164initializing it to zero.  This significantly
8165reduces the size of executables, and probably avoids some disk accesses
8166on program startup.  It's conceivable that it might break a port that I
8167didn't test.
8168* Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
8169occurred a while ago.
8170
8171
8172== [4.8] 1995-11-20 ==
8173
8174* Changed a "comment" in a MacOS specific part of mach_dep.c that caused
8175gcc to fail on other platforms.
8176
8177
8178== [4.7] 1995-11-18 ==
8179
8180* Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
8181* Updated some Mac specific files (to synchronize with Patrick C. Beard).
8182* Fixed a serious bug for machines with non-word-aligned pointers.
8183(Thanks to Patrick C. Beard for pointing out the problem.  The collector
8184should fail almost any conceivable test immediately on such machines.)
8185
8186
8187== [4.6] 1995-11-09 ==
8188
8189* Added Linux ELF support (thanks to Arrigo Triulzi).
8190* GC_base crashed if it was called before any other GC_ routines.
8191This could happen if a gc_cleanup object was allocated outside the heap
8192before any heap allocation.
8193* The heap expansion heuristic was not stable if all objects had finalization
8194enabled.  Fixed finalize.c to count memory in finalization queue and
8195avoid explicit deallocation.  Changed alloc.c to also consider this count.
8196(This is still not recommended.  It's expensive if nothing else.  Thanks
8197to John Ellis for pointing this out.)
8198* GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
8199this out).
8200* The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
8201pointing this out).  The current workaround is ugly, but expected to be
8202temporary.
8203* Fixed a formatting problem for SPARC stack traces.
8204* Fixed some '=='s in os_dep.c that should have been assignments.
8205Fortunately these were in code that should never be executed anyway (thanks
8206to Fergus Henderson).
8207* Fixed the heap block allocator to only drop blacklisted blocks in small
8208chunks.  Made BL_LIMIT self adjusting.  (Both of these were in response
8209to heap growth observed by Paul Graham.)
8210* Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
8211Patrick C. Beard).
8212* Significantly updated README.debugging.
8213* Fixed some problems with longjmps out of signal handlers, especially under
8214Solaris.  Added a workaround for the fact that siglongjmp doesn't appear to
8215do the right thing with -lthread under Solaris.
8216* Added MSDOS/djgpp port (thanks to Mitch Harris).
8217* Added "make reserved_namespace" and "make user_namespace".  The
8218first renames ALL "GC_xxx" identifiers as "_GC_xxx".  The second is the
8219inverse transformation.  Note that doing this is guaranteed to break all
8220clients written for the other names.
8221* descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
8222defined should be -ALIGNMENT not WORDS_TO_BYTES(-1).  This is
8223a serious bug on machines with pointer alignment of less than a word.
8224* GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
8225end of the object correctly.  Caused failures of the C++ test on a DEC Alpha
8226with g++.
8227* gc_inl.h still had problems.  Partially fixed.  Added warnings at the
8228beginning to hopefully specify the remaining dangers.
8229* Added DATAEND definition to config.h.
8230* Fixed some of the .h file organization.  Fixed "make floppy".
8231
8232
8233== [4.5] 1995-06-14 ==
8234
8235* Fixed many minor and one major README bugs (thanks to Franklin Chen
8236for pointing out many of them).
8237* Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
8238* Added incremental GC support (MPROTECT_VDB) for Linux (with some
8239help from Bruno Haible).
8240* Altered SPARC recognition tests in gc.h and config.h (mostly as
8241suggested by Fergus Henderson).
8242* Added basic incremental GC support for win32, as implemented by
8243Windows NT and Windows 95.  GC_enable_incremental is a no-op
8244under win32s, which doesn't implement enough of the VM interface.
8245* Added -DLARGE_CONFIG.
8246* Fixed GC_..._ignore_off_page to also function without
8247-DALL_INTERIOR_POINTERS.
8248* (Hopefully) fixed RS/6000 port.  (Only the test was broken.)
8249* Fixed a performance bug in the non-incremental collector running
8250on machines supporting incremental collection with MPROTECT_VDB
8251(e.g. SunOS 4, DEC AXP).  This turned into a correctness bug under
8252win32s with win32 incremental collection.  (Not all memory protection
8253was disabled.)
8254* Fixed some ppcr related bit rot.
8255* Caused dynamic libraries to be unregistered before re-registering.
8256The old way turned out to be a performance bug on some machines.
8257* GC_root_size was not properly maintained under MSWIN32.
8258* Added -DNO_DEBUGGING and GC_dump.
8259* Fixed a couple of bugs arising with SOLARIS_THREADS +
8260REDIRECT_MALLOC.
8261* Added NetBSD/M68K port (thanks to Peter Seebach).
8262* Fixed a serious realloc bug.  For certain object sizes, the collector
8263wouldn't scan the expanded part of the object.  (Thanks to Clay Spence
8264for noticing the problem, and helping me to track it down.)
8265
8266
8267== [4.4] 1995-02-18 ==
8268
8269* ASM_CLEAR_CODE was erroneously defined for HP
8270PA machines, resulting in a compile error.
8271* Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
8272* Gc_cleanup objects didn't work if they were created on
8273the stack.  Fixed.
8274* One copy of Gc_cpp.h in the distribution was out of
8275synch, and failed to document some known compiler
8276problems with explicit destructor invocation.  Partially
8277fixed.  There are probably other compilers on which
8278gc_cleanup is miscompiled.
8279* Fixed Makefile to pass C compiler flags to C++ compiler.
8280* Added Mac fixes.
8281* Fixed os_dep.c to work around what appears to be
8282a new and different VirtualQuery bug under newer
8283versions of win32S.
8284* GC_non_gc_bytes was not correctly maintained by
8285GC_free.  Fixed (thanks to James Clark).
8286* Added GC_set_max_heap_size.
8287* Changed allocation code to ignore blacklisting if it is preventing
8288use of a very large block of memory.  This has the advantage
8289that naive code allocating very large objects is much more
8290likely to work.  The downside is you might no
8291longer find out that such code should really use
8292GC_malloc_ignore_off_page.
8293* Changed GC_printf under win32 to close and reopen the file
8294between calls.  FAT file systems otherwise make the log file
8295useless for debugging.
8296* Added GC_try_to_collect and GC_get_bytes_since_gc.  These
8297allow starting an abortable collection during idle times.
8298This facility does not require special OS support.  (Thanks to
8299Michael Spertus of Geodesic Systems for suggesting this.  It was
8300actually an easy addition.  Kumar Srikantan previously added a similar
8301facility to a now ancient version of the collector.  At the time
8302this was much harder, and the result was less convincing.)
8303* Added some support for the Borland development environment (thanks
8304to John Ellis and Michael Spertus).
8305* Removed a misfeature from checksums.c that caused unexpected
8306heap growth (thanks to Scott Schwartz).
8307* Changed finalize.c to call WARN if it encounters a finalization cycle.
8308WARN is defined in gc_priv.h to write a message, usually to stdout.
8309In many environments, this may be inappropriate.
8310* Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
8311naming convention.
8312* Added GC_set_warn_proc to intercept warnings.
8313* Fixed Amiga port (thanks to Michel Schinz).
8314* Fixed a bug in mark.c that could result in an access to unmapped
8315memory from GC_mark_from_mark_stack on machines with unaligned
8316pointers.
8317* Fixed a win32 specific performance bug that could result in scanning of
8318objects allocated with the system malloc.
8319* Added REDIRECT_MALLOC.
8320
8321
8322== [4.3] 1994-12-23 ==
8323
8324* Fixed SPARC alignment problem with GC_DEBUG.
8325* Fixed Solaris threads /proc workaround.  The real
8326problem was an interaction with mprotect.
8327* Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
8328* Slightly improved allocator space utilization by
8329fixing the GC_size_map mechanism.
8330* Integrated some Sony News and MIPS RISCos 4.51
8331patches (thanks to Nobuyuki Hikichi at Software Research Associates,
8332Inc., Japan).
8333* Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
8334* Added GC_same_obj and friends.  Changed GC_base
8335to return 0 for pointers past the end of large objects.
8336Improved GC_base performance with ALL_INTERIOR_POINTERS
8337on machines with a slow integer mod operation.
8338Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
8339for preprocessor.
8340* changed the default on most UNIX machines to be that
8341signals are not disabled during critical GC operations.
8342This is still ANSI-conforming, though somewhat dangerous
8343in the presence of signal handlers. But the performance
8344cost of the alternative is sometimes problematic.
8345Can be changed back with a minor Makefile edit.
8346* renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
8347following my own naming convention.  Added the function
8348CORD_to_const_char_star.
8349* Fixed a gross bug in GC_finalize.  Symptom: occasional
8350address faults in that function (thanks to Anselm Baird-Smith).
8351* Added port to ICL DRS6000 running DRS/NX.  Restructured
8352things a bit to factor out common code, and remove obsolete
8353code.  Collector should now run under SUNOS5 with either
8354mprotect or /proc dirty bits.  (Thanks to Douglas Steel.)
8355* More bug fixes and workarounds for Solaris 2.X.  (These were
8356mostly related to putting the collector in a dynamic library,
8357which didn't really work before.  Also SOLARIS_THREADS
8358didn't interact well with dl_open.) (Thanks to Brian Lewis.)
8359* Fixed a serious performance bug on the DEC Alpha.  The text
8360segment was getting registered as part of the root set.
8361(Amazingly, the result was still fast enough that the bug
8362was not conspicuous.) The fix works on OSF/1, version 1.3.
8363Hopefully it also works on other versions of OSF/1 ...
8364* Fixed a bug in GC_clear_roots.
8365* Fixed a bug in GC_generic_malloc_words_small that broke
8366gc_inl.h (reported by Antoine de Maricourt).
8367* Fixed some problems with cord/de under Linux.
8368* Fixed some cord problems, notably with CORD_riter4.
8369* Added DG/UX port (thanks to Ben A. Mesander).
8370* Added finalization registration routines with weaker ordering
8371constraints.  (This is necessary for C++ finalization with
8372multiple inheritance, since the compiler often adds self-cycles.)
8373* Filled the holes in the SCO port (thanks to Michael Arnoldus).
8374* Completely rewritten the documentation in the interface gc_c++.h
8375(later renamed gc_cpp.h) making it both clearer and more precise (done by
8376John Ellis).
8377* The definition of accessibility now ignores pointers from a finalizable
8378object (an object with a clean-up function) to itself (done by John Ellis).
8379This allows objects with virtual base classes to be finalizable by the
8380collector.  Compilers typically implement virtual base classes using
8381pointers from an object to itself, which under the old definition of
8382accessibility prevented objects with virtual base classes from ever
8383being collected or finalized.
8384* gc_cleanup now includes gc as a virtual base.  This was enabled by
8385the change in the definition of accessibility (by John Ellis).
8386* Added support for operator new[] (by John Ellis).  Since most compilers
8387don't yet support operator new[], it is conditionalized on
8388-DOPERATOR_NEW_ARRAY.  The code is untested, but its trivial and looks
8389correct.
8390* The test program test_gc_c++ (later renamed test_cpp.cc)
8391tries to test for the C++-specific functionality not tested by the
8392other programs.
8393* Added unistd.h include to misc.c.  (Needed for ppcr.)
8394* Added PowerMac port (thanks to Patrick C. Beard).
8395* Fixed "srcdir"-related Makefile problems.  Changed things so
8396that all externally visible include files always appear in the
8397include subdirectory of the source.  Made gc.h directly
8398includable from C++ code (thanks to Per Bothner).
8399* Changed Intel code to also mark from ebp (thanks to Kevin Warne).
8400* Renamed C++ related files so they could live in a FAT
8401file system (thanks to Charles Fiterman).
8402* Changed Windows NT Makefile to include C++ support in
8403gc.lib.  Added C++ test as Makefile target.
8404
8405
8406== [4.2] 1994-08-03 ==
8407
8408* Multiple bug fixes/workarounds in the Solaris threads version.
8409(It occasionally failed to locate some register contents for
8410marking.  It also turns out that thr_suspend and friends are
8411unreliable in Solaris 2.3.  Dirty bit reads appear
8412to be unreliable under some weird
8413circumstances.  My stack marking code
8414contained a serious performance bug.  The new code is
8415extremely defensive, and has not failed in several CPU
8416hours of testing.  But no guarantees ...)
8417* Added MacOS support.  (Thanks to Patrick C. Beard.
8418David Chase suggested several improvements.)
8419* Fixed several syntactic bugs in gc_c++.h and friends.  (These
8420didn't bother g++, but did bother most other compilers.)
8421Fixed gc_c++.h finalization interface.
8422* 64 bit alignment for allocated objects was not guaranteed in a
8423few cases in which it should have been.
8424* Added GC_malloc_atomic_ignore_off_page.
8425* Added GC_collect_a_little.
8426* Added some prototypes to gc.h.
8427* Some other minor bug fixes (notably in Makefile).
8428* Fixed OS/2 / EMX port (thanks to Ari Huttunen).
8429* Fixed AmigaDOS port (thanks to Michel Schinz).
8430* Fixed the DATASTART definition under Solaris.  There
8431was a 1 in 16K chance of the collector missing the first
843264K of static data (and thus crashing).
8433* Fixed some blatant anachronisms in the README file.
8434* Fixed PCR-Makefile for upcoming PPCR release.
8435
8436
8437== [4.1] 1994-05-20 ==
8438
8439* Changed finalization implementation to guarantee that
8440finalization procedures are called outside of the allocation
8441lock, making direct use of the interface a little less dangerous.
8442MAY BREAK EXISTING CLIENTS that assume finalizers
8443are protected by a lock.  Since there seem to be few multi-threaded
8444clients that use finalization, this is hopefully not much of
8445a problem.
8446* Fixed a gross bug in CORD_prev.
8447* Fixed a bug in blacklst.c that could result in unbounded
8448heap growth during startup on machines that do not clear
8449memory obtained from the OS (e.g. win32S).
8450* Ported de editor to win32/win32S.  (This is now the only
8451version with a mouse-sensitive UI.  Thanks to Rob Haack for the
8452implementation based on the generic Windows application template.)
8453* Added GC_malloc_ignore_off_page to allocate large arrays
8454in the presence of ALL_INTERIOR_POINTERS.
8455* Changed GC_call_with_alloc_lock to not disable signals in
8456the single-threaded case.
8457* Reduced retry count in GC_collect_or_expand for garbage
8458collecting when out of memory.
8459* Made uncollectible allocations bypass black-listing, as they
8460should.
8461* Fixed a bug in typed_test in test.c that could cause (legitimate)
8462GC crashes.
8463* Fixed some potential synchronization problems in finalize.c
8464* Fixed a real locking problem in typd_mlc.c.
8465* Worked around an AIX 3.2 compiler feature that results in
8466out of bounds memory references.
8467* Partially worked around an IRIX5.2 beta problem (which may
8468or may not persist to the final release).
8469* Fixed a bug in the heap integrity checking code that could
8470result in explicitly deallocated objects being identified as
8471smashed.  Fixed a bug in the dbg_mlc stack saving code
8472that caused old argument pointers to be considered live.
8473* Fixed a bug in CORD_ncmp (and hence CORD_str).
8474* Repaired the OS2 port, which had suffered from bit rot
8475in 4.0.  Worked around what appears to be CSet/2 V1.0
8476optimizer bug.
8477* Fixed a Makefile bug for target "c++".
8478
8479
8480== [4.0] 1994-04-07 ==
8481
8482* Added support for Solaris threads (which was possible
8483only by reimplementing some fraction of Solaris threads,
8484since Sun doesn't currently make the thread debugging
8485interface available).
8486* Added non-threads win32 and win32S support.
8487* (Grudgingly, with suitable muttering of obscenities) renamed
8488files so that the collector distribution could live on a FAT
8489file system.  Files that are guaranteed to be useless on
8490a PC still have long names.  Gc_inline.h and gc_private.h
8491still exist, but now just include  gc_inl.h and gc_priv.h.
8492* Fixed a really obscure bug in finalization that could cause
8493undetected mark stack overflows.  (I would be surprised if
8494any real code ever tickled this one.)
8495* Changed finalization code to dynamically resize the hash
8496tables it maintains.  (This probably does not matter for well-
8497-written code.  It no doubt does for C++ code that overuses
8498destructors.)
8499* Added typed allocation primitives.  Rewrote the marker to
8500accommodate them with more reasonable efficiency.  This
8501change should also speed up marking for GC_malloc allocated
8502objects a little.  See gc_typed.h for new primitives.  (Thanks to
8503Zhong Shao performed much of the experimentation that led to the
8504current typed allocation facility.)
8505* Improved debugging facilities slightly.  Allocation time
8506stack traces are now kept by default on SPARC/SUNOS4.  (Thanks to
8507Scott Schwartz.)
8508* Added better support for small heap applications.
8509* Significantly extended cord package.  Fixed a bug in the
8510implementation of lazily read files.  Printf and friends now
8511have cord variants.  Cord traversals are a bit faster.
8512* Made ALL_INTERIOR_POINTERS recognition the default.
8513* Fixed de so that it can run in constant space, independent
8514of file size.  Added simple string searching to cords and de.
8515* Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
8516* Added dynamic library support for OSF/1 (thanks to Alan Dosser and
8517Tim Bingham at DEC).
8518* Changed argument to GC_expand_hp to be expressed
8519in units of bytes instead of heap blocks.  (Necessary
8520since the heap block size now varies depending on
8521configuration.  The old version was never very clean.)
8522* Added GC_get_heap_size().  The previous "equivalent"
8523was broken.
8524* Restructured the Makefile a bit.
8525* Added FreeBSD port (provided by Jeffrey Hsu).
8526
8527
8528== [3.7] 1994-03-15 ==
8529
8530* Added a workaround for an HP/UX compiler bug.
8531* Fixed another stack clearing performance bug.  Reworked
8532that code once more.
8533
8534
8535== [3.6] 1994-01-14 ==
8536
8537* fixed a bug in the mark stack growth code that was introduced
8538in 3.4.
8539* fixed Makefile to work around DEC AXP compiler tail recursion
8540bug.
8541
8542
8543== [3.5] ==
8544
8545* Minor collections now mark from roots only once, if that
8546doesn't cause an excessive pause.
8547* The stack clearing heuristic was refined to prevent anomalies
8548with very heavily recursive programs and sparse stacks.
8549* Fixed a bug that prevented mark stack growth in some cases.
8550GC_objects_are_marked should be set to TRUE after a call
8551to GC_push_roots and as part of GC_push_marked, since
8552both can now set mark bits.  I think this is only a performance
8553bug, but I wouldn't bet on it.  It's certainly very hard to argue
8554that the old version was correct.
8555* Fixed an incremental collection bug that prevented it from
8556working at all when HBLKSIZE != getpagesize()
8557* Changed dynamic_loading.c to include gc_priv.h before testing
8558DYNAMIC_LOADING.  SunOS dynamic library scanning
8559must have been broken in 3.4.
8560* Object size rounding now adapts to program behavior.
8561* Added a workaround (provided by Manuel Serrano and
8562colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
8563that I had incorrectly assumed to have been squished.
8564The collector was broken if the text segment size was within
856532 bytes of a multiple of 8K bytes, and if the beginning of
8566the data segment contained interesting roots.  The workaround
8567assumes a demand-loadable executable.  The original may have
8568have "worked" in some other cases.
8569* Added dynamic library support under IRIX5.
8570* Added support for EMX under OS/2 (thanks to Ari Huttunen).
8571* Added support of Motorola 88K processor running CX/UX (by Brent Benson).
8572
8573
8574== [3.4] ==
8575
8576* Fixed a performance bug in GC_realloc.
8577* Updated the amiga port.
8578* Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
8579* Added cord library.
8580* Added trivial performance enhancement for
8581ALL_INTERIOR_POINTERS (do not scan last word).
8582
8583
8584== [3.3] 1993-10-02 ==
8585
8586* PCR-specific bugs (thanks to Neil Sharman).
8587* Missing locking in GC_free, redundant FASTUNLOCK
8588in GC_malloc_stubborn, and 2 bugs in
8589GC_unregister_disappearing_link (pointed out by Neil Sharman).
8590* Common symbols allocated by the SunOS4.X dynamic loader
8591were not included in the root set.
8592* Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
8593* Merged Amiga port from Jesper Peterson (untested).
8594* Merged NeXT port from Thomas Funke (significantly
8595modified and untested).  (Also thanks to Brian D. Carlstrom for
8596the supplied the NeXT ports.)
8597
8598
8599== [3.2] ==
8600
8601Fixed a serious and not entirely repeatable bug in
8602the incremental collector.  It appeared only when dirty bit info
8603on the roots was available, which is normally only under Solaris.
8604It also added GC_general_register_disappearing_link, and some
8605testing code.  Interface.c disappeared.
8606
8607
8608== [3.1] ==
8609
8610* A workaround for a SunOS 4.X SPARC C compiler
8611misfeature that caused problems when the collector was turned into
8612a dynamic library.
8613* A fix for a bug in GC_base that could result in a memory fault.
8614* A fix for a performance bug (and several other misfeatures) pointed
8615out by Dave Detlefs and Alan Dosser.
8616* Use of dirty bit information for static data under Solaris 2.X.
8617* DEC Alpha/OSF1 support (thanks to Alan Dosser).
8618* Incremental collection on more platforms.
8619* A more refined heap expansion policy.  Less space usage by default.
8620* Various minor enhancements to reduce space usage, and to reduce
8621the amount of memory scanned by the collector.
8622* Uncollectible allocation without per object overhead.
8623* More conscientious handling of out-of-memory conditions.
8624* Fixed a bug in debugging stubborn allocation.
8625* Fixed a bug that resulted in occasional erroneous reporting of smashed
8626objects with debugging allocation.
8627* Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
8628
8629
8630== [3.0] ==
8631
8632Added generational/incremental collection and stubborn objects.
8633
8634
8635== [2.6] 1993-04-27 ==
8636
8637(Changes not specified.)
8638
8639
8640== [2.5] ==
8641
8642* Removed an explicit call to exit(1)
8643* Fixed calls to GC_printf and GC_err_printf, so the correct number of
8644arguments are always supplied.  The OS/2 C compiler gets confused if
8645the number of actuals and the number of formals differ.  (ANSI C
8646doesn't require this to work.  The ANSI sanctioned way of doing things
8647causes too many compatibility problems.)
8648
8649
8650== [2.4] 1993-01-26 ==
8651
8652Added GC_free_space_divisor as a tuning knob, added
8653support for OS/2 and linux, and fixed the following bugs:
8654* On machines with unaligned pointers (e.g. Sun 3), every 128th word could
8655fail to be considered for marking.
8656* Dynamic_load.c erroneously added 4 bytes to the length of the data and
8657bss sections of the dynamic library.  This could result in a bad memory
8658reference if the actual length was a multiple of a page.  (Observed on
8659Sun 3.  Can probably also happen on a Sun 4.)
8660(Thanks to Robert Brazile for pointing out that the Sun 3 version
8661was broken.  Dynamic library handling is still broken on Sun 3s
8662under 4.1.1U1, but apparently not 4.1.1.  If you have such a machine,
8663use -Bstatic.)
8664
8665
8666== [2.3] ==
8667
8668* Added ALL_INTERIOR_POINTERS.
8669* Missing declaration of etext in the A/UX version.
8670* Some PCR root-finding problems.
8671* Blacklisting was not 100% effective, because the plausible future
8672heap bounds were being miscalculated.
8673* GC_realloc didn't handle out-of-memory correctly.
8674* GC_base could return a nonzero value for addresses inside free blocks.
8675* test.c wasn't really thread safe, and could erroneously report failure
8676in a multi-threaded environment.  (The locking primitives need to be
8677replaced for other threads packages.)
8678* GC_CONS was thoroughly broken.
8679* On a SPARC with dynamic linking, signals stayed disabled while the
8680client code was running (thanks to Manuel Serrano).
8681
8682
8683== [2.2] ==
8684
8685* GC_realloc could fail to extend the size of the object for certain large
8686object sizes.
8687* A blatant subscript range error in GC_printf, which unfortunately
8688wasn't exercised on machines with sufficient stack alignment constraints.
8689* GC_register_displacement did the wrong thing if it was called after
8690any allocation had taken place.
8691* The leak finding code would eventually break after 2048 byte
8692byte objects leaked.
8693* interface.c didn't compile.
8694* The heap size remained much too small for large stacks.
8695* The stack clearing code behaved badly for large stacks, and perhaps
8696on HP/PA machines.
8697
8698
8699== [2.1] ==
8700
8701* The first stable version since 1.9.
8702* Added support for PPCR.
8703
8704
8705== [2.0] ==
8706
8707* Introduced a consistent naming convention for collector
8708routines and added support for registering dynamic library data segments
8709in the standard mark_roots.c (original code supporting the SunOS dynamic
8710loader provided by Bill Janssen).  Most of the data structures were revamped.
8711The treatment of interior pointers was completely changed.  Finalization
8712was added.  Support for locking was added.  Object kinds were added.
8713We added a black listing facility to avoid allocating at addresses known
8714to occur as integers somewhere in the address space.  Much of this
8715was accomplished by adapting ideas and code from the PCR collector.
8716The test program was changed and expanded.
8717
8718
8719== [1.9] 1992-01-29 ==
8720
8721* fixed a major bug in gc_realloc.
8722
8723
8724== [1.8] ==
8725
8726* added ULTRIX support in gc_private.h.  (Robert Brazile originally supplied
8727the ULTRIX code.  Alan Dosser and Regis Cridlig subsequently provided updates
8728and information on variation between ULTRIX systems.)
8729
8730
8731== [1.5] ==
8732
8733* ensure 8 byte alignment for objects allocated on a sparc based machine.
8734
8735
8736== [1.4] ==
8737
8738* Does not use compile time determined values
8739for the stack base.  This no longer works on Sun 3s, since Sun 3/80s use
8740a different stack base.  We now use a straightforward heuristic on all
8741machines on which it is known to work (incl. Sun 3s) and compile-time
8742determined values for the rest.  There should really be library calls
8743to determine such values.
8744
8745
8746== [1.3] ==
8747
8748* Fixed spurious
8749assembly language assignments to TMP_SP.  Only the assignment in the PC/RT
8750code is necessary.  On other machines, with certain compiler options,
8751the assignments can lead to an unsaved register being overwritten.
8752Known to cause problems under SunOS 3.5 WITHOUT the -O option.  (With
8753-O the compiler recognizes it as dead code.  It probably shouldn't,
8754but that's another story.)
8755The SPARC-specific code was originally contributed by Mark Weiser.
8756The Encore Multimax modifications were supplied by Kevin Kenny.
8757The adaptation to the IBM PC/RT is largely
8758due to Vernon Lee, on machines made available to Rice by IBM.
8759Much of the HP specific code and a number of good suggestions for improving
8760the generic code are due to Walter Underwood.
8761Parag Patel supplied the A/UX code.
8762Manuel Serrano supplied linux and Sony News specific code.
8763