]> granicus.if.org Git - gc/blob - ChangeLog
Enable CMake-based build for Borland and Watcom compilers
[gc] / ChangeLog
1
2 == [8.1.0] (development) ==
3
4 * Add API for accessing incremental GC time limit with nanosecond precision
5 * Add I_HOLD_LOCK assertion to expand_hp_inner and related functions
6 * Add assertion that GC is initialized to base incremental_protection_needs
7 * Add cordtest, test_cpp, tracetest and disclaim tests (CMake)
8 * Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
9 * Adjust formatting of numbered lists in README.md to match other .md files
10 * Adjust highlighting of API prototypes in gcinterface.md
11 * Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
12 * Adjust printf calls in gctest check_heap_stats so that each has new-line
13 * Allow incremental GC on Cygwin
14 * Allow memory unmapping in case of MPROTECT_VDB
15 * Build gc as a shared library by default (CMake)
16 * Check real-symbols are already initialized in pthread_join/detach
17 * Comments reformatting in mark.c to properly delimit sentences
18 * Compile de test GUI app with resources (CMake)
19 * Define STATIC macro to static by default
20 * Do not build the tests by default (CMake)
21 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
22 * Eliminate 'hash_val value is never used' cppcheck false positive
23 * Eliminate 'stop variable is always 0' compiler warning in print_callers
24 * Eliminate 'struct member os_callback is never used' cppcheck warning
25 * Enable compilation without C runtime (Win32)
26 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
27 * Enable true incremental collection even if parallel marker is on
28 * Generate cordtest and de executable files in GC base folder
29 * Get rid of some non-ELF ifdefs (code refactoring)
30 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
31 * New API function to get size of object debug header
32 * New API standalone functions to acquire and release the allocator lock
33 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
34 * Print pid of child processes if verbose logging (gctest)
35 * Refine flags field comment in pthread_support.h
36 * Reformat gc.man (wrap long lines)
37 * Reformatting and code refactoring of CMake script
38 * Remove 'current users' section from overview.md
39 * Remove 'distributed ports', 'scalable versions' sections from overview.md
40 * Remove Linux-specific commands for building cord/de from Makefile.direct
41 * Remove Win32 main_thread static variable if threads discovery is disabled
42 * Remove dash characters comprising prefix of some verbose logs (gctest)
43 * Remove documentation specific to particular old BDWGC releases
44 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
45 * Remove goto statement in print_callers (code refactoring)
46 * Remove redundant options for building 'cord' in gc.mak
47 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
48 * Remove unused STACK_GRAN macro definitions (code refactoring)
49 * Remove unused sparc_sunos4_mach_dep.s file
50 * Rename cord/cord test executable to de (CMake)
51 * Replace "msecs" with "ms" in all comments and messages
52 * Replace 'stack base' with 'stack bottom' in the documentation
53 * Report time with a nanosecond precision where available
54 * Simplify logged message in scratch_recycle
55 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
56 * Support header files installation (CMake)
57 * Support most configure options in CMake script
58 * Turn off C++ API by default, export it in gccpp library (CMake)
59 * Update libgc.so version info to differentiate against v8.0.x
60 * Update the ASCII diagrams describing the tree structure for pointer lookups
61 * Update the documentation to match the current GC implementation
62 * Upgrade cmake_minimum_required(version) to 3.1
63 * Use KB/MB/GB abbreviations uniformly across entire documentation
64 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
65 * Use better precision Windows timers
66 * Workaround '*_stubborn function is never used' cppcheck warnings
67 * Workaround 'GC_get_thr_restart_signal is never used' cppcheck warning
68 * Workaround '__data_start<_etext is always false' cppcheck false positive
69 * Workaround 'argument dummy to GC_noop1 is always 1' cppcheck false positive
70 * Workaround 'checking if unsigned expression < 0' cppcheck warnings
71 * Workaround 'duplicate expression for condition and assignment' cppcheck FP
72 * Workaround 'identical inner return condition always true' cppcheck warning
73 * Workaround 'if condition is the same as the previous one' cppcheck warnings
74 * Workaround 'me assigned value never used' cppcheck FP in register_my_thread
75 * Workaround 'name var reassign before old value use' cppcheck false positive
76 * Workaround 'nl-result_buf is out of bounds' cppcheck false positive
77 * Workaround 'uninitialized variable: info' cppcheck false positive (OS X)
78 * Workaround 'var reassigned before old value use' cppcheck false positive
79
80
81 == [8.0.6] (not released yet) ==
82
83 * Add support of OpenBSD/aarch64
84 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
85 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
86 * Do not use Manual VDB mode if C malloc is redirected
87 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
88 * Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
89 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
90 * Enable sbrk-to-mmap fallback on major supported Unix-like platforms
91 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
92 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
93 * Fix 'external linkage required for var because of dllimport' error on MinGW
94 * Fix 'ulong undefined' compilation error on AIX
95 * Fix MPROTECT_VDB definition for single-threaded GC builds
96 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
97 * Fix build for OS X (CMake)
98 * Fix building of shared library with C++ support on MinGW
99 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
100 * Fix configure message about 'AIX gcc optimization fix'
101 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
102 * Fix incorrect markup formatting in documentation
103 * Fix mmap(PROT_NONE) failure on AIX
104 * Fix printf format specifier in simple_example.md
105 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
106 * Fix various typos mostly in documentation files
107 * Fix word size, data start and alignment for OpenBSD/mips64(el)
108 * Refine GC_INIT documentation about its multiple invocation
109 * Refine GC_parallel documentation in gc.h
110 * Refine do_blocking() documentation in gc.h
111 * Remove a misleading comment about Solaris in gc.h
112 * Remove gcmt-lib generation by CMake
113 * Support MSYS builds by CMake and configure
114 * Update documentation about the incremental collector support
115 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
116
117
118 == [8.0.4] 2019-03-02 ==
119
120 * Avoid a full GC when growing finalizer tables if in incremental mode
121 * Avoid potential race in hb_sz access between realloc and reclaim_block
122 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
123 * Avoid unexpected heap growth in gctest caused by GC_disable
124 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
125 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
126 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
127 * Fix 'unexpected mark stack overflow' abort in push_all_stack
128 * Fix 'wrong __data_start/_end pair' error on Android
129 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
130 * Fix GetThreadContext stale register values use if WoW64 (Win32)
131 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
132 * Fix thread_info() count argument value (OS X)
133 * Support de_win.c compilation by Makefile.direct (cord/de)
134
135
136 == [8.0.2] 2018-12-23 ==
137
138 * Abort with appropriate message if executable pages cannot be allocated
139 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
140 * Add paths to filenames mentioned in the copyright section in README
141 * Add test using disclaim notifiers to implement a weak map
142 * Adjust #error messages format
143 * Allow to force executable pages allocation in gctest
144 * Avoid potential 'macro redefinition' errors for config.h macros
145 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
146 * Check result of pthread_mutex_unlock in specific.c
147 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
148 * Default to non-executable memory allocation across all make scripts
149 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
150 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
151 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
152 * Do not use spin locks if AO test-and-set is emulated (pthreads)
153 * Document HANDLE_FORK macro optional usage in Makefile.direct
154 * Document assertion in the setters that used to return old value
155 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
156 * Eliminate 'casting signed to bigger unsigned int' CSA warning
157 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
158 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
159 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
160 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
161 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
162 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
163 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
164 * Eliminate redundant check in backwards_height
165 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
166 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
167 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
168 * Fix 'too wide non-owner permissions are set for resource' code defect
169 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
170 * Fix GC_register_disclaim_proc for leak-finding mode
171 * Fix a deadlock in write_fault_handler if AO_or is emulated
172 * Fix comment typo in CMakeLists.txt
173 * Fix concurrent bitmap update in GC_dirty
174 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
175 * Fix executable memory allocation in GC_unix_get_mem
176 * Fix hbp overflow in GC_install_counts
177 * Fix linkage with a system libatomic_ops shared library
178 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
179 * Fix marking of finalizer closure object
180 * Fix marks and hb_n_marks consistency when disclaim returns true
181 * Fix memory allocation on GCF (Linux/x64)
182 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
183 * Fix test_cpp assertion violation in find-leak mode
184 * Fix tests linkage with internal atomic_ops.o
185 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
186 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
187 * New macro to suppress printing of leaked objects
188 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
189 * Prefix internal durango_get_mem symbol with 'GC_'
190 * Prevent double inclusion of javaxfc.h and private/specific.h
191 * Print relevant message in tests not appropriate for leak detection mode
192 * Reduce scope of local variables in GC_remove_all_threads_but_me
193 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
194 * Refine documentation in gc_disclaim.h
195 * Remove extra USE_MMAP definition for Interix
196 * Remove redundant header double-inclusion checks in the private headers
197 * Remove strlen calls with a constant string argument in msvc_dbg
198 * Specify register_disclaim_proc and finalized_malloc argument as non-null
199 * Support UWP/arm64 target
200 * Test marking of finalizer closure object in disclaim_test
201 * Turn off leak detection mode explicitly in cord/de
202 * Turn off parallel marker, thread-local allocation if used AO ops emulated
203 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
204 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
205 * Update NO_EXECUTE_PERMISSION documentation
206 * Update documentation about arm64 ABI in gcconfig.h
207 * Use AO_or in async_set_pht_entry_from_index if available
208 * Use GC_WORD_MAX macro across all C source files
209 * Use macro to operate on a flag residing in GC_stop_count
210 * Use standalone private macro to guard against ptr_t redefinition
211 * Workaround '#error' cppcheck messages in backgraph and private headers
212 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
213 * Workaround 'GC_dump function is never used' cppcheck warning
214 * Workaround 'local address assignment to a global variable' CSA warning
215 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
216 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
217 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
218 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
219 * Workaround 'potential non-terminated string' false positive in cordbscs
220 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
221 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
222
223
224 == [8.0.0] 2018-09-05 ==
225
226 * Accept Android platform by both CMake and configure
227 * Access finalize_now atomically to avoid TSan warning without no-sanitize
228 * Acknowledge thread restart from suspend_handler (NetBSD)
229 * Add a sanity check that load_acquire and store_release are available
230 * Add AO primitives implementation to GC based on C11 atomic intrinsic
231 * Add assertion for suspend_ack_sem in start_world
232 * Add assertion to allocobj that live unmarked object cannot be reclaimed
233 * Add assertions about held lock when accessing all_bottom_indices
234 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
235 * Add assertions to finalize and threads support for MANUAL_VDB needs
236 * Add basic calculation of the total full-collection time
237 * Add check that gc_cpp operator delete is called (test_cpp)
238 * Add debug logging to new_thread about GC_threads hash table collisions
239 * Add GC prefix to _MSVC_DBG_H macro
240 * Add initial RISC-V support
241 * Add Makefile target to run all tests without test-driver
242 * Add test_atomic_ops to perform minimal testing of used atomic primitives
243 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
244 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
245 * Allocate non-executable memory by default (CMake)
246 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
247 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
248 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
249 * Allow disabling of dynamic loading in CMake script and configure
250 * Allow disabling of main static data registration in CMake and configure
251 * Allow disabling of threads discovery in CMake script and configure
252 * Allow gc_assertions enabling in CMake script
253 * Allow gc_debug, redirect_malloc, large_config options in CMake script
254 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
255 * Allow mmap enabling in CMake script and configure
256 * Allow passing -D DEFAULT_VDB to CFLAGS
257 * Allow subthreadcreate_test to be compiled with zero NTHREADS
258 * Allow to turn on spin locking even if thread-local allocations are used
259 * Always include gc_atomic_ops.h unless threads are disabled
260 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
261 * Avoid duplication of code handling pthreads case in configure
262 * Avoid potential data race during apply_to_each_object(reset_back_edge)
263 * Avoid potential data race during GC_dump execution
264 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
265 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
266 * Avoid potential race in print_static_roots called by dyld_image_add/remove
267 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
268 * Avoid potential race when accessing size_map table
269 * Avoid potential race when storing oh_back_ptr during parallel marking
270 * Avoid SIGSEGV during GC_INIT on some Android devices
271 * Build only shared libraries by default (configure)
272 * Change pointer arguments of push_all[_eager]/conditional API to void* type
273 * Change type of hb_sz field (of hblkhdr) from size_t to word
274 * Check consistency of descr, adjust, clear arguments of GC_new_kind
275 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
276 * Check thread_local is initialized before accessing thread_key
277 * Collapse multiple BCOPY_EXISTS macro definitions
278 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
279 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
280 * Compile checksums.c only if --enable-checksums is given (configure)
281 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
282 * Convert .html files to Markdown format
283 * Convert code of .c files to valid C++ code
284 * Decide between memory unmapping and mprotect-based dirty bits at runtime
285 * Declare t local variable in the block where the variable is used
286 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
287 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
288 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
289 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
290 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
291 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
292 * Define macro to specify the environment file name extension (Win32/WinCE)
293 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
294 * Detect sigsetjmp() availability by configure
295 * Determine whether to use compiler TLS for kFreeBSD at compile time
296 * Do not call BCOPY and BZERO if size is zero
297 * Do not call sem_getvalue in stop_world if one thread exists
298 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
299 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
300 * Do not declare dl_iterate_phdr as weak for kFreeBSD
301 * Do not include windows.h when compiling gc_cpp.cc
302 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
303 * Do not merge dynamic root with the existing static one in add_roots_inner
304 * Do not print n_rescuing_pages value if incremental collections disabled
305 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
306 * Do not rebuild_root_index unless remove_root_at_pos is called
307 * Do not specify version info for test libraries (Automake)
308 * Do not use alternate thread library on Solaris
309 * Do not use asm in GC_pause
310 * Do not use PKG_CHECK_MODULES in configure
311 * Do not use system clock consistently if NO_CLOCK
312 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
313 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
314 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
315 * Eliminate 'comparison is always false' code defect in get_maps
316 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
317 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
318 * Enable alternative finalization interface (DISCLAIM) in all makefiles
319 * Enable compilation for Cygwin with MPROTECT_VDB
320 * Enable handle-fork and memory unmapping by default
321 * Enable mprotect-based incremental GC for Win64 (GCC)
322 * Expose API to control rate and max prior attempts of collect_a_little
323 * Expose API to control the minimum bytes allocated before a GC occurs
324 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
325 * Fix 'doc' files installation folder
326 * Fix build of cord tests as C++ files (Makefile.direct)
327 * Fix comment typos in backgraph.c, de.c, gcconfig.h
328 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
329 * Fix start_world not resuming all threads on Darwin
330 * Fix test_cpp failure in case GC_DEBUG is defined
331 * Group common defines for POSIX platforms in configure and CMake scripts
332 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
333 * Handle pthread restart signals loss if retry_signals
334 * Hide value stored to thread-specific entries for a test purpose
335 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
336 * Implement memory unmapping for Sony PS/3
337 * Imply configure --single-obj-compilation if --disable-static
338 * Include malloc.c in extra/gc.c after include gc_inline.h
339 * Increase MAX_HEAP_SECTS (10 times) for large-config
340 * Initial single-threaded support of Interix subsystem
341 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
342 * Initial support of TIZEN platform
343 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
344 * Make extend_size_map() static (code refactoring)
345 * Make subthreadcreate test compilable even without libatomic_ops
346 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
347 * Move de_win compiled resource files to cord/tests
348 * Move pcr_interface.c, real_malloc.c to 'extra' folder
349 * New API function (GC_dump_named) to produce named dumps
350 * New API function (GC_is_incremental_mode)
351 * New API function (get_expl_freed_bytes_since_gc)
352 * New API function (get_size_map_at) to get content of size_map table
353 * New API to stop and start the GC world externally
354 * New API to turn on manual VDB at runtime
355 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
356 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
357 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
358 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
359 * Print time passed since GC initialization in GC_dump
360 * Public API (GC_deinit) to allow Win32 critical sections deletion
361 * Reduce probability of collision in threads hashtable for 64-bit targets
362 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
363 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
364 * Reformat code and comments in gc_allocator.h
365 * Remove 'dist' target from Makefile.direct
366 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
367 * Remove Android-specific code in gcconfig.h for M68K
368 * Remove C++ WeakPointer and CleanUp API which lacks implementation
369 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
370 * Remove done_init static variable from fnlz_mlc.c
371 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
372 * Remove duplicated sample code in leak.md
373 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
374 * Remove GC code fragment (which already merged) from README.Mac
375 * Remove GC_GNU_THREADS macro (HURD)
376 * Remove GENERAL_MALLOC internal macro
377 * Remove HIGH_BIT macro duplicating SIGNB
378 * Remove lint-specific code
379 * Remove Makefile KandRtest target (that supported K&R C compiler)
380 * Remove MIN_WORDS macro from gc_priv.h
381 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
382 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
383 * Remove notes that K&R C compiler is unsupported
384 * Remove PUSH_CONTENTS_HDR multi-line macro
385 * Remove redundant check that clear_fl_marks argument is non-null
386 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
387 * Remove stubborn objects allocation code completely, remove stubborn.c
388 * Remove unnecessary argument casts in add_roots_inner calls
389 * Remove unnecessary type casts in n_set_marks
390 * Remove unused USE_GENERIC macro definition and description
391 * Remove version info in 'de' cord test application
392 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
393 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
394 * Replace some FIXME items with TODO ones
395 * Run command passed to if_not_there directly from Makefile.direct
396 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
397 * Skip grungy_pages update when mark state invalid to speedup read_dirty
398 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
399 * Support configure --disable-thread-local-alloc option (similar for CMake)
400 * Support enable_checksums option in CMake script
401 * Support Haiku multi-threaded build by CMake
402 * Support threads for DragonFly in configure
403 * Turn on 'atomic uncollectable' functionality by default (CMake)
404 * Turn on GC assertions in NT_MAKEFILE for debug builds
405 * Turn on gcj, disclaim and java finalization by default (CMake)
406 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
407 * Turn on incremental mode in cordtest and cord/de
408 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
409 * Turn on parallel marker by default for all multi-threaded builds
410 * Update GC compilation and usage notes for Win32
411 * Update shared libraries version info to differentiate against v7.6
412 * Update top_index entry pointer only when the entry is constructed fully
413 * Use __builtin_expect in SIZET_SAT_ADD macro
414 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
415 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
416 * Use __thread keyword for Android NDK r12b+ Clang (arm)
417 * Use atomic allocation for leafs in reverse_test (gctest)
418 * Use atomic load/store for the concurrently accessed variables in GC_lock
419 * Use C11 static_assert if available
420 * Use compiler atomic intrinsics by default if available (configure)
421 * Use EXPECT FALSE for mark_from code documented as executed rarely
422 * Use heap-allocated memory for local mark stack of non-marker thread
423 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
424 * Use include gc.h with the angle brackets in the man page synopsis
425 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
426 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
427 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
428 * Use same macro (NTHREADS) across all tests to specify number of threads
429 * Use sigsetjmp() in setjmp_t tool if available
430 * Use thread-local allocations for all multi-threaded builds
431 * Use THREAD_EQUAL consistently to compare pthread_t values
432 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
433 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
434 * Workaround Thread Sanitizer (TSan) false positive warnings
435
436
437 == [7.6.14] (not released yet) ==
438
439 * Add support of OpenBSD/aarch64
440 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
441 * Eliminate 'unused function GC_add_map_entry' compiler warning
442 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
443 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
444 * Fix 'ulong undefined' compilation error on AIX
445 * Fix MPROTECT_VDB definition for single-threaded GC builds
446 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
447 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
448 * Fix configure message about 'AIX gcc optimization fix'
449 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
450 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
451 * Fix printf format specifier in simple_example.html
452 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
453 * Fix various typos mostly in documentation files
454 * Fix word size, data start and alignment for OpenBSD/mips64(el)
455 * Remove a misleading comment about Solaris in gc.h
456 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
457
458
459 == [7.6.12] 2019-03-01 ==
460
461 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
462 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
463 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
464 * Fix 'unexpected mark stack overflow' abort in push_all_stack
465 * Fix 'wrong __data_start/_end pair' error on Android
466 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
467 * Fix GetThreadContext stale register values use if WoW64 (Win32)
468 * Fix executable memory allocation in GC_unix_get_mem
469 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
470 * Fix thread_info() count argument value (OS X)
471 * Update NO_EXECUTE_PERMISSION documentation
472
473
474 == [7.6.10] 2018-12-13 ==
475
476 * Add paths to filenames mentioned in the copyright section in README
477 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
478 * Eliminate 'casting signed to bigger unsigned int' CSA warning
479 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
480 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
481 * Fix 'too wide non-owner permissions are set for resource' code defect
482 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
483 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
484 * Fix GC_register_disclaim_proc for leak-finding mode
485 * Fix a deadlock in write_fault_handler if AO_or is emulated
486 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
487 * Fix concurrent bitmap update in GC_dirty
488 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
489 * Fix hbp overflow in GC_install_counts
490 * Fix linkage with a system libatomic_ops shared library
491 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
492 * Fix marking of finalizer closure object
493 * Fix marks and hb_n_marks consistency when disclaim returns true
494 * Fix memory allocation on GCF (Linux/x64)
495 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
496 * Fix start_world not resuming all threads on Darwin
497 * Fix test_cpp assertion violation in find-leak mode
498 * Fix tests linkage with internal atomic_ops.o
499 * Fix unneeded end_stubborn_change in disclaim_test
500 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
501 * New macro to suppress printing of leaked objects
502 * Prevent double inclusion of javaxfc.h and private/specific.h
503 * Reduce scope of local variables in GC_remove_all_threads_but_me
504 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
505 * Refine documentation in gc_disclaim.h
506 * Test marking of finalizer closure object in disclaim_test
507 * Update documentation about arm64 ABI in gcconfig.h
508 * Use AO_or in async_set_pht_entry_from_index if available
509 * Use include gc.h with the angle brackets in the man page synopsis
510
511
512 == [7.6.8] 2018-08-12 ==
513
514 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
515 * Add NetBSD/aarch64 and initial RISC-V support
516 * Adjust formatting of configure help messages and config.h comments
517 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
518 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
519 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
520 * Do not call GC_dirty_inner unless GC_incremental
521 * Do not use NULL in gc_inline.h
522 * Eliminate 'cast between incompatible function types' compiler warning
523 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
524 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
525 * Eliminate 'declaration of var hides global declaration' compiler warning
526 * Eliminate 'language extension used' Clang warning in gc.h
527 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
528 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
529 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
530 * Eliminate 'switch statement contains no case label' compiler warning
531 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
532 * Eliminate duplicate clear_mark_bit call when removing disappearing link
533 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
534 * Fix 'collecting from unknown thread' abort in leak-finding mode
535 * Fix 'pointer arithmetic with NULL' code defect in print_callers
536 * Fix Borland version in documentation to match that in BCC_MAKEFILE
537 * Fix comment about inv_sz computation in setup_header
538 * Fix comments style in configure.ac and Makefile.am
539 * Fix compilation by digimars.mak (DMC)
540 * Fix compilation by WCC makefile
541 * Fix compilation of darwin_stop_world for iOS 8+
542 * Fix cords for MANUAL_VDB
543 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
544 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
545 * Fix gctest in leak-finding mode
546 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
547 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
548 * Fix mark stack overflow checking in push_selected
549 * Fix missing GC_dirty calls for GC-allocated objects used internally
550 * Fix missing GC_dirty invocation from debug_end_stubborn_change
551 * Fix MSWIN32 macro redefinition (WCC)
552 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
553 * Fix new and delete operators definition for DigitalMars compiler
554 * Fix NT_MAKEFILE for VS 2017
555 * Fix potential null dereference in GC_CONS
556 * Fix register_dynamic_libraries on Windows 10
557 * Fix result computation in n_set_marks
558 * Fix return type in GC_set_warn_proc API documentation
559 * Fix tests for GC compiled with MANUAL_VDB
560 * Fix the build for Emscripten
561 * Fix typo in comment for CORD_ec_flush_buf prototype
562 * Fix typos in ChangeLog and generic_malloc
563 * Fix UNTESTED for multi-threaded API functions in gctest
564 * Fix VirtualQuery call in case of malloc failure (Win32)
565 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
566 * Keep pointer to the start of previous entry in remove_specific_after_fork
567 * Move de_win compiled resource files to cord/tests
568 * Never return null by C++ GC allocators and gc_cpp operator new
569 * Perform thread_suspend in loop as it may be interrupted (Darwin)
570 * Really abort if failed to read /proc for library registration (Linux)
571 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
572 * Remove duplicate local variable in reclaim_block
573 * Remove information how to send bugs from README.cords file
574 * Remove libatomic_ops license information
575 * Remove unused USE_GENERIC macro definition and description
576 * Suppress 'functions containing switch are not expanded inline' bcc warning
577 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
578 * Turn on incremental collection in gctest also if MANUAL_VDB
579 * Update copyright information in alloc.c, gc.c/h and the documentation
580 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
581 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
582 * Workaround 'class C does not have a copy constructor' cppcheck warning
583 * Workaround 'function nested_sp is never used' cppcheck style warning
584 * Workaround 'opposite expression on both sides of &' cppcheck style warning
585 * Workaround 'template-id not supported in this context' compiler error (WCC)
586
587
588 == [7.6.6] 2018-04-20 ==
589
590 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
591 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
592 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
593 * Explicitly unblock GC signals on GC initialization
594 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
595 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
596 * Fix arguments delimiter in pcr_interface.c (PCR)
597 * Fix assertion violation in DllMain of win32_threads
598 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
599 * Fix data race during apply_to_each_object(reset_back_edge)
600 * Fix dbg_mlc.c/o file name in documentation
601 * Fix gctest with musl libc on s390x
602 * Fix include gc_gcj.h in thread_local_alloc.c
603 * Fix man section number (3)
604 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
605 * Fix missing new-line in ABORT_ARG<n> definition
606 * Fix missing SIGBUS handler setup for kFreeBSD
607 * Fix null dereference in print_callers on backtrace_symbols failure
608 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
609 * Fix the collector hang when it is configured with --enable-gc-debug
610 * Fix thread_suspend fail for threads registered from key destructor (OS X)
611 * Fix type of local variables receiving result of PHT_HASH
612 * Fix typo in AIX macro name
613 * Fix typo in comment in specific.h
614 * Fix unbounded heap growth in case of intensive disappearing links usage
615 * Remove API symbols renaming in WCC_MAKEFILE
616 * Support Haiku/amd64 and Haiku/x86 hosts
617 * Support threads for DragonFly in configure
618 * Workaround 'address of auto-variable returned' cppcheck error
619 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
620
621
622 == [7.6.4] 2018-01-26 ==
623
624 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
625 * Change compiler invocation example in gc.man to use dynamic libgc
626 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
627 * Do not declare dl_iterate_phdr as weak for DragonFly
628 * Fix 'cords' parallel build in Makefile.direct
629 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
630 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
631 * Fix GC allocation mutex in child after a fork
632 * Fix global operator delete definition for C++14 in gc_cpp
633 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
634 * Fix libgc version which was changed in linkage breaking way
635 * Fix missing EOLn output in threadlibs tool
636 * Fix threadlibs tool to output '-lpthread' for DragonFly
637 * Prevent DATASTART redefinition for NaCl
638 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
639
640
641 == [7.6.2] 2017-12-23 ==
642
643 * Add assertion that no hb_n_marks underflow occurs
644 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
645 * Add minimal testing of GC_set_bit (gctest)
646 * Add more cases to huge_test to cover sizes close to word-type maximum
647 * Add testing of new[]/delete[] (test_cpp)
648 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
649 * Adjust code indentation of calloc_explicitly_typed
650 * Align local_mark_stack in help_marker explicitly
651 * Allow custom TRACE_ENTRIES value
652 * Allow gctest and thread_leak_test with zero NTHREADS
653 * Avoid data race in finalized_count (gctest)
654 * Code refactoring of divide-by-HBLKSIZE occurrences
655 * Code refactoring of huge_test
656 * Code refactoring of tests/subthread_create regarding AO add primitive
657 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
658 * Delete preprocessor output on make clean (Makefile.direct)
659 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
660 * Do not disable parallel mark for WRAP_MARK_SOME
661 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
662 * Do not install documentation if configure --disable-docs (new option)
663 * Do not use tkill (Android)
664 * Document base and size of objects allocated by finalized_malloc
665 * Document configure 'syntax error' issue in README
666 * Eliminate 'address of local variable returned' static analyzer warning
667 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
668 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
669 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
670 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
671 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
672 * Eliminate 'class member var with name also defined in parent' warning
673 * Eliminate 'comparison is always false' static analyzer warning in finalize
674 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
675 * Eliminate 'condition is always true' cppcheck style warning
676 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
677 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
678 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
679 * Eliminate 'function result not used' code defect in GC_mark_local
680 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
681 * Eliminate 'GC_record_fault is never used' cppcheck style warning
682 * Eliminate 'integer shift by a negative amount' code defect in finalize
683 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
684 * Eliminate 'memory leak' code defect for scratch-allocated memory
685 * Eliminate 'memory leak' code defect in remove_specific
686 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
687 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
688 * Eliminate 'possible integer underflow' code defect (cord-de)
689 * Eliminate 'potential overflow' static analyzer warning in test
690 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
691 * Eliminate 'scope of variable can be reduced' cppcheck warnings
692 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
693 * Eliminate 'this statement may fall through' GCC warnings
694 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
695 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
696 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
697 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
698 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
699 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
700 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
701 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
702 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
703 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
704 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
705 * Eliminate 'write to memory that was const-qualified' code analyzer warning
706 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
707 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
708 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
709 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
710 * Eliminate CSA warning of staticroot that can be a local variable (tests)
711 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
712 * Eliminate redundant local variable in register_finalizer
713 * Eliminate TSan (Thread Sanitizer) warnings in gctest
714 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
715 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
716 * Eliminate unsigned fl_builder_count underflow in mark_thread
717 * Enable GC_is_tmp_root for all platforms
718 * Execute more single-threaded GC tests by CMake
719 * Expand tabs to spaces in de_win.rc (tests)
720 * Export GC_dump_finalization/regions()
721 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
722 * Export GC_print_free_list()
723 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
724 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
725 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
726 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
727 * Fix 'syntax error' reported by cppcheck for mach_dep
728 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
729 * Fix 'variable assigned a value that is never used' cppcheck style warnings
730 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
731 * Fix assertion violation about disabled cancel in try_to_collect_inner
732 * Fix atomic_ops build in Makefile.direct for Solaris
733 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
734 * Fix compilation error in get_main_stack_base (Emscripten)
735 * Fix compilation for winpthreads if HANDLE_FORK
736 * Fix compilation if configured with --enable-werror on OS X
737 * Fix cord/de build in Makefile.direct (Linux)
738 * Fix data race in a list referenced by A.aa (gctest)
739 * Fix data race in collectable_count (gctest)
740 * Fix data race in do_local_mark when comparing active_count to helper_count
741 * Fix data race in GC_suspend/resume_thread
742 * Fix data race in last_stop_count access (suspend_handler_inner)
743 * Fix data race in make_descriptor when setting explicit_typing_initialized
744 * Fix data race in mark_thread when updating mark_no
745 * Fix data race when getting object size in explicitly-typed allocators
746 * Fix deadlock in GC_suspend_thread
747 * Fix gctest failure for Darwin if CPPCHECK is defined
748 * Fix lack of barriers to synchronize memory for suspend_handler
749 * Fix marking of disclaim-reachable objects in the incremental mode
750 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
751 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
752 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
753 * Fix page calculation in checksums
754 * Fix parallel build in Makefile.direct
755 * Fix test_cpp and c++ parallel build in Makefile.direct
756 * Fix typo in comment of GC_mark_some
757 * Fix typos in cdescr.html and README.sgi
758 * Make GC_INIT optional for clients even if thread-local allocations enabled
759 * Match uclinux pattern in configure
760 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
761 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
762 * New API function (GC_is_init_called) to check if BDWGC is initialized
763 * New target (check-cpp) in Makefile.direct
764 * Prevent abort in register_data_segments for Symbian and Emscripten
765 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
766 * Print realloc_count value in gctest
767 * Put invariant name in quotes to make mark_state comments clearer
768 * Refine configure messages when checking for compiler option support
769 * Remove extraneous semicolons after AC_MSG_WARN (configure)
770 * Remove page_was_dirty and remove_protection duplicate definitions
771 * Remove unnecessary type casts of printf arguments to unsigned long
772 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
773 * Rename 'test' to 'check' target in Makefile.direct
774 * Replace deprecated rewind to fseek in cordxtra
775 * Report gcc/clang pedantic warnings (configure)
776 * Skip thread suspend/resume API testing for Tru64 (OSF1)
777 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
778 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
779 * Suppress 'tainted string passed to vulnerable operation' false defects
780 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
781 * Test GC initialization from non-main thread on FreeBSD and NetBSD
782 * Test GCJ object creation with length-based descriptor (gctest)
783 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
784 * Update README regarding make cords with Makefile.direct
785 * Update README to use autogen.sh on build from the source repository
786 * Update shared libraries version info to differentiate against v7.4
787 * Use mprotect instead of mmap in GC_unmap() on Cygwin
788 * Use same style of include gc.h in documentation
789 * Workaround '!GC_page_size is always false' cppcheck style warning
790 * Workaround '#error' cppcheck error messages
791 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
792 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
793 * Workaround 'bad address arithmetic' static analysis tool false positive
794 * Workaround 'checking if unsigned value is negative' cppcheck warning
795 * Workaround 'checking unsigned value is negative' code defect in mark_from
796 * Workaround 'comparison of identical expressions' false code defects
797 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
798 * Workaround 'condition is always false' cppcheck warning in get_next_stack
799 * Workaround 'condition is always true' cppcheck style warnings in GC_init
800 * Workaround 'function is never used' cppcheck style warnings
801 * Workaround 'insecure libc pseudo-random number generator used' code defect
802 * Workaround 'int shift by negative amount' false code defect in finalize
803 * Workaround 'local variable size too big' static analyzer warning
804 * Workaround 'memory leak: result' cppcheck false error (POSIX)
805 * Workaround 'null pointer dereference' false positive in push_next_marked
806 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
807 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
808 * Workaround 'obsolete function alloca() called' cppcheck warnings
809 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
810 * Workaround 'pointer used before comparison to null' code defect (pthread)
811 * Workaround 'possible null pointer dereference' cppcheck warnings
812 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
813 * Workaround 'redundant assignment of *result to itself' cppcheck warning
814 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
815 * Workaround 'same expression on both sides of ==' cppcheck style warning
816 * Workaround 'same expression on both sides of OR' cppcheck style warning
817 * Workaround 'struct member is never used' cppcheck style warnings
818 * Workaround 'tainted int used as loop bound' static analysis tool warning
819 * Workaround 'Uninitialized variable' cppcheck errors
820 * Workaround 'unused variable' cppcheck style warnings
821 * Workaround 'va_list used before va_start' cppcheck error in cord
822 * Workaround 'value of macro unknown' cppcheck info messages
823 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
824 * Workaround 'value of SIGBUS unknown' cppcheck info messages
825 * Workaround 'value of WINAPI unknown' cppcheck info messages
826 * Workaround 'variable hides enumerator with same name' cppcheck warnings
827 * Workaround 'variable reassigned before old value used' cppcheck warnings
828 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
829 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
830
831 Also, includes 7.4.6 changes
832
833
834 == [7.6.0] 2016-08-02 ==
835
836 * ABORT_ARGn log details at INFO level (Android)
837 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
838 * Add API function to calculate total memory in use by all GC blocks
839 * Add API function to set/modify GC log file descriptor (Unix)
840 * Add alloc_size attribute to GC_generic_malloc
841 * Add alt-stack registration support
842 * Add assertion for GC_new_kind boolean arguments
843 * Add assertion on lock status to GC_alloc_large and its callers
844 * Add build scripts for VC 9 (Win32/64)
845 * Add build system plumbing for building with -Werror
846 * Add incremental GC support for Darwin/arm64
847 * Add profiling callback events to indicate start/end of reclaim phase
848 * Add support for enumerating the reachable objects in the heap
849 * Add toggle-ref support (following Mono GC API)
850 * Added instructions to README.md for building from git
851 * Adjust code indentation of malloc/calloc/str[n]dup
852 * Allow fork() automatic handling on Android with API level 21+
853 * Allow specific TLS attributes for GC_thread_key
854 * Allow thread local allocations from within pthread TLS destructors
855 * Allow to force GC_dump_regularly set on at compilation
856 * Altera NIOS2 support
857 * Change 'cord' no-argument functions declaration style to ANSI C
858 * Check DATASTART is less than DATAEND even assertions off
859 * Check for execinfo.h by configure
860 * Code refactoring of GC_push_finalizer/thread/typed_structures
861 * Code refactoring regarding 'data start' definition for FreeBSD
862 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
863 * Consistently use int[] type for '_end' symbol (code refactoring)
864 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
865 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
866 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
867 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
868 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
869 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
870 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
871 * Document GC_register_my_thread returned value
872 * Dump the block information in CSV format
873 * Eliminate redundant *flh check for null in GC_allocobj
874 * Enable atomic-uncollectable in operator new in gc_cpp.h
875 * Enable build with musl libc
876 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
877 * Enable huge_test for Win64 (and LLP64 target)
878 * Enable thread-local storage for Android Clang
879 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
880 * Export GC_push_all_eager, GC_push_finalizer_structures
881 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
882 * Fix assertion in GC_mark_from for non-heap regions
883 * Fix compilation for Android clang/arm with bfd linker
884 * Fix integer shift undefined behavior in GC_init_explicit_typing
885 * Fix missing new-line and redundant trailing dot in WARN messages
886 * Fix STACKBOTTOM for Solaris 11/x86
887 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
888 * Fix unchecked fork() result in gctest (Unix, Cygwin)
889 * Fix user-defined signals drop by marker threads
890 * Fix various typos in comments and documentation
891 * FreeBSD/arm support improvement
892 * GC_make_descriptor code refactoring (eliminate two local variables)
893 * GC_malloc[_atomic] global and thread-local generalization with kind
894 * GC_malloc_[atomic_]uncollectable generalization
895 * GC_scratch_alloc code refactoring (and WARN message improvement)
896 * Group all compact fields of GC_arrays to fit in single page
897 * Handle load_segs overflow in register_dynlib_callback gracefully
898 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
899 * Implement event callbacks for profiling (following Mono GC API)
900 * Implement the finalization extension API
901 * Implement thread suspend/resume API (Linux threads only)
902 * Improve documentation for disappearing links in gc.h
903 * Make heap growth more conservative after GC_gcollect_and_unmap call
904 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
905 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
906 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
907 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
908 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
909 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
910 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
911 * Re-implement GC_finalized_malloc using GC_malloc_kind
912 * Refactoring of android_thread_kill/pthread_kill calls
913 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
914 * Refactoring of thread-local *_freelists (use single array of free lists)
915 * Refine description in README how to build from source repository
916 * Refine GC_free_space_divisor comment regarding its initial value
917 * Reformat code of gc_cpp.cc/h
918 * Remove 'opp' local variable in GC_malloc_X
919 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
920 * Remove code commented out by 'ifdef UNDEFINED'
921 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
922 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
923 * Remove redundant casts in GC_generic_or_special_malloc and similar
924 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
925 * Remove unused GC_gcjdebugobjfreelist
926 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
927 * Replace non-API occurrences of GC_word to word (code refactoring)
928 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
929 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
930 * Standalone profiling callback for threads suspend/resume
931 * Support (add machine description for) TILE-Gx and TILEPro targets
932 * Support build for Android 64-bit (arm64, mips64, x86_64)
933 * Support FreeBSD/aarch64, FreeBSD/mips
934 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
935 * Support MinGW build in scripts
936 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
937 * Use magic header on objects to improve disclaim_test
938 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
939 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
940 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
941
942 Also, includes 7.4.4 changes
943
944
945 == [7.4.20] (not released yet) ==
946
947 * Eliminate 'unused function GC_add_map_entry' compiler warning
948 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
949 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
950 * Fix configure message about 'AIX gcc optimization fix'
951
952 Also, includes 7.2o changes
953
954
955 == [7.4.18] 2019-03-01 ==
956
957 * Fix 'wrong __data_start/_end pair' error on Android
958 * Fix thread_info() count argument value (OS X)
959
960 Also, includes 7.2n changes
961
962
963 == [7.4.16] 2018-12-13 ==
964
965 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
966 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
967 * Fix GC_register_disclaim_proc for leak-finding mode
968 * Fix concurrent bitmap update in GC_dirty
969 * Fix marking of finalizer closure object
970 * Fix marks and hb_n_marks consistency when disclaim returns true
971 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
972 * Refine documentation in gc_disclaim.h
973
974 Also, includes 7.2m changes
975
976
977 == [7.4.14] 2018-08-11 ==
978
979 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
980 * Do not call GC_dirty_inner unless GC_incremental
981 * Eliminate 'cast between incompatible function types' compiler warning
982 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
983 * Eliminate 'language extension used' Clang warning in gc.h
984 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
985 * Eliminate 'switch statement contains no case label' compiler warning
986 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
987 * Eliminate duplicate clear_mark_bit call when removing disappearing link
988 * Fix 'collecting from unknown thread' abort in leak-finding mode
989 * Fix compilation by digimars.mak (DMC) and by WCC makefile
990 * Fix cords for MANUAL_VDB
991 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
992 * Fix gctest in leak-finding mode
993 * Fix missing GC_dirty calls for GC-allocated objects used internally
994 * Fix missing GC_dirty invocation from debug_end_stubborn_change
995 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
996 * Fix typos in ChangeLog and generic_malloc
997 * Keep pointer to the start of previous entry in remove_specific_after_fork
998 * New API function (GC_is_init_called) to check if BDWGC is initialized
999 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1000 * Remove duplicate local variable in reclaim_block
1001 * Remove libatomic_ops license information from README
1002 * Workaround 'dynamic exception specifications deprecated in C++11' warning
1003
1004 Also, includes 7.2l changes
1005
1006
1007 == [7.4.12] 2018-04-19 ==
1008
1009 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1010 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1011 * Fix gctest with musl libc on s390x
1012 * Fix missing new-line in ABORT_ARG<n> definition
1013 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1014 * Fix type of local variables receiving result of PHT_HASH
1015 * Remove API symbols renaming in WCC_MAKEFILE
1016
1017 Also, includes 7.2k changes
1018
1019
1020 == [7.4.10] 2018-01-22 ==
1021
1022 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1023 Also, includes 7.2j changes
1024
1025
1026 == [7.4.8] 2017-12-22 ==
1027
1028 * Eliminate 'this statement may fall through' GCC warnings
1029 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1030 * Fix data race in make_descriptor when setting explicit_typing_initialized
1031 * Fix marking of disclaim-reachable objects in the incremental mode
1032 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1033 Also, includes 7.2i changes
1034
1035
1036 == [7.4.6] 2017-10-26 ==
1037
1038 * Add configure --enable-gcov option (enable code coverage analysis)
1039 * Add configure check whether to define NO_GETCONTEXT
1040 * Adjust GC_memalign comment
1041 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
1042 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
1043 * Avoid busy waiting in mark_thread while GC_parallel is false
1044 * Better document minimum value of size argument for typed allocations
1045 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
1046 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
1047 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
1048 * Do not produce .tar.bz2 distribution file (configure)
1049 * Do not require libatomic_ops for single-threaded builds (configure)
1050 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1051 * Document GWW_VDB in gcdescr.html
1052 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
1053 * Eliminate 'conditional expression is always true' code defect in GC_init
1054 * Eliminate 'FP divide-by-zero' static analyzer warning
1055 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
1056 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
1057 * Eliminate 'ISO C forbids object to function pointer conversion' warning
1058 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
1059 * Eliminate 'null dereference' code defect warning in register_finalizer
1060 * Eliminate 'possible loss of data' compiler warnings (MS VC)
1061 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
1062 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
1063 * Eliminate 'value stored is never read' warning of Clang static analyzer
1064 * Eliminate duplicate log messages in GC_mark_from
1065 * Eliminate most of collisions in GC_threads on Linux/x64
1066 * Ensure GC initialized when atfork_prepare is called by client
1067 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1068 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
1069 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
1070 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
1071 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
1072 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
1073 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
1074 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
1075 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
1076 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
1077 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
1078 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
1079 * Fix (adjust) GC_scratch_alloc actual argument type
1080 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
1081 * Fix finalize.c compilation in 'strict ANSI' mode
1082 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
1083 * Fix gc.h compliance to strict ANSI (pthreads)
1084 * Fix GC_bytes_allocd incrementation in case of allocation failure
1085 * Fix GC_jmp_buf multiple definition
1086 * Fix GC_noop6 definition to avoid its calls to be optimized away
1087 * Fix gctest failure if PARALLEL_MARK (musl)
1088 * Fix gctest thread stack overflow (musl-gcc)
1089 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
1090 * Fix lack of 2 trailing zeros in _MSC_VER numbers
1091 * Fix local variable declarations in disclaim_bench
1092 * Fix missing #error pragma
1093 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
1094 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
1095 * Fix missing new-line and redundant trailing dot in WARN messages
1096 * Fix missing new-line at format strings end in subthread_create test
1097 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
1098 * Fix potential overflow in decrement when computing GC_markers_m1
1099 * Fix printf format specifiers in extra files (cppcheck warnings)
1100 * Fix pthread_start compilation if single-obj-compilation (Linux)
1101 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
1102 * Fix static assertion violation in LONG_MULT for 64-bit targets
1103 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1104 * Fix thread id leaks in subthread_create and threadkey_test
1105 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
1106 * Fix tools/setjmp_t to prevent nested_sp inlining
1107 * Fix typo in CHECK_GCLIB_VERSION name (test)
1108 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
1109 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1110 * Improve detection of internal libatomic_ops (configure)
1111 * Move libraries version info to the beginning of Makefile.am
1112 * Prevent abort in register_data_segments for Symbian
1113 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1114 * Refine Makefile.direct comment about multi-threaded GC build
1115 * Refine README about library source downloading
1116 * Refine should_invoke_finalizers documentation
1117 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
1118 * Remove non-existent configure option in simple_example.html
1119 * Replace C++ style comments to C ones, remove commented out code (extra)
1120 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
1121 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
1122 * Suppress 'tainted string passed to vulnerable operation' false defects
1123 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
1124 * Update bdwgc mailing list online archive link in documentation
1125 * Update shared libraries version info to differentiate against v7.2
1126 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
1127 * Workaround 'index out of bounds' UBSan false warning in push_marked
1128 * Workaround 'mmap() resource handle leak' static analyzer warning
1129 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1130 * Workaround 'resource leak' error reported by cppcheck (tools, test)
1131 Also, includes 7.2h changes
1132
1133
1134 == [7.4.4] 2016-05-25 ==
1135
1136 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
1137 * Also enable the TSX workaround for i386 (Linux)
1138 * Avoid unstructured procfs on Solaris
1139 * Change cord/de main() declaration style from K-R to ANSI C
1140 * Change no-argument functions declaration style to ANSI C (cord)
1141 * Do not include sigcontext.h and asm/sigcontext.h
1142 * Eliminate 'divide by zero' compiler warning in cordtest
1143 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
1144 * Eliminate warnings detected by Cppcheck in cord de[_win]
1145 * Fix 'comparison of non-null parameter is always false' warning (Clang)
1146 * Fix 'CORD_iter5 unused result' code defect in cordxtra
1147 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
1148 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
1149 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
1150 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
1151 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
1152 * Fix 'statement unreachable' compiler warning in GC_mark_from
1153 * Fix 'statement unreachable' compiler warning in memalign
1154 * Fix 'unused label' compiler warning in cord/de
1155 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
1156 * Fix 'variable unused' warning in GC_save_callers
1157 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
1158 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1159 * Fix Cygwin64 build
1160 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
1161 * Fix Makefile.direct for Cygwin
1162 * Fix __alloc_size__ availability detection (Clang)
1163 * Fix abort message in GC_move_long_link
1164 * Fix and code refactoring of lock elision workaround (Linux/x64)
1165 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
1166 * Fix data race in GC_init_explicit_typing
1167 * Fix gc.mak regarding msvc_dbg and test (MSVC)
1168 * Fix missing error handling of pthread_attr_init/getstacksize
1169 * Fix missing error handling of pthreads_mutex_init and cond_wait
1170 * Fix missing numeric casts in cord
1171 * Fix potential left shift overflows in finalize.c (64-bit targets)
1172 * Fix pthreads-win32 name in comments and documentation
1173 * Fix setup_mark_lock missing prototype
1174 * Fix unchecked fcntl() result
1175 * Fix unchecked pointer dereference in check_ints (gctest)
1176 * Fix unchecked pthread_join() result in threadkey_test
1177 * Fix unchecked sigdelset() result in pthread_support
1178 * Fix undefined PTRFREE/NORMAL in gc_inline.h
1179 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
1180 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
1181 * Remove (deprecate) TODO file
1182 * Remove code duplication in GC_realloc
1183 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
1184 * Remove references to missing linux_threads.c from documentation
1185 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
1186 * Support Android API level 21
1187 * Update compiler options in gc.mak (Win32)
1188 * Use mmap instead of sbrk (Hurd)
1189 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
1190 * Workaround 'identical expr on both sides of bitwise op' warning
1191 * Workaround Linux NTPL lock elision bug
1192 * Workaround false warning about unreachable code path
1193 * Workaround invalid '_end' symbol on Android clang 3.5+
1194 Also, includes 7.2g changes
1195
1196
1197 == [7.4.2] 2014-06-03 ==
1198
1199 * Add config option to use STGRTMIN-based signals for thread suspend/resume
1200 * Allow parallel mark to be enabled on powerpc-linux systems
1201 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
1202 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
1203 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
1204 * Fix (enable) Cygwin-64 build
1205 * Fix GC_finalized_malloc failure on disclaim_test
1206 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
1207 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
1208 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
1209 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
1210 * Fix find stackbottom on BlueGene P/Q systems
1211 * Fix machdep .lo files path in configure (SPARC, IA-64)
1212 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
1213 * Fix typos in names in AUTHORS and ChangeLog files
1214 * Remove barrett_diagram file duplicated by tree.html
1215 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
1216 * Restore contribution information for ancient releases in ChangeLog
1217 Also, includes 7.2f changes
1218
1219
1220 == [7.4.0] 2013-11-17 ==
1221
1222 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
1223 * Add AArch64 (64-bit ARM) target support
1224 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
1225 * Add GC_get_prof_stats[_unsafe]() to GC public API
1226 * Add GC_push_all/conditional() to GC public API
1227 * Add assertion on number_of_objs to GC_extend_size_map
1228 * Add assertion to GC_enable() ensuring no counter underflow
1229 * Add assertion to LOCK definition that lock is not already held
1230 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
1231 * Add double-lock assertion to GC_acquire_mark_lock
1232 * Add manual POSIX fork handling support (Android)
1233 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
1234 * Add public GC_set/get_abort_func to replace default GC_on_abort
1235 * Add public GC_start_mark_threads() to allow parallel marker in fork child
1236 * Add public setter and getter for GC_push_other_roots
1237 * Add support of Android logger
1238 * Add tests for GC_register/move/unregister_long_link
1239 * Add thread suspend/resume signals public setters (POSIX threads)
1240 * Added long weakref support
1241 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
1242 * Adjust README.md title and references to doc .html files in it
1243 * Adjust build scripts to enable additional test library in staticrootstest
1244 * Adjust logged messages in start_mark_threads and GC_thr_init
1245 * Adjust printf format specifiers in GC_print_trace
1246 * Allow not to rely on __data_start value (Linux)
1247 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
1248 * Allow to compile GC_inner_start_routine aside from extra/gc.c
1249 * Allow to omit libc atexit() call
1250 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
1251 * Better document GC_warn_proc in gc.h
1252 * Call GC_on_abort (with NULL argument) on exit(1)
1253 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
1254 * Change policy regarding version numbers ("micro" part instead of "alpha")
1255 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
1256 * Check GC_base result in GC_print_all_smashed_proc
1257 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
1258 * Check traceable_allocator.allocate result before dereference in test_cpp
1259 * Code refactoring of GC_x_printf (move shared code to macro)
1260 * Convert readme to markdown
1261 * Default to use libc_stack_end in single-threaded GC on glibc targets
1262 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
1263 * Define functions in darwin_semaphore.h as inline instead of static
1264 * Define old_bus_handler static variable only if used (Unix)
1265 * Detect dladdr() presence by configure
1266 * Disable find-leak GC_gcollect on GC abnormal EXIT
1267 * Do not define _setjmp/_longjmp macros in mach_dep.c
1268 * Do not duplicate android_log_write output to GC log file (Android)
1269 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
1270 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
1271 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
1272 * Elaborate comment on dependencies in autogen.sh
1273 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
1274 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
1275 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
1276 * Eliminate 'unused result' compiler warning in main() of test_cpp
1277 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
1278 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
1279 * Eliminate Clang warning for GC_pthread_exit attribute
1280 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
1281 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
1282 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
1283 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
1284 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
1285 * Eliminate warning and simplify expression in GC_init_explicit_typing
1286 * Enable 'force GC at every GC_malloc' debug-related functionality
1287 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
1288 * Enable prefetch operations by default (GCC 3.0+)
1289 * Enable staticrootstest for the case of GC shared library build
1290 * Enable thread-local allocation support for Clang on Cygwin
1291 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
1292 * Fix ABORT definition for mingw32ce (WinCE)
1293 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
1294 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
1295 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
1296 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
1297 * Fix GC_remove_all_threads_but_me for Android (fork support)
1298 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
1299 * Fix dyn_load.c compilation for Android 4.3
1300 * Fix make disclaim_test to link with new GNU ld linking rules
1301 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
1302 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
1303 * Improve debug-only messages of add/remove_roots and init_linux_data_start
1304 * Improve fork test logging in gctest
1305 * Improve logged messages about heap size and usage
1306 * Improve logging for Android differentiating messages by log level
1307 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
1308 * Improve staticrootstest checks (tests)
1309 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
1310 * Include proper header file in 'tools' for configuration macros
1311 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
1312 * Log error messages to stderr instead of stdout in tests
1313 * Make GC_generic_malloc_ignore_off_page() public
1314 * Make GC_mark_lock_holder variable static
1315 * Make GC_print_trace always thread-safe and remove 'lock' argument
1316 * Mark GC_started_thread_while_stopped() as GC_INNER
1317 * Minimize code duplication in GC_mark_and_push
1318 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
1319 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
1320 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
1321 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
1322 * Port BDWGC to Android/x86
1323 * Postpone the suspend signal in GC_dirty_init only if used to stop world
1324 * Prepend '#' symbol to GC number in logged messages
1325 * Prevent POSIX fork if mprotect_thread is started (Darwin)
1326 * Prevent abort on GC_err/warn_printf write failure
1327 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1328 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
1329 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
1330 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
1331 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
1332 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
1333 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
1334 * Remove DebugBreak on WriteFile failure (Win32)
1335 * Remove GC_BUILD definition from build scripts
1336 * Remove abort on open log failure from GC_write (Win32)
1337 * Remove configure.ac outdated revision number
1338 * Remove nested EXPECT in GC_core_finalized_malloc
1339 * Remove nested always-false ifdef for HPUX and FREEBSD
1340 * Remove redundant GC_err_printf before abort
1341 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
1342 * Rename subthread_create to subthreadcreate_test (Makefile)
1343 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
1344 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
1345 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
1346 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
1347 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
1348 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
1349 * Replace sprintf with defensive snprintf
1350 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
1351 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
1352 * Specify GC_malloc result is unused in some tests
1353 * Specify GC_pthread_join result is unused in threadkey_test
1354 * Specify LT_INIT in configure.ac
1355 * Start of port to QNX
1356 * Support rthreads introduced in OpenBSD 5.2+
1357 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
1358 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
1359 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
1360 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
1361 * Turn on world-stop delay logging at debug level by default for Android
1362 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
1363 * Use GC_log_printf for logging instead of GC_[err_]printf
1364 * Use compiler TLS for Android NDK gcc/arm
1365 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
1366 * Use pthread API to operate thread-local data on Linux if no compiler TLS
1367 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
1368 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
1369 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
1370
1371
1372 == [7.3alpha2] 2012-05-11 ==
1373
1374 * Add 'const' qualifier to pointer argument of some API functions
1375 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
1376 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
1377 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
1378 * Add SHORT_DBG_HDRS macro template to configure
1379 * Add Symbian port to mainline (porting done by Djamel Magri)
1380 * Add TODO file
1381 * Add assertion ensuring proper alignment of 'pushed' GC symbols
1382 * Add assertion in GC_getspecific on qtid
1383 * Add assertion to GC_incremental_protection_needs, refine documentation
1384 * Add assertion to check GC_large_free_bytes by GC_finish_collection
1385 * Add configure option to compile all library .c files into single gc.o
1386 * Add cordtest to make check
1387 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
1388 * Add finalization.html to 'doc' folder
1389 * Add javaxfc.h to the installation set of GC header files (configure)
1390 * Add on-heap-resize event notification to API
1391 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
1392 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
1393 * Allow GC_exclude_static_roots() region start to be unaligned
1394 * Allow Win32 DllMain chaining on the client side
1395 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
1396 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
1397 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
1398 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
1399 * Cast pointers to word (instead of unsigned long) in specific.h
1400 * Changed the order in autogen.sh so ltmain exists in time for automake
1401 * Declare privately and use handy GC_base_C() for constant object pointers
1402 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
1403 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
1404 * Do not compile backgraph.c unless configure '--enable-gc-debug'
1405 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
1406 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
1407 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
1408 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1409 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
1410 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
1411 * Extend thread-related debug messages
1412 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
1413 * Fix DATASTART (and other minor improvements) for NaCl target
1414 * Fix GC_setspecific to prevent garbage collection inside
1415 * Fix compiler warning in cordtest
1416 * Fix minor warnings reported by GCC with '-pedantic' option
1417 * Fix static data roots registration on Android (if GC is shared)
1418 * Implement GC_get_stack_base for Darwin for single-threaded mode
1419 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
1420 * Improve GC_collect_or_expand algorithm for many finalizers registered case
1421 * In tests, print a message in case a test is a no-op
1422 * Instruct configure to hide internal libgc.so symbols if supported by GCC
1423 * Log amount of unmapped memory (if enabled) on marking-for-collection
1424 * Make __data_start a weak symbol to allow loading modules on mips
1425 * Move "cord" library tests to "cord/tests" folder
1426 * Move asm machine-dependent files to "src" folder
1427 * Move build tools sources to "tools" folder
1428 * Move cord_pos.h to public headers folder
1429 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
1430 * Optimize some functions by moving pthread_self calls out of LOCK section
1431 * Place only major per-release changes description to ChangeLog (this file)
1432 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
1433 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
1434 * Remove all auto-generated files from the repo
1435 * Remove binary icon file for de_win
1436 * Remove cordtest from "cord" library
1437 * Remove duplicate MacOS_Test_config.h file
1438 * Remove gc_amiga_redirects.h (included internally) from public headers
1439 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
1440 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
1441 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
1442 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
1443 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
1444 * Replace GC_ms_entry declaration with opaque definition for public API
1445 * Replace long GC_markers global variable with int GC_markers_m1
1446 * Replace pointer relational comparisons with non-pointer ones
1447 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
1448 * Require autoconf 2.61 instead of v2.64
1449 * Simplify autogen.sh (use autoreconf)
1450 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
1451 * Support GC_ATTR_MALLOC for MS VisualStudio
1452 * Tag auxiliary malloc-like API functions with 'malloc' attribute
1453 * Tag deprecated variables in GC API
1454 * Tag must-be-non-null arguments of GC API functions
1455 * Turn on "extra" GCC warnings
1456 * Turn on unused-parameter checking for GCC
1457 * Update AUTHORS file
1458 * Use EXPECT for checking various 'initialized' boolean variables
1459 * Use USE_COMPILER_TLS on Cygwin
1460 * Use pthread_key for thread-local storage on FreeBSD
1461 * Use union of AO_t and word to favor strict-aliasing compiler optimization
1462 Also, includes 7.2 changes
1463
1464
1465 == [7.2o] (not released yet) ==
1466
1467 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1468 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
1469 * Fix configure message about 'AIX gcc optimization fix'
1470 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1471 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
1472 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1473 * Fix printf format specifier in simple_example.html
1474 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1475 * Fix various typos mostly in documentation files
1476 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1477 * Remove a misleading comment about Solaris in gc.h
1478
1479
1480 == [7.2n] 2019-03-01 ==
1481
1482 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1483 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1484 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1485 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1486 * Fix executable memory allocation in GC_unix_get_mem
1487 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1488
1489
1490 == [7.2m] 2018-12-11 ==
1491
1492 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1493 * Fix hbp overflow in GC_install_counts
1494 * Fix start_world not resuming all threads on Darwin
1495 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1496
1497
1498 == [7.2l] 2018-08-10 ==
1499
1500 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1501 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1502 * Fix comment about inv_sz computation in setup_header
1503 * Fix comments style in configure.ac and Makefile.am
1504 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1505 * Fix global operator delete definition for C++14 in gc_cpp
1506 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1507 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1508 * Fix mark stack overflow checking in push_selected
1509 * Fix MSWIN32 macro redefinition (WCC)
1510 * Fix potential null dereference in GC_CONS
1511 * Fix register_dynamic_libraries on Windows 10
1512 * Fix result computation in n_set_marks
1513 * Fix return type in GC_set_warn_proc API documentation
1514 * Fix typo in comment for CORD_ec_flush_buf prototype
1515 * Fix typos in ChangeLog
1516 * Fix VirtualQuery call in case of malloc failure (Win32)
1517 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1518 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1519 * Workaround 'template-id not supported in this context' compiler error (WCC)
1520
1521
1522 == [7.2k] 2018-04-19 ==
1523
1524 * Fix arguments delimiter in pcr_interface.c (PCR)
1525 * Fix assertion violation in DllMain of win32_threads
1526 * Fix data race during apply_to_each_object(reset_back_edge)
1527 * Fix dbg_mlc.c/o file name in documentation
1528 * Fix include gc_gcj.h in thread_local_alloc.c
1529 * Fix man section number (3)
1530 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1531 * Fix missing SIGBUS handler setup for kFreeBSD
1532 * Fix null dereference in print_callers on backtrace_symbols failure
1533 * Fix the collector hang when it is configured with --enable-gc-debug
1534 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1535 * Fix typo in AIX macro name
1536 * Fix typo in comment in specific.h
1537
1538
1539 == [7.2j] 2018-01-21 ==
1540
1541 * Fix GC allocation mutex in child after a fork
1542 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1543 * Fix libgc version which was changed in linkage breaking way
1544 * Fix missing EOLn output in threadlibs tool
1545
1546
1547 == [7.2i] 2017-12-21 ==
1548
1549 * Avoid data race in finalized_count (gctest)
1550 * Fix assertion violation about disabled cancel in try_to_collect_inner
1551 * Fix data race in a list referenced by A.aa (gctest)
1552 * Fix data race in do_local_mark when comparing active_count to helper_count
1553 * Fix data race in GC_init_explicit_typing
1554 * Fix data race in last_stop_count access (suspend_handler_inner)
1555 * Fix data race in mark_thread when updating mark_no
1556 * Fix data race when getting object size in explicitly-typed allocators
1557 * Fix lack of barriers to synchronize memory for suspend_handler
1558 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
1559 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
1560
1561
1562 == [7.2h] 2017-10-12 ==
1563
1564 * Add gctest as a test (CMake)
1565 * Change no-argument functions declaration style to ANSI C (extra files)
1566 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
1567 * Ensure oom_fn callback executed on out-of-memory in calloc
1568 * Fix '~' operator application to unsigned values shorter than word
1569 * Fix 'context local variable might be clobbered by setjmp' compiler warning
1570 * Fix 'doc' files installation folder
1571 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
1572 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
1573 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
1574 * Fix assertion in GC_mark_from for non-heap regions
1575 * Fix assertion in GC_steal_mark_stack for non-heap regions
1576 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
1577 * Fix assertion violation in GC_wait_builder called from start_mark_threads
1578 * Fix assertion violation in mark_local checking GC_mark_stack_top
1579 * Fix assertion violation in return_single_freelist in child process
1580 * Fix bm_huge initialization for 64-bit targets (gctest)
1581 * Fix broken external links in documentation
1582 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
1583 * Fix calloc_explicitly_typed in case of lb*n overflow
1584 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1585 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
1586 * Fix configure --disable-munmap handling
1587 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
1588 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
1589 * Fix double lock in pthread_detach (Cygwin, winpthreads)
1590 * Fix double multiplication of lb by n in calloc_explicitly_typed
1591 * Fix enable_parallel_mark condition in CMake script
1592 * Fix external libatomic_ops pkg-config-based detection
1593 * Fix gc_allocator.h file name in new_gc_alloc.h comment
1594 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
1595 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
1596 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
1597 * Fix GC_incremental declaration/definition type mismatch
1598 * Fix GC_mark_stack_top assertion violation properly in mark_local
1599 * Fix GC_remove_specific invocation from remove_all_threads_but_me
1600 * Fix GC_requested_heapsize increment in GC_init
1601 * Fix GC_setspecific to prevent garbage collection inside
1602 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
1603 * Fix GCJ support in CMake build script
1604 * Fix gctest crash if configure --enable-handle-fork on Darwin
1605 * Fix get_maps on proc maps file asynchronous growth
1606 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
1607 * Fix header filename in gcconfig.h comment
1608 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
1609 * Fix integer shift undefined behavior in GC_init_explicit_typing
1610 * Fix leak_test crash in print_callers if free() is redirected
1611 * Fix Makefile.direct recursive invocation
1612 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
1613 * Fix missing win32_threads.c compilation for Cygwin (CMake)
1614 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
1615 * Fix name typos in GC_FAST_MALLOC_GRANS comment
1616 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
1617 * Fix OSF1 host pattern in CMakeLists.txt
1618 * Fix PCR-Makefile by removing compilation of a missing file
1619 * Fix potential data race in GC_SysVGetDataStart (SPARC)
1620 * Fix potential integer overflow in GC_find_limit_* functions
1621 * Fix printf arguments type in print_callers
1622 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
1623 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
1624 * Fix pthread_join when thread is registered in thread key destructor
1625 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
1626 * Fix removal of dead threads in a child process
1627 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
1628 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
1629 * Fix Solaris/sparc detection in case of strict C compliance is enforced
1630 * Fix STACKBOTTOM for Solaris 11/x86
1631 * Fix storage class of local variable in register_dynamic_libraries (Irix)
1632 * Fix tools/setjmp_t hang (OS X)
1633 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
1634 * Fix undefined HEAP_START in register_dynamic_libraries
1635 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
1636 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
1637 * Fix various typos in comments, documentation and printed messages
1638 * Handle load_segs overflow in register_dynlib_callback gracefully
1639 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1640 * Replace (fix) 'objs' acronym in comments with 'objects' word
1641 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
1642 * Update documentation about bugs reporting and new releases notification
1643 * Update Download information in GC overview document
1644 * Update shared libraries version info (v7.2)
1645 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
1646 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
1647
1648
1649 == [7.2g] 2016-05-23 ==
1650
1651 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
1652 * Fix 'implicit declaration of function' compiler warnings in cord/de
1653 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
1654 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
1655 * Fix GC initialization in cord de_win for Cygwin
1656 * Fix GC_get_stack_base if called before GC_init (Win32)
1657 * Fix OSX issue with pthread_attr_setstacksize failure
1658 * Fix Unicode Win32 API calls in cord de_win
1659 * Fix USE_COMPILER_TLS macro duplicate description in README
1660 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
1661 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
1662 * Fix filename printing in cordtest
1663 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
1664 * Fix missing GC_get_stack_base for Amiga
1665 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
1666 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
1667 * Fix null-pointer dereferences on out-of-memory in cord and tests
1668 * Fix potential multiplication overflow in check_heap_stats (gctest)
1669 * Fix race (and potential deadlock) at marker threads initialization
1670 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
1671 * Fix typo (items numbering) in GC_finalize_all documentation
1672 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
1673 * Fix typos in gc_priv.h, in README for ews4800
1674 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
1675 * Fix various spelling errors
1676 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
1677 * Regenerate configure files using official libtool release (v2.4.2)
1678 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
1679 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
1680 * windows-untested: Fix paths to msvc_dbg.c/h
1681
1682
1683 == [7.2f] 2014-06-03 ==
1684
1685 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
1686 * Fix 'source file in a subdirectory' Automake warnings
1687 * Fix ABORT message in GC_restart_handler
1688 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
1689 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
1690 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
1691 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
1692 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
1693 * Fix PARALLEL_MARK for Windows 7+
1694 * Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
1695 * Fix crash when using GC_malloc_many() as first allocation call
1696 * Fix mark stack excessive growth during parallel mark
1697 * Fix or remove broken URLs in documentation
1698 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
1699 * Fix typo in GC_collect_or_expand comment
1700 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
1701 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
1702 * Update emails/links due to project site and ML transition
1703
1704
1705 == [7.2e] 2013-11-10 ==
1706
1707 * Add weak attribute to avoid __data_start undefined messages (s390x)
1708 * Add weak stubs for pthread_cancel API
1709 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
1710 * Append _test suffix to 'initsecondarythread' binary file names
1711 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1712 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
1713 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
1714 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
1715 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
1716 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
1717 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
1718 * Fix GC_marker_Id elements initialization (WinCE)
1719 * Fix GC_print_trace missing unlock
1720 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
1721 * Fix GC_win32_free_heap compilation error for Cygwin
1722 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
1723 * Fix Win32 GC_write preventing potential infinite recursion at abort
1724 * Fix assertion violation in GC_mark_from prefetch loop
1725 * Fix collection of objects referenced only from GC_mark_stack_X variables
1726 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
1727 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
1728 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
1729 * Fix missing tabs in SMakefile.amiga file
1730 * Fix null-pointer dereference in CORD_substr_closure
1731 * Fix old_segv/bus_act variables initialization for FreeBSD
1732 * Fix potential double fclose in test_extras (cordtest)
1733 * Fix pthread_attr_t resource leak in pthread_create
1734 * Fix race in GC_print_all_errors regarding GC_leaked
1735 * Fix sizeof in GC_push_thread_structures
1736 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
1737 * Fix tests makefile to link with new GNU ld linking rules
1738 * Fix typos in comments and documentation
1739 * Fix unportable '==' test operators in configure
1740 * Fix vsprintf_args cleanup in CORD_vsprintf
1741 * Merge FreeBSD New ports collection for boehm-gc v7.2d
1742 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
1743 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
1744 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
1745
1746
1747 == [7.2d] 2012-08-09 ==
1748
1749 * Fix GC_call_with_stack_base to prevent its tail-call optimization
1750 * Fix all address-of-dummy operations by using GC_approx_sp() instead
1751 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
1752 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
1753 * Fix thread-related tests for pthreads-w32
1754 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
1755
1756
1757 == [7.2c] 2012-06-11 ==
1758
1759 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
1760 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
1761 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
1762 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
1763 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
1764
1765
1766 == [7.2b] 2012-05-23 ==
1767
1768 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
1769
1770
1771 == [7.2] 2012-05-11 ==
1772
1773 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
1774 * Add GC_WIN32_PTHREADS target in configure
1775 * Add GC_is_disabled new function to GC API
1776 * Add info that getcontext() resets FPE mask no longer on Linux/x86_64
1777 * Add public GC_set_handle_fork to control forked child handling support
1778 * Add realloc_test.c test
1779 * Add support for Hexagon target
1780 * Add thread-safe GC_get_heap_usage_safe to GC API
1781 * Change GC_check_fl_marks prototype and implementation
1782 * Check pthread_create/join result in test
1783 * Define GC_DLL (in configure) if building only dynamic libraries
1784 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
1785 * Disable incremental mode on Darwin if fork handling requested
1786 * Enable parallel marker in configure for Solaris
1787 * Fix "comparison of signed and unsigned values" compiler warnings
1788 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
1789 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
1790 * Fix GC_READ_ENV_FILE code for Cygwin
1791 * Fix GC_add_roots_inner for Mac OS X (align segment start)
1792 * Fix GC_check_fl_marks regarding concurrent access
1793 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
1794 * Fix GC_find_limit_with_bound to always reset fault handler on return
1795 * Fix GC_init static assertion for clang/x64 (Darwin)
1796 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
1797 * Fix GC_push_all/selected boundaries check
1798 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
1799 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
1800 * Fix GC_restart_handler to preserve errno if needed
1801 * Fix GC_root_size update in GC_add_roots_inner (Win32)
1802 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
1803 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
1804 * Fix calloc, GC_generic_malloc to check for allocation size overflows
1805 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
1806 * Fix configure --enable-cplusplus make install
1807 * Fix configure to disable GCC aliasing optimization unless forced to
1808 * Fix duplicate definitions in gcconfig.h for NetBSD
1809 * Fix fork() support on Cygwin and Darwin targets
1810 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
1811 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
1812 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
1813 * Fix gcconfig.h to handle mips64-linux target
1814 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
1815 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
1816 * Fix tests to check GC_malloc result for NULL (out-of-memory)
1817 * Fix thread model in configure for MinGW ("win32" instead of "posix")
1818 * Fix various warnings reported by LINT-like tools
1819 * Fix visibility of some GC internal symbols used by GNU GCJ currently
1820 * Port some thread tests to Win32
1821 * Refine API GC setters and getter comments regarding locking
1822 * Refine GC_stackbottom description in gc.h
1823 * Remove duplicate calls in GC_register_dynamic_libraries
1824 * Remove locking in API GC_get_bytes_since_gc and friends
1825 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
1826 * Remove some local variables that are unused
1827 * Support multi-threading for RTEMS target
1828 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
1829 * Use pkg-config to pick up libatomic_ops, etc
1830 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
1831
1832
1833 == [7.2alpha6] 2011-06-14 ==
1834
1835 * configure_atomic_ops.sh: Remove.
1836 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
1837 * Makefile.am (EXTRA_DIST): Add autogen.sh.
1838
1839 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
1840 filename passed.
1841 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
1842 extension.
1843 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
1844 * NT_MAKEFILE (.cpp.obj): Likewise.
1845
1846 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
1847 GC_traverse_back_graph): Move prototype to gc_priv.h.
1848 * checksums.c (GC_page_was_ever_dirty): Likewise.
1849 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
1850 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
1851 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
1852 GC_get_next_stack): Likewise.
1853 * finalize.c (GC_reset_finalizer_nested,
1854 GC_check_finalizer_nested): Likewise.
1855 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
1856 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
1857 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
1858 * misc.c (GC_register_main_static_data, GC_init_win32,
1859 GC_setpagesize, GC_init_linux_data_start,
1860 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
1861 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
1862 GC_bl_init_no_interiors): Likewise.
1863 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
1864 Likewise.
1865 * reclaim.c (GC_check_leaked): Likewise.
1866 * win32_threads.c (GC_gww_dirty_init): Likewise.
1867 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
1868 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
1869 * pthread_support.c (GC_FindTopOfStack): Likewise.
1870 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
1871 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
1872 * mark_rts.c (GC_roots_present): Change return type to void
1873 pointer (to match the prototype); return NULL instead of FALSE.
1874 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
1875 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
1876 * os_dep.c (GC_write_fault_handler): Make STATIC.
1877 * os_dep.c (GC_set_write_fault_handler): New function (only if
1878 GC_WIN32_THREADS).
1879 * pthread_start.c (GC_start_rtn_prepare_thread,
1880 GC_thread_exit_proc): Move prototype to pthread_support.h.
1881 * pthread_support.c (GC_nacl_initialize_gc_thread,
1882 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
1883 Likewise.
1884 * pthread_support.c (GC_stop_init): Move prototype to
1885 pthread_stop_world.h.
1886 * win32_threads.c (GC_write_fault_handler): Remove prototype.
1887 * win32_threads.c (GC_register_my_thread_inner): Call
1888 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
1889 (only if MPROTECT_VDB).
1890 * doc/README.win32: Add information about DMC.
1891 * include/private/gc_priv.h (GC_set_write_fault_handler): New
1892 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
1893
1894 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
1895
1896 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
1897 instead of FINISHED macro.
1898 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
1899 Win32 (same as for USE_MMAP).
1900
1901 * tests/test.c (check_heap_stats): Adjust printf format specifier
1902 for max_heap_sz; cast max_heap_sz accordingly.
1903
1904 * doc/README.solaris2: Add note.
1905
1906 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
1907 Solaris/x86 2.10+.
1908
1909 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
1910 defined; explicitly define for some targets.
1911
1912 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
1913 * stubborn.c (GC_dirty): Likewise.
1914 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
1915 PROC_VDB): Undefine if MANUAL_VDB.
1916 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
1917 MANUAL_VDB.
1918 * os_dep.c (async_set_pht_entry_from_index): Define for
1919 MANUAL_VDB.
1920 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
1921 success; if ioctl() failed then just print warning instead of
1922 aborting.
1923
1924 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
1925 for line number printing.
1926
1927 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
1928 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
1929 and "np" local variables to npages and pagesize, respectively;
1930 remove "current_addr" local variable.
1931
1932 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
1933 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
1934 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
1935 GC_get_main_stack_base implementation is defined.
1936 * os_dep.c (GC_get_main_stack_base): Define that based on
1937 GC_get_stack_base() in a single place (only if
1938 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
1939 result.
1940
1941 * mark.c (GC_push_selected): Remove "push_fn" argument (use
1942 GC_push_all directly); update the documentation.
1943 * mark.c (GC_push_conditional): Simplify the code (for better
1944 readability).
1945
1946 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
1947 boolean local variables.
1948 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
1949 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
1950 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
1951 place.
1952 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
1953 PHT_HASH(h) only once (store result to a local variable).
1954
1955 * doc/README.solaris2: Update.
1956
1957 * include/private/gcconfig.h (end, InitStackBottom): Declare
1958 extern variable for RTEMS.
1959 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
1960 Update (for RTEMS).
1961 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
1962 name (for RTEMS).
1963 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
1964 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
1965
1966 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
1967 single-threaded environment.
1968
1969 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
1970 * tests/test.c (NUMBER_ROUND_UP): New macro.
1971 * tests/test.c (check_heap_stats): Round up total expected heap
1972 size to the nearest 4 MiB bound.
1973 * tests/test.c (check_heap_stats): Print the current and expected
1974 heap sizes in case of failure.
1975
1976 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
1977 only if GC_print_stats; print errors using GC_err_printf.
1978 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
1979 a single one.
1980
1981 * pthread_support.c (pthread_join): Add assertion (check thread is
1982 finished).
1983 * pthread_support.c (GC_register_my_thread): Don't detach the
1984 thread if invoked from the thread destructor.
1985 * win32_threads.c (GC_register_my_thread): Likewise.
1986 * win32_threads.c (GC_unregister_my_thread): Don't delete the
1987 thread (just set FINISHED) if the thread is not detached (only if
1988 GC_PTHREADS); add assertion (check the thread is not finished).
1989 * tests/threadkey_test.c (main): Join some created threads.
1990
1991 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
1992 variable to "t".
1993 * win32_threads.c (GC_delete_gc_thread): Likewise.
1994 * pthread_support.c (pthread_join, pthread_detach,
1995 pthread_cancel): Rename "thread_gc_id" local variable to "t".
1996 * win32_threads.c (GC_pthread_detach): Likewise.
1997 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
1998 variable.
1999 * win32_threads.c (GC_pthread_join): Rename "joinee" local
2000 variable to "t".
2001
2002 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
2003 DEBUG_THREADS.
2004 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
2005 if GC_EXPLICIT_SIGNALS_UNBLOCK).
2006 * pthread_support.c (GC_unblock_gc_signals): New prototype.
2007 * pthread_support.c (GC_register_my_thread_inner,
2008 GC_register_my_thread): Call GC_unblock_gc_signals (only if
2009 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
2010 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
2011 macro.
2012
2013 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
2014 "sig" local variables; rename my_thread local variable to "self".
2015
2016 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
2017 more than 30 in parallel by default).
2018
2019 * tests/threadkey_test.c (key_once, main): Work around for Solaris
2020 PTHREAD_ONCE_INIT.
2021 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
2022
2023 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
2024 variable.
2025 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
2026 GC_remove_specific invocation; add a comment.
2027 * include/private/thread_local_alloc.h (GC_remove_specific):
2028 Revert back.
2029 * specific.c (slow_getspecific): Cast qtid to AO_t.
2030 * include/private/specific.h (key_create, setspecific,
2031 remove_specific): Remove "extern" keyword.
2032 * include/private/specific.h (getspecific): Change type of "qtid"
2033 local variable to unsigned long.
2034
2035 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
2036 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
2037 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
2038 Remove redundant test of the macro.
2039
2040 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
2041 * os_dep.c (GC_set_and_save_fault_handler): Recognize
2042 SIGACTION_FLAGS_NODEFER_HACK macro.
2043 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
2044 macro.
2045 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
2046 code.
2047 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
2048 sys/siginfo.h on Linux.
2049 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
2050 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
2051 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
2052 macro recognized (for HP/UX).
2053
2054 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
2055 GWW_VDB).
2056 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
2057 resetting (for PROC_VDB).
2058
2059 * tests/threadkey_test.c: New file.
2060 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
2061 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
2062 New variable.
2063
2064 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
2065 GC_remove_specific.
2066 * include/private/thread_local_alloc.h (GC_remove_specific):
2067 Remove (since it is empty for all targets).
2068 * pthread_support.c (GC_record_stack_base): New inline function.
2069 * win32_threads.c (GC_record_stack_base): Likewise.
2070 * pthread_support.c (GC_register_my_thread_inner): Invoke
2071 GC_record_stack_base.
2072 * win32_threads.c (GC_register_my_thread_inner): Likewise.
2073 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
2074 then call GC_record_stack_base, clear FINISHED, initialize
2075 thread-local list and return success.
2076 * win32_threads.c (GC_register_my_thread): Likewise.
2077 * include/gc.h (GC_register_my_thread): Update documentation.
2078 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
2079
2080 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
2081 adjacent "#ifdef".
2082 * thread_local_alloc.c (GC_malloc_atomic): Call
2083 GC_core_malloc_atomic (instead of GC_core_malloc).
2084
2085 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
2086 type to GC_thread.
2087 * pthread_start.c (GC_inner_start_routine): Pass the current
2088 thread descriptor to pthread_cleanup_push (same as in
2089 win32_threads.c).
2090 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
2091 variable to "self".
2092 * win32_threads.c (GC_push_all_stacks): Likewise.
2093 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
2094 "my_thread" local variable to "self".
2095 * pthread_support.c (GC_unregister_my_thread_inner): New static
2096 function.
2097 * pthread_support.c (GC_unregister_my_thread,
2098 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
2099 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
2100 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
2101 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
2102 "id" local variable to "thread_id".
2103
2104 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
2105 only once.
2106 * win32_threads.c (GC_pthread_start_inner): Likewise.
2107 * pthread_support.c (GC_unregister_my_thread): Add debug output.
2108 * win32_threads.c (GC_unregister_my_thread): Likewise.
2109 * pthread_support.c (GC_register_my_thread,
2110 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
2111 to "self".
2112
2113 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
2114 unconditionally (do not test GC_I_HIDE_POINTERS); update the
2115 comment.
2116 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
2117 GC_HIDE/REVEAL_POINTER, respectively.
2118 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
2119 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
2120
2121 * include/gc.h (GC_register_my_thread): Refine the comment.
2122
2123 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
2124 parentheses.
2125 * include/gc_typed.h (GC_get_bit, GC_set_bit,
2126 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
2127
2128 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
2129
2130 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
2131 getcontext(2) on m68k because it is not implemented there.
2132
2133 * alloc.c (GC_clear_a_few_frames): Use BZERO().
2134 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
2135 * reclaim.c (GC_start_reclaim): Likewise.
2136 * blacklst.c (total_stack_black_listed): Remove "len" local
2137 variable.
2138 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
2139 statement with "do-while" one.
2140 * dyn_load.c (GC_register_dynamic_libraries,
2141 GC_register_dynlib_callback): Remove redundant parentheses.
2142
2143 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
2144 "unused result" compiler warning for fread().
2145
2146 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
2147 is set to true.
2148
2149 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
2150 return -1 if the object has (or had) debugging info but was
2151 marked deallocated.
2152 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
2153 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
2154 remove "ohdr" local variable.
2155 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
2156 probably been deallocated.
2157 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
2158 in the leak-finding mode if GC_findleak_delay_free.
2159 * dbg_mlc.c (GC_check_leaked): New function (only unless
2160 SHORT_DBG_HDRS).
2161 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
2162 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
2163 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
2164 on 64-bit architectures.
2165 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
2166 parentheses.
2167 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
2168 GC_has_other_debug_info change).
2169 * include/private/gc_priv.h (GC_findleak_delay_free): New global
2170 variable declaration (unless SHORT_DBG_HDRS).
2171 * misc.c (GC_findleak_delay_free): New global variable; recognize
2172 GC_FINDLEAK_DELAY_FREE.
2173 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
2174 variable (unless SHORT_DBG_HDRS).
2175 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
2176 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
2177 if marked as deallocated.
2178
2179 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
2180 comment.
2181 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
2182 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
2183 * dbg_mlc.c (GC_smashed): Refine documentation.
2184 * mark.c (GC_push_selected): Change dirty_fn return type to
2185 GC_bool.
2186 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
2187 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
2188 local  variable.
2189 * reclaim.c (GC_reclaim_block): Pass true constant to
2190 GC_reclaim_small_nonempty_block (instead of report_if_found).
2191 * doc/README.autoconf: Update; fix a typo.
2192 * include/private/gcconfig.h (GC_WORD_C): New macro.
2193
2194 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
2195 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
2196 comment.
2197 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
2198 argument.
2199 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
2200 message to GC_print_smashed_obj.
2201 * dbg_mlc.c (GC_debug_free): Call GC_size once.
2202 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
2203 allocation succeeded; remove unnecessary check for object is
2204 smashed (since this is done in GC_debug_free); remove "clobbered"
2205 local variable.
2206
2207 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
2208 Rename "integer" argument to "linenum"; change the type of the
2209 argument to int.
2210 * gcj_mlc.c (GC_store_debug_info): Likewise.
2211 * dbg_mlc.c (GET_OH_LINENUM): New macro.
2212 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
2213 GET_OH_LINENUM; adjust print format specifier.
2214 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
2215 GC_debug_malloc_atomic_ignore_off_page,
2216 GC_debug_generic_malloc_inner,
2217 GC_debug_generic_malloc_inner_ignore_off_page,
2218 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
2219 GC_debug_malloc_uncollectable,
2220 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
2221 "i".
2222 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
2223
2224 * os_dep.c (GC_linux_stack_base): Rename to
2225 GC_linux_main_stack_base.
2226 * os_dep.c (GC_freebsd_stack_base): Rename to
2227 GC_freebsd_main_stack_base; adjust error message.
2228 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
2229 as an argument for sem_init().
2230 * pthread_support.c (pthread_create): Likewise.
2231 * pthread_support.c (pthread_create): Abort in case sem_init()
2232 fails.
2233 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
2234 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
2235 from main() if it should be done from the primordial thread only.
2236
2237 * alloc.c: Don't include sys/types.h for ArmCC.
2238 * dyn_load.c: Likewise.
2239 * os_dep.c: Likewise.
2240 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
2241 ArmCC.
2242 * mark.c (GC_noop): Define specially for ArmCC.
2243 * include/private/gc_priv.h (GC_noop): Likewise.
2244 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
2245 * misc.c: Don't include unistd.h for ArmCC.
2246 * os_dep.c (pages_executable): Rename to GC_pages_executable;
2247 make STATIC.
2248 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
2249 * ptr_chck.c (GC_is_visible): Explicitly cast
2250 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
2251 a compiler warning).
2252 * include/private/gcconfig.h: Recognize __arm.
2253 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
2254 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
2255 "bytes" argument.
2256
2257 * pthread_support.c (GC_get_nprocs): Don't define for Android.
2258 * pthread_support.c (GC_dummy_thread_local): Don't test
2259 GC_LINUX_THREADS.
2260 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
2261 Define for Android.
2262
2263 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
2264 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
2265 NO_GETCONTEXT.
2266 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
2267 call for Android.
2268
2269 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2270 Define before including windows.h.
2271 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2272 Likewise.
2273 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
2274 NOSERVICE): Likewise.
2275 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
2276 arithmetics; add a comment.
2277
2278 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
2279 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
2280 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
2281 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
2282 "mark_byte" local variable.
2283 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
2284 about that AO_or() is not used by GC unless USE_MARK_BITS
2285 explicitly set.
2286 * include/private/gc_priv.h (OR_WORD): Likewise.
2287 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
2288 add parentheses.
2289 * include/private/gc_priv.h (ONES): Define before use by
2290 MAKE_COOLER.
2291 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
2292 * include/private/gc_priv.h (OR_WORD): Don't define if
2293 USE_MARK_BYTES.
2294 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
2295 definition; simplify expression.
2296
2297 * os_dep.c (GC_get_maps): Always close the file.
2298 * pthread_support.c (GC_get_nprocs): Likewise.
2299 * os_dep.c (READ): Define similarly across the file (without
2300 parameters).
2301 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
2302 and "len" local variables (since read() may return -1).
2303 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
2304 double underscore; add "volatile" for asm.
2305 * include/private/gc_pmark.h (LONG_MULT): Add missing
2306 parentheses.
2307 * include/private/gc_priv.h (OR_WORD): Likewise.
2308 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
2309 and ';' symbol.
2310
2311 * os_dep.c (GC_get_stack_base): Implement for Android (same as
2312 for Linux).
2313 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
2314 failed to open "stat" file (not to issue a warning twice); update
2315 the comment.
2316 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
2317 get the number of CPUs.
2318
2319 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
2320 recent patches regarding this macro as the macro should be set
2321 (to 1) before including any other system header.
2322
2323 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
2324 GC_MAXIMUM_HEAP_SIZE): Update.
2325
2326 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
2327 heap size specifier; return 0 if not a valid one.
2328 * include/gc_cpp.h: Explicitly define inline one-argument delete
2329 operator for Cygwin (as a workaround).
2330 * tests/test_cpp.cc (main): Suppress compiler warnings about
2331 "assigned value is unused".
2332
2333 * misc.c (GC_parse_mem_size_arg): New function.
2334 * misc.c (GC_init): Use GC_parse_mem_size_arg().
2335 * pthread_stop_world.c (tkill): Declare for Android.
2336
2337 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
2338 first (except for NaCl) and then define the macro to 1 if not yet.
2339
2340 * tests/tests.am (TESTS, check_PROGRAMS): Add
2341 'initsecondarythread'.
2342 * tests/tests.am (initsecondarythread_SOURCES,
2343 initsecondarythread_LDADD): New variable.
2344
2345 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
2346 "const" to its string argument.
2347 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
2348 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
2349 smashed or previously deallocated found.
2350 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
2351 one.
2352 * reclaim.c (GC_reclaim_check): Likewise.
2353 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
2354 * os_dep.c (GC_get_stack_base): Don't initialize
2355 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
2356 calling GC_INIT() from a non-primordial thread is possible now).
2357 * reclaim.c (GC_add_leaked): Turn into an inline one.
2358 * reclaim.c (GC_reclaim_small_nonempty_block):
2359 Change report_if_found type from int/word to boolean.
2360 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
2361 * include/private/gc_priv.h (set_mark_bit_from_hdr,
2362 clear_mark_bit_from_hdr): Place closing parenthesis properly.
2363
2364 * os_dep.c (GC_get_main_stack_base): Try to use
2365 pthread_attr_getstack first for Linux if THREADS.
2366 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
2367 alignment.
2368
2369 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
2370 typo.
2371 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
2372 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
2373 case of NULL argument).
2374 * dbg_mlc.c (GC_free): In case of NULL argument, just return
2375 (without any warning printed); eliminate "uncollectable" local
2376 variable.
2377
2378 * configure.ac (THREADDLLIBS): Use alternate thread library on
2379 Solaris 8.
2380 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
2381 Solaris.
2382 * configure.ac: Don't use libdl on mips-sgi-irix6.
2383
2384 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
2385 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
2386 __builtin_unwind_init() for RTEMS; use setjmp() without the
2387 leading underscore (for RTEMS).
2388 * tests/test.c (BIG): Use smaller value for RTEMS.
2389 * tests/test.c (main): Customize for RTEMS.
2390
2391 * configure.host: Remove doubled words in comments.
2392 * os_dep.c: Likewise.
2393 * doc/README: Likewise.
2394 * extra/setjmp_t.c: Likewise.
2395 * tests/huge_test.c: Likewise.
2396 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
2397 K&R-style function definition with the ANSI C one.
2398 * extra/setjmp_t.c (nested_sp): Implement in the same way as
2399 GC_approx_sp.
2400
2401 * dyn_load.c (GC_dyld_sections): Add more sections.
2402 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
2403 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
2404 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
2405 logging; add support for on-demand sections.
2406
2407 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
2408 GC_ASSERTIONS.
2409 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
2410 declare (as external) unless GC_ASSERTIONS.
2411 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
2412 Cygwin; add FIXME.
2413 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
2414 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
2415 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
2416 an expression.
2417 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
2418 (which existed previously as SUSPENDED and still exists in GCJ).
2419 * include/private/pthread_support.h (DISABLED_GC): Change the
2420 value (as it is already used by SUSPENDED_EXT).
2421
2422 * tests/test.c (reverse_test):  Modify count (BIG) for
2423 ppc64-darwin.
2424
2425 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
2426 macro and environment variable; abort if any error has been
2427 printed provided the environment variable (or macro) is set.
2428 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
2429 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
2430
2431 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
2432 for RTEMS.
2433 * include/private/gcconfig.h (RTEMS): Add support for.
2434 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
2435
2436 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
2437 it is used internally in some places).
2438
2439 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
2440 declaration.
2441 * dbg_mlc.c (GC_debug_malloc_replacement,
2442 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
2443 * malloc.c (GC_debug_malloc_replacement): Likewise.
2444 * mallocx.c (GC_debug_realloc_replacement): Likewise.
2445 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
2446 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
2447 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
2448 includes of string.h.
2449 * mallocx.c: Include string.h (for GC_strdup).
2450 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
2451 to dbg_mlc.c.
2452 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
2453 redundant trailing ';'.
2454 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
2455 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
2456 properly.
2457 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
2458 malloc.c, mallocx.c.
2459
2460 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
2461 definition from misc.c.
2462 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
2463 public.
2464 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
2465 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
2466 macro.
2467 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
2468 * reclaim.c (MAX_LEAKED): Likewise.
2469 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
2470 access to the global array.
2471 * reclaim.c (GC_add_leaked): Likewise.
2472 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
2473 (new macro) is defined.
2474 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
2475 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
2476 GC_dump_regularly and GC_print_back_height variables with
2477 FALSE/TRUE.
2478 * reclaim.c (GC_print_all_errors): Refine the comment.
2479
2480 * tests/test.c (reverse_test_inner): Undo one of the previous
2481 patches which shifts "c" and "d" pointers only if
2482 ALL_INTERIOR_POINTERS (since interior pointers are always
2483 recognized in stacks).
2484
2485 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
2486 where GC_log is defined (Unix only).
2487 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
2488 variable and the similar macro; redirect GC_stdout and GC_stderr
2489 to GC_log if "GC_LOG_FILE" environment variable is set unless
2490 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
2491 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
2492 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
2493
2494 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
2495 only).
2496 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
2497 accordingly.
2498 * misc.c (GC_printf): Check GC_quiet before va_start().
2499
2500 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
2501 inside "if (GC_print_stats)" branch.
2502 * alloc.c (GC_collect_or_expand): Likewise.
2503 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2504 * headers.c (GC_scratch_alloc): Likewise.
2505 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
2506 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
2507 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
2508 GC_printf for DEBUG_THREADS output.
2509 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
2510 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
2511 * pthread_start.c (GC_inner_start_routine): Likewise.
2512 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
2513 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
2514 GC_start_world): Likewise.
2515 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
2516 GC_start_rtn_prepare_thread, pthread_create): Likewise.
2517 * checksums.c (GC_update_check_page): Use GC_printf() instead of
2518 GC_err_printf() for error printing.
2519 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
2520 instead of GC_printf for logging purposes.
2521 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
2522 external variable outside from GC_register_dynamic_libraries.
2523 * dyn_load.c (GC_register_dynamic_libraries): Don't use
2524 sys_errlist value if errno equals to sys_nerr.
2525 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
2526 instead of GC_printf for DL_VERBOSE output.
2527 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
2528 GC_init_dyld): Use GC_log_printf instead of GC_printf for
2529 DARWIN_DEBUG output.
2530 * os_dep.c (catch_exception_raise): Use GC_log_printf
2531 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
2532 * reclaim.c (GC_print_free_list): Move "n" increment out of
2533 GC_printf() call.
2534
2535 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
2536 DEBUG_WIN32_THREADS): Remove.
2537 * win32_threads.c (GC_register_my_thread_inner,
2538 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
2539 inside "if (GC_print_stats)" branch.
2540 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
2541 GC_PTHREADS).
2542 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
2543 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
2544 macro.
2545 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
2546 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
2547 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
2548 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
2549 GC_printf for DEBUG_THREADS output.
2550 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
2551 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
2552 GC_pthread_start_inner, GC_thread_exit_proc): Cast
2553 GetCurrentThreadId result to long; don't cast value of pthread_t
2554 type to int; adjust printf format specifiers.
2555 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
2556 information.
2557
2558 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
2559 check_uncollectable_ints, print_int_list, check_marks_int_list,
2560 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
2561 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
2562 test, main): Remove unnecessary casts of GC_printf calls to void.
2563
2564 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
2565 BDWGC) printed message (adjust letters case, terminating dot and
2566 new line symbols).
2567 * alloc.c (GC_check_fl_marks): Likewise.
2568 * backgraph.c (new_back_edges): Likewise.
2569 * checksums.c (GC_check_dirty): Likewise.
2570 * darwin_stop_world.c (GC_push_all_stacks,
2571 GC_suspend_thread_list): Likewise.
2572 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
2573 store_old): Likewise.
2574 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2575 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
2576 GC_push_selected, GC_push_next_marked_dirty): Likewise.
2577 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
2578 * os_dep.c (GC_remap, GC_default_push_other_roots,
2579 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
2580 catch_exception_raise_state, catch_exception_raise_state_identity,
2581 GC_mprotect_thread_notify, GC_mprotect_thread,
2582 catch_exception_raise): Likewise.
2583 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
2584 GC_stop_world, GC_stop_init): Likewise.
2585 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
2586 GC_start_routine): Likewise.
2587 * win32_threads.c (GC_register_my_thread_inner,
2588 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
2589 GC_pthread_start_inner): Likewise.
2590 * alloc.c (GC_expand_hp_inner): Realign the code.
2591 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
2592 Likewise.
2593 * misc.c (GC_init): Likewise.
2594 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
2595 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
2596 * tests/test.c (run_one_test): Likewise.
2597 * misc.c (GC_err_puts): Document.
2598 * misc.c (GC_err_write): Remove.
2599 * os_dep.c (dump_maps): Likewise.
2600 * include/private/gc_priv.h (GC_err_write): Likewise.
2601 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
2602 dump_maps() and GC_err_write().
2603 * os_dep.c (GC_read_dirty): Remove redundant brackets.
2604
2605 * tests/test.c (reverse_test_inner): Test interior pointer
2606 recognition only if ALL_INTERIOR_POINTERS.
2607 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
2608 with GC_get_all_interior_pointers(); simplify the expression.
2609 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
2610 GC_bytes_allocd_before_gc with GC_get_total_bytes().
2611 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
2612
2613 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
2614 warning if the argument is NULL and GC is in leaks detection mode.
2615 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
2616 function definition.
2617 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
2618 * mallocx.c (GC_posix_memalign): Likewise.
2619 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
2620 * mallocx.c: Include errno.h unless WinCE (otherwise include
2621 windows.h for Win32 error constants).
2622 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
2623 windows.h inclusion.
2624 * misc.c (GC_init): Register at-exit callback if GC_find_leak
2625 (even if GC_FIND_LEAK macro is unset).
2626 * pthread_stop_world.c (NACL_STORE_REGS,
2627 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
2628 Use BCOPY() instead of memcpy().
2629 * pthread_support.c (GC_init_real_syms): Likewise.
2630 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
2631 Document new macro.
2632 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
2633 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
2634 New API function prototype.
2635 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
2636 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
2637 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
2638 * include/leak_detector.h (realloc, strdup): Likewise.
2639 * include/gc.h (GC_STRNDUP): New API macro.
2640 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
2641 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
2642 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
2643 prototype (only if GC_REQUIRE_WCSDUP).
2644 * include/gc.h (GC_WCSDUP): New API macro (only if
2645 GC_REQUIRE_WCSDUP).
2646 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
2647 GC_DONT_INCLUDE_STDLIB).
2648 * include/leak_detector.h (malloc, calloc, free, realloc):
2649 Undefine symbol before its redefinition.
2650 * include/leak_detector.h (strndup, memalign, posix_memalign):
2651 Redefine to the corresponding GC function.
2652 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
2653 if GC_REQUIRE_WCSDUP).
2654 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
2655 the macro if already defined.
2656
2657 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
2658 when doing code static analysis (to inform the tool that the
2659 function is a no-return one).
2660 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
2661 of the length of "stat" file; use signed int type for "i",
2662 "buf_offset" and "len" local variables (since read() may
2663 return -1).
2664
2665 * blacklst.c (GC_bl_init_no_interiors): New function (the code
2666 moved from GC_bl_init).
2667 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
2668 GC_all_interior_pointers mode; remove unnecessarily parameter cast
2669 for GC_scratch_alloc call.
2670 * include/private/gc_priv.h (GC_bl_init): Move the function
2671 declaration to misc.c file.
2672 * misc.c (GC_bl_init_no_interiors): Add a prototype.
2673 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
2674 and 1; allow altering GC_set_all_interior_pointers value even
2675 after GC initialization.
2676 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
2677 GC_modws_valid_offsets if GC_all_interior_pointers is off.
2678 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
2679 GC_all_interior_pointers mode.
2680
2681 * alloc.c (GC_finish_collection): Remove redundant brackets;
2682 adjust code indentation.
2683 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
2684 (to improve code readability).
2685 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
2686 conditional expression); initialize "nblocks" just before the loop
2687 beginning.
2688 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
2689 initialized.
2690 * include/private/gc_priv.h (GC_initialize_offsets): Move the
2691 function declaration to misc.c file.
2692 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
2693 static variable since the function is called only once.
2694 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
2695 adjust printf format specifier (and cast the value passed to).
2696
2697 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
2698 documentation.
2699 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
2700 if LARGE_CONFIG is defined.
2701 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
2702
2703 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
2704 "#elif".
2705 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
2706 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
2707 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
2708 overflow even if not LARGE_CONFIG.
2709 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
2710 SMALL_CONFIG.
2711 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
2712 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
2713 GC_FULL_FREQUENCY): Refine the documentation.
2714
2715 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
2716 GC_word).
2717 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
2718 as word.
2719
2720 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
2721 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
2722 LINT-like tool to instruct it that the function is invoked only
2723 with valid parameters (otherwise a SEGV is ok); recognize LINT2
2724 new macro.
2725 * misc.c (GC_abort): Instruct a LINT-like tool that the function
2726 never returns in fact.
2727 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
2728 close the file immediately after read; use STRTOULL() instead of
2729 decoding the address number manually.
2730 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
2731 LINT-like tool.
2732 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
2733 LINT-like tool that the value is restricted to zero and one only
2734 (required since the variable is global and its value is used as a
2735 part of array index expression is some places).
2736
2737 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
2738 NULL.
2739 * dbg_mlc.c (GC_debug_register_finalizer,
2740 GC_debug_register_finalizer_no_order,
2741 GC_debug_register_finalizer_unreachable,
2742 GC_debug_register_finalizer_ignore_self): Handle out of memory
2743 case properly (similar to GC_register_finalizer_inner).
2744 * headers.c (GC_install_header): Handle the case when alloc_hdr()
2745 returns NULL.
2746 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
2747 * pthread_support.c (GC_mark_thread): Place a dummy return
2748 statement (which uses "id" argument) before the actual use of "id"
2749 as an array index (to suppress a warning produced by some static
2750 code analysis tools).
2751 * win32_threads.c (GC_mark_thread): Likewise.
2752 * pthread_support.c (GC_thr_init): Abort (with the appropriate
2753 message) if out of memory.
2754
2755 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
2756 comment.
2757 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
2758 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
2759 EXPECT (the 2nd argument).
2760 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
2761 Likewise.
2762 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
2763 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
2764 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
2765 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
2766 * include/private/specific.h (getspecific): Likewise.
2767 * pthread_support.c (LOCK_STATS): Add a comment.
2768
2769 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2770 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
2771 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
2772 definition to gc_config_macros.
2773
2774 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
2775 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
2776 GC_PTHREAD_EXIT_ATTRIBUTE).
2777 * include/gc_pthread_redirects.h (GC_pthread_cancel,
2778 pthread_cancel): Likewise.
2779 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
2780 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
2781 code.
2782 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
2783 Define as empty for NaCl.
2784 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
2785 defined.
2786
2787 * dyn_load.c (GC_init_dyld): Do not invoke
2788 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
2789 not required to register the main data segment in that case).
2790 * include/gc.h (GC_no_dls): Adjust the comment.
2791
2792 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
2793 GC_NO_DLOPEN.
2794 * gc_dlopen.c: Likewise.
2795 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
2796 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
2797 gc_pthread_redirects.h).
2798 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
2799 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
2800 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
2801 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
2802 pthread_sigmask): Likewise.
2803 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
2804 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
2805 * pthread_support.c (pthread_create, GC_pthread_create_t,
2806 GC_pthread_create): Rename GC_PTHREAD_CONST to
2807 GC_PTHREAD_CREATE_CONST.
2808 * win32_threads.c (GC_pthread_create): Likewise.
2809 * include/gc_pthread_redirects.h: Likewise.
2810 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2811 GC_NO_PTHREAD_SIGMASK): New macro defined.
2812 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
2813 empty for NaCl.
2814 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
2815 not define for Android (as CANCEL_SAFE is not defined).
2816
2817 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
2818 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
2819 definition to gc_config_macros.h file.
2820 * include/gc_config_macros.h: Check the file is included from gc.h
2821 file.
2822 * include/gc_version.h: Likewise.
2823
2824 * gc_dlopen.c: Empty unit for NaCl.
2825 * os_dep.c: Include fcntl.h for NaCl.
2826 * os_dep.c (GC_get_main_stack_base): Ignore
2827 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
2828 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
2829 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
2830 * pthread_start.c (GC_inner_start_routine): Don't invoke
2831 pthread_cleanup_push/pop for NaCl.
2832 * pthread_stop_world.c (GC_nacl_num_gc_threads,
2833 GC_nacl_thread_idx, GC_nacl_park_threads_now,
2834 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
2835 GC_nacl_thread_parked, GC_nacl_thread_used,
2836 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
2837 variable (fo NaCl only).
2838 * pthread_stop_world.c (GC_remove_allowed_signals,
2839 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
2840 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
2841 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
2842 GC_restart_handler): Don't define for NaCl.
2843 * pthread_support.c (GC_get_nprocs): Likewise.
2844 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
2845 * include/private/gcconfig.h (LINUX): Likewise.
2846 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
2847 for NaCl.
2848 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
2849 GC_start_world): Implement for NaCl.
2850 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
2851 local variable for OpenBSD (and NaCl).
2852 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
2853 NaCl.
2854 * pthread_stop_world.c (nacl_pre_syscall_hook,
2855 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
2856 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
2857 function (for NaCl only).
2858 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
2859 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
2860 redirect for NaCl.
2861 * include/gc_pthread_redirects.h (pthread_cancel,
2862 pthread_sigmask): Likewise.
2863 * pthread_support.c (GC_nacl_initialize_gc_thread,
2864 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
2865 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
2866 and shutdown thread for NaCl.
2867 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
2868 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
2869 for NaCl.
2870 * include/gc.h: Don't include features.h for NaCl.
2871 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
2872 * include/gc_pthread_redirects.h (GC_pthread_create): Use
2873 GC_PTHREAD_CONST instead of const.
2874 * win32_threads.c (GC_pthread_create): Likewise.
2875 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
2876 pthread_create): Likewise.
2877 * include/private/gcconfig.h (NACL): Recognize NaCl.
2878 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
2879 * include/private/pthread_stop_world.h (thread_stop_info): Add
2880 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
2881 NaCl only).
2882 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
2883 Declare internal variable (for NaCl only).
2884
2885 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
2886 macro.
2887
2888 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
2889 keywords with double underscore.
2890 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2891 catch_exception_raise_state_identity): Add GC_API_OSCALL to
2892 function definition.
2893 * os_dep.c (catch_exception_raise_state,
2894 catch_exception_raise_state_identity): Move definition to be
2895 before GC_ports.
2896 * os_dep.c (catch_exception_raise): Declare to have the symbol
2897 defined before GC_ports.
2898 * os_dep.c (GC_ports): Store references to catch_exception_raise,
2899 catch_exception_raise_state, catch_exception_raise_state_identity
2900 (to prevent stripping these symbols as dead).
2901 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2902 catch_exception_raise_state_identity): Mark these symbols as
2903 "referenced dynamically" via an assembler directive (unless
2904 NO_DESC_CATCH_EXCEPTION_RAISE).
2905 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
2906 similar to GC_API but as if GC_DLL is always defined).
2907
2908 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
2909 Win32.
2910 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
2911 FreeBSD.
2912 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
2913 SEGV_ACCERR for older FreeBSD releases).
2914
2915 * dyn_load.c (GC_register_map_entries,
2916 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
2917 DATASTART only once if DATASTART_IS_FUNC.
2918 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
2919 Calculate DATAEND only once if DATAEND_IS_FUNC.
2920 * dyn_load.c: Add comment to some endif; realign some code.
2921 * dyn_load.c (GC_init_dyld): Don't use
2922 _dyld_bind_fully_image_containing_address if
2923 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
2924 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
2925 Declare if used by DATASTART/DATAEND, respectively.
2926 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
2927 Define if DATASTART/DATAEND is a function, respectively.
2928 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
2929 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
2930 unistd.h.
2931
2932 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
2933 Reorder to remove redundant ifdef for Win32.
2934 * os_dep.c: Add comment to some endif.
2935 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
2936 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
2937 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
2938 for some reason).
2939 * os_dep.c (GC_get_main_stack_base): Allow
2940 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
2941 assertion for the returned result.
2942 * os_dep.c (GC_get_stack_base): Define for Darwin if
2943 multi-threaded.
2944 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
2945 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
2946 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
2947 refine the documentation.
2948
2949 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
2950 well.
2951 * NT_STATIC_THREADS_MAKEFILE: Likewise.
2952 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
2953 * include/gc.h (GC_INIT): Document.
2954 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
2955 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
2956 define these macros also for ARM).
2957 * tests/test.c (check_heap_stats): Print main thread stack bottom
2958 as well (only if verbose mode is on).
2959
2960 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
2961 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
2962 and X86_64).
2963
2964 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
2965 "volatile" keyword with double underscore.
2966 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
2967 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
2968 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
2969 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
2970 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
2971 for Linux/amd64 (since its GLibc getcontext currently has the bug).
2972
2973 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
2974 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
2975 macro.
2976 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
2977 alter the default value of GC_use_entire_heap.
2978 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
2979 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
2980
2981 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
2982 MPROTECT_VDB undefining.
2983
2984 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
2985 the comment.
2986
2987 * include/private/gc_priv.h (_GC_arrays): Move the conditional
2988 macro definitions (shortcuts for GC_arrays members) into the
2989 structure body.
2990
2991 * darwin_stop_world.c (GC_mach_handler_thread,
2992 GC_use_mach_handler_thread,
2993 GC_darwin_register_mach_handler_thread): Define only if
2994 MPROTECT_VDB.
2995 * darwin_stop_world.c (GC_suspend_thread_list): Use
2996 GC_mach_handler_thread and GC_use_mach_handler_thread only if
2997 MPROTECT_VDB.
2998 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
2999 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
3000 * misc.c (GC_init): Fix comment for GWW_VDB.
3001 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
3002 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
3003 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
3004 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
3005 * pthread_support.c (GC_thr_init): Define "dummy" local variable
3006 only unless GC_DARWIN_THREADS.
3007 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
3008 even in the single-threaded mode; define for iPhone/iPad.
3009 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
3010 around "undef".
3011 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
3012 Cygwin.
3013 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
3014 Darwin/arm (instead of HEURISTIC1).
3015
3016 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
3017 (for ECOS and NOSYS).
3018 * os_dep.c (GC_get_main_stack_base): Likewise.
3019 * os_dep.c (GC_get_main_stack_base): Check
3020 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
3021 remove "dummy" variable (use result one instead).
3022 * doc/README.macros (SN_TARGET_PS3): Document.
3023 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
3024 for Android.
3025 * include/private/pthread_support.h: Fix comment for "endif".
3026
3027 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
3028 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
3029 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
3030 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
3031 * os_dep.c (GC_default_push_other_roots,
3032 GC_push_thread_structures): Define for SN_TARGET_PS3.
3033 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
3034 for SN_TARGET_PS3.
3035 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
3036 (Sony PS/3 target).
3037 * include/private/gcconfig.h (THREADS): Define unconditionally if
3038 SN_TARGET_PS3.
3039 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
3040
3041 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
3042 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3043 GC_debug_malloc_atomic_ignore_off_page,
3044 GC_debug_generic_malloc_inner,
3045 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
3046 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
3047 GC_debug_malloc_atomic_uncollectable): Likewise.
3048 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3049 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
3050 comment.
3051 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
3052 * mark_rts.c (GC_roots_present): Likewise.
3053 * doc/README: Likewise.
3054 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
3055 * include/private/gc_priv.h (_GC_arrays): Likewise.
3056
3057 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
3058 just blindly linking to -lpthread, as Android includes pthread
3059 support within libc and does not provide a separate libpthread.
3060 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
3061 entry if l_addr is NULL (Android/bionic only).
3062 * pthread_stop_world.c (android_thread_kill): New internal function
3063 (Android only).
3064 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
3065 android_thread_kill (based on tkill) instead of pthread_kill on
3066 Android (since pthread_kill cannot be used safely on the platform).
3067 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
3068 gettid) for use by android_thread_kill (Android only).
3069 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
3070 structure member (Android only).
3071 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
3072 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
3073
3074 * allchblk.c (GC_freehblk): Print extended error message (done via
3075 GC_printf() before aborting with a short message) only if
3076 GC_print_stats.
3077 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3078 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
3079 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
3080 * pthread_stop_world.c (GC_start_world): Likewise.
3081 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3082 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
3083 GC_dirty_init): Remove redundant print of an error message before
3084 aborting with the same message.
3085 * os_dep.c (GC_register_data_segments): Remove format specifier
3086 from the string passed to GC_err_puts(); use ABORT instead of EXIT
3087 (if invalid executable type).
3088 * os_dep.c (GC_remap): Adjust printf format specifier (for long
3089 type).
3090 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
3091 (for SIGSEGV/BUS) only if GC_print_stats.
3092 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
3093 calls.
3094
3095 * tests/test.c (main): Print the relevant message if GWW_VDB.
3096 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
3097 on x64 if compiled by GCC.
3098
3099 * tests/staticrootstest.c: Include string.h for memset() prototype.
3100 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
3101
3102 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
3103 * configure.ac: Likewise.
3104 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3105 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
3106 GC_DISCOVER_TASK_THREADS, respectively.
3107 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3108 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3109 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
3110 (and remove FIXME).
3111 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
3112 comment; remove FIXME.
3113 * win32_threads.c (GC_NO_DLLMAIN): Rename to
3114 GC_NO_THREADS_DISCOVERY.
3115 * tests/test.c (GC_NO_DLLMAIN): Likewise.
3116 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
3117 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
3118 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
3119 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
3120 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
3121 update the comment.
3122 * win32_threads.c (GC_use_DllMain): Rename to
3123 GC_use_threads_discovery; do not set GC_win32_dll_threads if
3124 GC_DISCOVER_TASK_THREADS.
3125 * win32_threads.c (GC_started_thread_while_stopped,
3126 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
3127 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
3128 which use GC_win32_dll_threads to minimize the possibility of
3129 an "unreachable code" compiler warning when GC_win32_dll_threads
3130 is defined as a macro.
3131 * win32_threads.c (GC_unregister_my_thread): Don't call
3132 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
3133 (since can't happen); use "t" local variable only if not
3134 GC_win32_dll_threads.
3135 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
3136 * include/gc.h (GC_use_DllMain): Rename to
3137 GC_use_threads_discovery but keep old name as a macro definition.
3138 * include/gc.h (GC_use_threads_discovery): Declare also for
3139 Darwin; update the comment.
3140 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
3141 (to test the mode if possible).
3142
3143 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3144 DARWIN_QUERY_TASK_THREADS): New macro recognized.
3145 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
3146 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
3147 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
3148 * darwin_stop_world.c (GC_use_threads_discovery): New function
3149 (for setting GC_query_task_threads value).
3150 * darwin_stop_world.c (GC_mach_handler_thread,
3151 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
3152 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
3153 GC_darwin_register_mach_handler_thread): Define only if not
3154 DARWIN_SUSPEND_GC_THREADS.
3155 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
3156 the code for GC_query_task_threads case from compilation unless
3157 DARWIN_SUSPEND_GC_THREADS.
3158 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
3159 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
3160 * os_dep.c (GC_mprotect_thread): Call
3161 GC_darwin_register_mach_handler_thread only if THREADS and not
3162 DARWIN_SUSPEND_GC_THREADS.
3163 * pthread_support.c (marker_mach_threads): Don't define if
3164 DARWIN_SUSPEND_GC_THREADS.
3165 * pthread_support.c (GC_mark_thread): Don't fill in
3166 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
3167 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
3168 THREADS case.
3169
3170 * darwin_stop_world.c (GC_query_task_threads): Don't define to
3171 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
3172 the variable to false (for now).
3173 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
3174 only if not DARWIN_DONT_PARSE_STACK.
3175 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
3176 approach based on task_threads() only if GC_query_task_threads
3177 else use GC_threads table.
3178
3179 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
3180 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
3181 really clear GC_mach_threads[]).
3182 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3183 (instead of calling GC_stop_init).
3184 * include/private/pthread_support.h (GC_stop_init): Remove proto.
3185 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
3186 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
3187 GC_DARWIN_THREADS.
3188
3189 * darwin_stop_world.c (GC_stack_range_for): New static function
3190 (move the code from GC_push_all_stacks).
3191 * darwin_stop_world.c (GC_push_all_stacks): Call
3192 GC_stack_range_for(); rename kern_return local variable to
3193 kern_result.
3194 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
3195 from mach_port_t to thread_act_t.
3196 * pthread_support.c (GC_is_mach_marker): Likewise.
3197
3198 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
3199 variable initialization (always call current_task()).
3200 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
3201 Don't set thread's stop_info.stack_ptr value for Darwin.
3202 * include/private/darwin_stop_world.h (thread_stop_info): Update
3203 the comment for stack_ptr.
3204
3205 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
3206 variables to "kern_return" and "my_thread" ones, respectively;
3207 call mach_port_deallocate() unconditionally.
3208 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
3209 if DEBUG_THREADS.
3210
3211 * darwin_stop_world.c (GC_mach_thread): Move from
3212 darwin_stop_world.h.
3213 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
3214 * win32_threads.c (GC_start_world): Define "thread_id" local
3215 variable only if GC_ASSERTIONS; decide whether to resume a thread
3216 based on its "suspended" field value; assert that suspended thread
3217 stack_base is non-zero and the thread is not our one.
3218
3219 * darwin_stop_world.c (GC_thread_resume): New inline function
3220 (move code from GC_thread_resume).
3221 * darwin_stop_world.c (GC_start_world): Check result of
3222 task_threads(); call GC_thread_resume().
3223 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
3224 only if not CYGWIN32.
3225 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
3226 if not CYGWIN32.
3227
3228 * darwin_stop_world.c (FindTopOfStack): Change return type to
3229 ptr_t (from long); make GC_INNER; add GC_ prefix.
3230 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
3231 local variable (initialized from the corresponding GC_thread
3232 field unless GC_query_task_threads); add assertion that our
3233 thread is not blocked; prefix FindTopOfStack with GC_ and remove
3234 no longer needed cast to ptr_t of the result; handle thread
3235 blocked case (and remove FIXME); use GC_push_all_stack_sections
3236 unless GC_query_task_threads (and remove FIXME).
3237 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
3238 * pthread_support.c (GC_do_blocking_inner): Call
3239 GC_save_regs_in_stack (if needed) before acquiring the lock.
3240 * win32_threads.c (GC_do_blocking_inner): Likewise.
3241 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
3242 field of GC_thread (Darwin only).
3243 * include/private/pthread_support.h (GC_thread): Add topOfStack
3244 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
3245
3246 * finalize.c (GC_check_finalizer_nested): Change return type to
3247 char pointer (instead of int pointer); use explicit cast for
3248 GC_finalizer_nested assignment.
3249 * pthread_support.c (GC_check_finalizer_nested): Likewise.
3250 * win32_threads.c (GC_check_finalizer_nested): Likewise.
3251 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
3252 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
3253 "pnested" local variable to char pointer.
3254 * pthread_support.c (GC_do_blocking_inner,
3255 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
3256 field assignment.
3257 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
3258 "suspended" field assignment.
3259 * win32_threads.c (GC_Thread_Rep): Use short type for
3260 finalizer_skipped; use char type for finalizer_nested and flags
3261 fields and reorder some fields (to minimize GC_Thread_Rep
3262 structure size).
3263 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3264 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
3265 field (instead of GC_bool).
3266 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
3267 for thread_blocked field (instead of short).
3268
3269 * darwin_stop_world.c (GC_query_task_threads): New variable (or
3270 macro).
3271 * darwin_stop_world.c (GC_push_all_stacks): Use
3272 GC_query_task_threads (to choose between algorithms based on
3273 kernel task_threads and based on GC_threads table); update FIXME;
3274 remove commented out GC_push_one statements.
3275 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
3276 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
3277 stack_ptr field for all platforms.
3278 * pthread_support.c (GC_call_with_gc_active): Initialize
3279 saved_stack_ptr field for all platforms.
3280 * include/private/darwin_stop_world.h (thread_stop_info): Add
3281 stack_ptr field; change type of already_suspended from int to
3282 GC_bool.
3283
3284 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
3285 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
3286 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
3287 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
3288 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
3289 GC_stop_world): Use FALSE and TRUE for already_suspended field and
3290 "changed", "found" variables.
3291 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
3292 PARALLEL_MARK).
3293 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
3294 to GC_bool; change type of "changed", "found" to GC_bool; make
3295 "my_thread" as an argument (instead of acquiring/deallocating it
3296 locally); do not add my_thread, GC_mach_handler_thread and marker
3297 threads to GC_mach_threads table; check for overflow of
3298 GC_mach_threads table; increase GC_mach_threads_count if "found"
3299 is true and info.suspend_count is non-zero.
3300 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3301 Adjust "thread" format specifiers for GC_printf(); search thread
3302 in "old_list" starting from the previous found one.
3303 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
3304 "changed" local variable; remove "result" variable; adjust
3305 GC_printf debugging message.
3306 * darwin_stop_world.c (GC_start_world): Do not check for
3307 my_thread and GC_use_mach_handler_thread (since they are not added
3308 to GC_mach_threads table); call thread_info() only if
3309 DEBUG_THREADS or GC_ASSERTIONS.
3310 * pthread_support.c (marker_mach_threads): New static variable (if
3311 Darwin).
3312 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
3313 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
3314 table (if Darwin).
3315
3316 * alloc.c (GC_parallel): Define only if THREADS.
3317 * misc.c (GC_get_parallel): Likewise.
3318 * include/gc.h (GC_parallel, GC_get_parallel,
3319 GC_get_suspend_signal, GC_allow_register_threads,
3320 GC_register_my_thread, GC_unregister_my_thread): Define only if
3321 GC_THREADS.
3322 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
3323
3324 * configure.ac: Use `AC_C_INLINE'.
3325 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
3326 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
3327
3328 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
3329 FreeBSD).
3330 * dyn_load.c (GC_register_main_static_data): Move the definition
3331 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
3332 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
3333 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
3334 GC_register_main_static_data() result (instead of direct testing
3335 of dl_iterate_phdr (to prevent a compiler warning).
3336 * os_dep.c (CODE_OK): Test si_code also for the value of 2
3337 (FreeBSD case; required for FreeBSD v7+).
3338 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
3339 * include/private/gcconfig.h (DATASTART): Cast etext argument in
3340 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
3341 case).
3342
3343 * include/private/specific.h (quick_thread_id): Define thru
3344 GC_approx_sp(); define as a macro.
3345 * include/private/specific.h (getspecific): Use GC_INLINE instead
3346 of __inline__ (to work around Sun CC which does not recognize
3347 inline keyword surrounded with underscores).
3348
3349 * darwin_stop_world.c (FindTopOfStack): Simplify condition
3350 expressions.
3351 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
3352 of this function (DARWIN_DONT_PARSE_STACK).
3353 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
3354 thread is found (same as in pthread_stop_world.c).
3355 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
3356 scanned threads if verbose (same as in pthread_stop_world.c).
3357
3358 * darwin_stop_world.c (GC_push_all_stacks): Reset
3359 thread_state_count value before every thread_get_state call;
3360 refine the comment for thread_state_count.
3361 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
3362 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
3363 register pushing.
3364 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
3365 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
3366 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
3367 for i386.
3368
3369 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
3370 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
3371 to GC_bool.
3372 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3373 Simplify the expressions involving GC_use_mach_handler_thread.
3374 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
3375 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
3376
3377 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
3378 pthread_sigmask, dlopen): Don't define for Win32 pthreads (and
3379 don't include signal.h and dlfcn.h).
3380
3381 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
3382
3383 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
3384
3385 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
3386 VM_PROT_EXECUTE.
3387
3388 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
3389 pages_executable is on.
3390 * os_dep.c (os2_alloc): Add FIXME (for recursion).
3391 * os_dep.c (UNPROTECT): Abort with a more informative message if
3392 pages_executable is on ("mprotect" case).
3393 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
3394 pages_executable is on (Darwin case).
3395 * pthread_support.c (GC_init_real_syms): Abort with an informative
3396 message if libgc is linked after libpthread.
3397
3398 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
3399 for 64-bit targets.
3400 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
3401 macro.
3402 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
3403 since REAL(pthread_create) is used.
3404 * pthread_support.c (PTHREAD_CREATE): Remove unused.
3405
3406 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
3407 wrapped anymore).
3408 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3409 * os_dep.c (__wrap_read): Likewise.
3410
3411 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
3412 beginning of the file.
3413 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
3414 macro (defined only for Linux and Solaris).
3415 * include/gc_pthread_redirects.h (GC_pthread_cancel,
3416 GC_pthread_exit): Declare new API function (only if
3417 GC_PTHREAD_EXIT_ATTRIBUTE).
3418 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
3419 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
3420 * include/private/pthread_support.h (DISABLED_GC): New macro.
3421 * pthread_support.c (pthread_cancel, pthread_exit): Restore
3422 original definition or declare "real" function (if needed and
3423 GC_PTHREAD_EXIT_ATTRIBUTE).
3424 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
3425 Declare new types if needed.
3426 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
3427 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3428 * pthread_support.c (GC_init_real_syms): Initialize pointers to
3429 the "real" pthread_cancel and pthread_exit (only if
3430 GC_PTHREAD_EXIT_ATTRIBUTE).
3431 * pthread_support.c (GC_unregister_my_thread): Enable collections
3432 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3433 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
3434 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
3435 * pthread_support.c (GC_start_routine): Refine the comment.
3436 * extra/threadlibs.c (main): Adjust --wrap (add "read",
3437 "pthread_exit", "pthread_cancel" but remove "sleep").
3438 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3439
3440 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
3441 macro definition.
3442 * include/gc.h (GC_reachable_here): Likewise.
3443 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
3444 with double '_'.
3445
3446 * pthread_start.c: New file.
3447 * CMakeLists.txt (SRC): Add pthread_start.c.
3448 * Makefile.am (libgc_la_SOURCES): Likewise.
3449 * Makefile.direct (CSRCS): Likewise.
3450 * Makefile.direct (OBJS): Add pthread_start.obj.
3451 * extra/gc.c: Add a comment; include pthread_start.c.
3452 * pthread_support.c (start_info): Move the struct definition down
3453 closer to its usage.
3454 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
3455 GC_INNER.
3456 * pthread_support.c (GC_inner_start_routine): Move to the
3457 definition to pthread_start.c; leave only the prototype; remove
3458 STATIC.
3459 * pthread_support.c (GC_start_rtn_prepare_thread): New function
3460 (contains parts of the original GC_inner_start_routine).
3461
3462 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
3463 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
3464 documentation.
3465 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
3466 New API function declaration.
3467 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
3468 pages_executable).
3469 * os_dep.c (pages_executable): New static variable.
3470 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
3471 GC_get_pages_executable only).
3472 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
3473 Replace OPT_PROT_EXEC with pages_executable.
3474 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
3475 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
3476 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
3477 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
3478 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
3479 API function definition.
3480
3481 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
3482 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
3483 at least).
3484
3485 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
3486 32-bit CPUs (to prevent "Unexpected heap growth" failure).
3487
3488 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
3489 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
3490 pthread_sigmask): Likewise.
3491 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
3492 is added).
3493 * gc_dlopen.c (GC_dlopen): Fix return type.
3494 * pthread_support.c (GC_init_real_syms): Don't define
3495 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
3496 libpthread_name if RTLD_NEXT.
3497
3498 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
3499 * gc_dlopen.c (dlopen): Likewise.
3500 * include/gc.h (GC_enable_incremental): Refine the comment.
3501 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
3502 missing (only for Win32).
3503 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
3504 * win32_threads.c (GC_ExitThread): Likewise.
3505 * include/gc.h (GC_endthreadex): Add a comment.
3506
3507 * include/cord.h: Fix typos.
3508
3509 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
3510 "tests/CMakeLists.txt".
3511 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
3512
3513 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
3514 * include/private/gcconfig.h (AVR32): New macro (also define the
3515 supplementary macros for the target).
3516 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
3517 define for AVR32.
3518
3519 * tests/leak_test.c (main): Explicitly define as returning int
3520 (to prevent a spurious test failure on some Linux/alpha targets).
3521 * tests/thread_leak_test.c (main): Likewise.
3522 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
3523 thread (before GC_INIT) only.
3524 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
3525 accessing GC_find_leak directly.
3526 * tests/thread_leak_test.c (main): Likewise.
3527
3528 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
3529 GC_java_finalization, GC_dont_expand, GC_no_dls,
3530 GC_dont_precollect): Simplify the comment (remove the information
3531 about data races since the value is boolean).
3532
3533 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
3534 Solaris-specific implementation (based on thr_stksegment).
3535 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
3536 variable used by the Solaris-specific GC_get_stack_base().
3537
3538 * pthread_support.c (GC_mark_thread_local_free_lists,
3539 GC_check_tls): Mark (and check) only for live threads (in case of
3540 GC_destroy_thread_local() is called already but GC_delete_thread()
3541 is not yet).
3542 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
3543 Likewise.
3544
3545 * NT_MAKEFILE: Remove the comment about DLL and Win32S.
3546 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3547 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3548 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
3549 properly on VS 2005+).
3550 * NT_MAKEFILE: Update GC log file name in comments.
3551 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3552 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3553 * NT_X64_THREADS_MAKEFILE: Likewise.
3554 * doc/README.win32: Likewise.
3555 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
3556 longer supported by VS).
3557 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3558 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
3559 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3560 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3561 * NT_X64_THREADS_MAKEFILE: Likewise.
3562 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
3563 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
3564 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
3565 default stack size limit).
3566 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
3567 * win32_threads.c (GC_get_next_stack): Always define (since it is
3568 also used for Cygwin now).
3569
3570 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
3571 be just before GC_clear_marks() call.
3572 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
3573
3574 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
3575 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
3576 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
3577 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
3578 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
3579 Define.
3580 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
3581
3582 * tests/staticrootstest.c: New file.
3583 * tests/staticrootslib.c: Likewise.
3584
3585 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
3586 Cygwin as well as other win32 targets.
3587 * dyn_load.c (GC_wnt): Define to constant true.
3588 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
3589 well as other win32 targets.
3590 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
3591 Don't define for Cygwin, as on other win32.
3592 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
3593 Cygwin as for other win32 targets.
3594 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
3595 other win32.
3596 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
3597 other win32.
3598 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
3599 declare on Cygwin as on other win32.
3600 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
3601 !NO_DEBUGGING, as on other win32 targets.
3602 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
3603 Cygwin as for other win32 targets.
3604 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
3605 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
3606 other win32.
3607 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
3608 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
3609 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
3610 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
3611 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
3612 as on other win32 platforms.
3613 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
3614 for dynamic loading targets.
3615 * include/private/gc_priv.h (GC_INNER): Don't try to use
3616 visibility on Cygwin which does not support it.
3617 * include/private/gc_priv.h (struct roots): Don't declare r_next
3618 member on Cygwin as on other windows hosts.
3619 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
3620 likewise.
3621 * include/private/gc_priv.h (struct _GC_arrays): Do declare
3622 _heap_bases[] member and don't declare _root_index likewise.
3623 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
3624 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
3625 likewise.
3626 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
3627 likewise.
3628 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
3629 prototype on Cygwin as other win32 platforms.
3630
3631 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
3632 pthread_attr_getstack() instead of GC_get_stack_base() (and check
3633 returned stackaddr for NULL); output a warning on failure.
3634
3635 * alloc.c (GC_start_call_back): Replace the definition type to
3636 GC_start_callback_proc.
3637 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
3638 setter/getter function.
3639 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
3640 unconditionally (because GC_try_to_collect_inner always does full
3641 GC).
3642 * include/gc_mark.h (GC_start_callback_proc): New type.
3643 * include/gc_mark.h (GC_set_start_callback,
3644 GC_get_start_callback): New API function declaration.
3645
3646 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
3647 * os_dep.c (GC_get_main_stack_base): Recognize
3648 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
3649 and use GC_get_stack_base() in this case.
3650
3651 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
3652 GC_find_limit_with_bound() should be called with the lock held).
3653 * backgraph.c (FOR_EACH_PRED): Fix a typo.
3654
3655 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
3656 DCL_LOCK_STATE.
3657 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
3658 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
3659 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
3660 * mark.c (GC_print_trace): Likewise.
3661 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
3662 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
3663 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
3664 GC_get_finalizer_notifier): Likewise.
3665 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
3666 * pthread_support.c (GC_is_thread_tsd_valid,
3667 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
3668 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
3669 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
3670 pthread_create): Likewise.
3671 * reclaim.c (GC_print_all_errors): Likewise.
3672 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
3673 GC_unregister_my_thread, GC_do_blocking_inner,
3674 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
3675 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
3676 GC_init_parallel): Likewise.
3677
3678 * doc/README.darwin: Update.
3679
3680 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
3681 usable on Mac OS X).
3682 * doc/README.cmake: Update.
3683
3684 * CMakeLists.txt: New file (adding CMake support).
3685 * tests/CMakeLists.txt: Likewise.
3686 * doc/README.cmake: Likewise.
3687
3688 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
3689 macros.
3690 * include/private/gc_priv.h (THREAD_FLD): Recognize
3691 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
3692
3693 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
3694 OpenBSD.
3695 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
3696 OpenBSD.
3697 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
3698 NetBSD and OpenBSD.
3699
3700 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
3701 if THREADS is undefined.
3702 * include/gc.h (GC_malloc_many): Update the comment.
3703
3704 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
3705 (formerly known as Borland) C++ compiler v6.21+.
3706 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
3707 VC++ compilers.
3708
3709 * win32_threads.c (GC_register_my_thread_inner,
3710 GC_pthread_start_inner): Undo the previous commit changes for
3711 the thread flags and DETACHED state (since the state is only
3712 tested in GC_thread_exit_proc).
3713
3714 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
3715 comment.
3716 * pthread_support.c (GC_delete_thread): Allow to delete the main
3717 thread (don't call GC_INTERNAL_FREE for it); update the comment.
3718 * win32_threads.c (GC_delete_thread): Likewise.
3719 * pthread_support.c (GC_unregister_my_thread): Add an assertion
3720 for FINISHED flag is unset.
3721 * tests/test.c (check_heap_stats): Test the main thread
3722 unregistering (only if THREADS).
3723 * win32_threads.c (GC_register_my_thread_inner): Set flags to
3724 DETACHED (only if GC_PTHREADS).
3725 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
3726 GC_wait_for_gc_completion).
3727 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
3728 state if needed; set pthread_id and flags while holding the lock.
3729
3730 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
3731 OpenBSD and Darwin.
3732
3733 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
3734
3735 * test.c (main, WinMain): Consistently don't invoke
3736 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
3737 do invoke it even if parallel marking is enabled.
3738
3739 * tests/test.c (reverse_test): Comment out a check for MSWIN32
3740 (when determining BIG value) assuming outdated win32S.
3741 * tests/test.c (reverse_test): Rename to reverse_test_inner;
3742 change the declaration (to be of GC_fn_type); call itself thru
3743 GC_call_with_gc_active() if the argument is zero.
3744 * tests/test.c (reverse_test): New function added calling
3745 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
3746 GC_call_with_gc_active).
3747
3748 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
3749 Document.
3750 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
3751 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
3752 PLATFORM_ANDROID.
3753 * include/private/gcconfig.h (LINUX): Define also if
3754 PLATFORM_ANDROID (for the windows-based toolkit).
3755 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
3756 define for Android/x86 platform.
3757 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
3758 new macro (undefine DYNAMIC_LOADING in this case).
3759 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
3760 PLATFORM_ANDROID.
3761 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
3762 explicitly defined CANCEL_SAFE.
3763
3764 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
3765 if GC_DISABLE_INCREMENTAL.
3766 * reclaim.c (GC_reclaim_generic): Likewise.
3767 * checksums.c (GC_page_was_ever_dirty): Add prototype.
3768 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
3769 unless PARALLEL_MARK.
3770 * include/private/gc_priv.h (GC_dirty_maintained,
3771 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
3772 declare if GC_DISABLE_INCREMENTAL.
3773 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
3774 declare if SMALL_CONFIG.
3775 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
3776 GC_DISABLE_INCREMENTAL (since nothing to check).
3777 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
3778 GC_DISABLE_INCREMENTAL.
3779 * os_dep.c (GC_dirty_maintained): Likewise.
3780 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
3781 GC_DISABLE_INCREMENTAL.
3782 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
3783 Uncomment; define only if CHECKSUMS.
3784
3785 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
3786 GC_push_all_stack() instead of GC_push_all_stack_frames()).
3787 * include/private/gc_priv.h (GC_push_all_stack_frames,
3788 GC_push_all_register_frames): Rename to
3789 GC_push_all_stack_sections and GC_push_all_register_sections,
3790 respectively.
3791 * mark_rts.c (GC_push_all_stack_frames,
3792 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
3793 GC_push_current_stack): Likewise.
3794 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3795 * win32_threads.c (GC_push_stack_for): Likewise.
3796 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
3797 to "stacksect".
3798 * pthread_support.c (GC_call_with_gc_active): Likewise.
3799 * win32_threads.c (GC_call_with_gc_active): Likewise.
3800 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
3801 Darwin.
3802 * win32_threads.c (GC_Thread_Rep): Update the comment for
3803 traced_stack_sect.
3804
3805 * darwin_stop_world.c (GC_push_all_stacks): Rename
3806 activation_frame to traced_stack_sect.
3807 * include/private/gc_priv.h (GC_push_all_stack_frames,
3808 GC_push_all_register_frames): Likewise.
3809 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3810 * mark_rts.c (GC_push_all_register_frames,
3811 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
3812 GC_push_current_stack): Likewise.
3813 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3814 * pthread_support.c (GC_call_with_gc_active): Likewise.
3815 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
3816 GC_push_stack_for): Likewise.
3817 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
3818 GC_traced_stack_sect_s.
3819 * include/private/gc_priv.h (GC_activation_frame): Rename to
3820 GC_traced_stack_sect.
3821 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
3822 * doc/README.macros (UNICODE): Document.
3823
3824 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
3825 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
3826 declare and use GC_envfile_getenv().
3827 * misc.c (GC_envfile_content, GC_envfile_length): New static
3828 variable (only if GC_READ_ENV_FILE).
3829 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
3830 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
3831 if GC_READ_ENV_FILE).
3832 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
3833 if GC_READ_ENV_FILE.
3834 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
3835 calls to be just before GC_envfile_init() one (since the latter
3836 uses GET_MEM).
3837 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
3838 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
3839 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
3840 from the ABORT message.
3841 * misc.c (GC_init): Likewise.
3842 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
3843 Likewise.
3844 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3845 * pthread_support.c (GC_init_real_syms, start_mark_threads):
3846 Likewise.
3847
3848 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
3849 (since unused for now).
3850
3851 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
3852 GC_register_main_static_data() is defined.
3853 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
3854 (if DYNAMIC_LOADING or PCR or Win32/CE).
3855 * dyn_load.c (GC_register_main_static_data): Define the default
3856 one only if DYNAMIC_LOADING.
3857 * include/private/gc_priv.h (GC_register_dynamic_libraries):
3858 Declare only if used (to prevent compiler warning).
3859
3860 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
3861
3862
3863 == [7.2alpha4] 2009-12-01 ==
3864
3865 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
3866
3867 * include/gc.h (GC_get_suspend_signal): New function declaration.
3868 * misc.c (GC_get_suspend_signal): New API function (only if
3869 THREADS).
3870
3871 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
3872 two if GC_incremental (instead of TRUE_INCREMENTAL).
3873
3874 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
3875
3876 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
3877 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
3878 "word"); add the comment.
3879 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
3880 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
3881
3882 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
3883 const value (for speed).
3884 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
3885 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
3886 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
3887 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
3888 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
3889
3890 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
3891
3892 * backgraph.c: Remove apostrophe char from "#error".
3893
3894 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
3895 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
3896 new macro; implicitly define it if SMALL_CONFIG.
3897 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
3898 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
3899 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
3900 GC_push_conditional): Likewise.
3901 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
3902 GC_push_conditional, GC_block_was_dirty): Likewise.
3903 * misc.c (GC_enable_incremental): Likewise.
3904 * misc.c (GC_init): Likewise.
3905
3906 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
3907 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
3908 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
3909 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
3910 in a comment.
3911 * backgraph.c: Likewise.
3912 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3913 * extra/threadlibs.c (main): Likewise.
3914 * pthread_support.c (pthread_join): Likewise.
3915 * tests/test.c (main): Likewise.
3916
3917 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
3918 a duplicate symbol definition linker error).
3919 * misc.c (GC_clear_stack_inner): Likewise.
3920 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
3921
3922 * include/private/gc_priv.h (GC_write_disabled): New variable
3923 declaration (only if GC_ASSERTIONS and Win32 threads).
3924 * misc.c (GC_write): Add assertion for GC_write_disabled value is
3925 not on (only if THREADS).
3926 * win32_threads.c (GC_write_disabled): New variable (only if
3927 GC_ASSERTIONS and not Cygwin).
3928 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
3929 (while holding GC_write_cs).
3930
3931 * win32_threads.c (GC_please_stop): If DllMain-based thread
3932 registration is not compiled in then define GC_please_stop as
3933 a non-volatile variable for assertion only.
3934 * win32_threads.c (GC_stop_world): Set and clear only if defined.
3935 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
3936 usage (while holding GC_write_cs).
3937 * win32_threads.c (GC_delete_gc_thread): Likewise.
3938 * os_dep.c (GC_remove_protection): Likewise.
3939
3940 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
3941 GC_printf() calls into a single one (for DEBUG_THREADS).
3942
3943 * include/private/gc_priv.h (GC_total_stacksize): New variable
3944 declaration (only if THREADS).
3945 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
3946 * alloc.c (min_bytes_allocd): Calculate stack_size using
3947 GC_stackbottom only in the single-threaded case; otherwise use
3948 GC_total_stacksize; print GC_total_stacksize value if
3949 DEBUG_THREADS.
3950 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
3951 specifier for lo/hi values (instead of "%lx").
3952 * darwin_stop_world.c (GC_push_all_stacks): Use
3953 GC_push_all_stack_frames() instead of GC_push_all_stack().
3954 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
3955 GC_total_stacksize value.
3956 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3957 * win32_threads.c (GC_push_all_stacks): Likewise.
3958 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
3959 stack size; don't check for non-zero value of thread->stack_base.
3960 * win32_threads.c (GC_push_all_stacks): Don't call
3961 GC_push_stack_for() and don't check for "t->id == me" if
3962 thread->stack_base is zero.
3963
3964 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
3965 with "0x".
3966 * os_dep.c (PROTECT): Likewise.
3967 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
3968 int (to match printf type specifier).
3969
3970 * tests/test.c (check_heap_stats): Take into account the unmapped
3971 memory size when checking for "Unexpected heap growth"; remove
3972 FIXME.
3973
3974 * alloc.c: Revert last change.
3975
3976 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
3977 for eCos/NOSYS.
3978 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
3979 longer defined in GCJ).
3980
3981 * os_dep.c (brk): Rename to ecos_gc_brk.
3982
3983 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
3984 stack_size even if THREADS.
3985 * doc/README.macros (DEBUG_THREADS): Document.
3986 * pthread_support.c (DEBUG_THREADS): Remove the commented out
3987 definition.
3988 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
3989 definition.
3990 * win32_threads.c: Include errno.h (except for WinCE).
3991 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
3992 to local variables, and free "arg" parameter before "start"
3993 invocation.
3994 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
3995 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
3996 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
3997 of -1).
3998
3999 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4000 Use GC_INNER for the function definition.
4001 * include/private/darwin_stop_world.h
4002 (GC_darwin_register_mach_handler_thread): Remove the prototype.
4003 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
4004 for the function prototype.
4005 * include/private/gc_priv.h (NDEBUG): Explicitly define if
4006 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
4007 inclusion).
4008
4009 * include/private/gcconfig.h: Move DebugBreak() workaround (for
4010 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
4011
4012 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
4013 GC_freehblk): Use GC_INNER for the function definition.
4014 * alloc.c (GC_never_stop_func, GC_should_collect,
4015 GC_try_to_collect_inner, GC_collect_a_little_inner,
4016 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
4017 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
4018 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
4019 Likewise.
4020 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
4021 GC_promote_black_lists, GC_unpromote_black_lists,
4022 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
4023 GC_is_black_listed): Likewise.
4024 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
4025 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
4026 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
4027 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
4028 GC_store_debug_info, GC_start_debugging,
4029 GC_debug_generic_malloc_inner,
4030 GC_debug_generic_malloc_inner_ignore_off_page,
4031 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
4032 * dyn_load.c (GC_register_dynamic_libraries,
4033 GC_register_main_static_data, GC_init_dyld): Likewise.
4034 * finalize.c (GC_push_finalizer_structures, GC_finalize,
4035 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
4036 Likewise.
4037 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
4038 * headers.c (GC_find_header, GC_header_cache_miss,
4039 GC_scratch_alloc, GC_init_headers, GC_install_header,
4040 GC_install_counts, GC_remove_header, GC_remove_counts,
4041 GC_next_used_block, GC_prev_block): Likewise.
4042 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
4043 * malloc.c (GC_collect_or_expand, GC_alloc_large,
4044 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
4045 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
4046 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
4047 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
4048 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
4049 GC_clear_marks, GC_initiate_gc, GC_mark_some,
4050 GC_mark_stack_empty, GC_invalidate_mark_state,
4051 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
4052 GC_mark_init, GC_push_all, GC_push_conditional,
4053 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
4054 Likewise.
4055 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
4056 GC_exclude_static_roots_inner, GC_push_all_register_frames,
4057 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
4058 GC_push_roots): Likewise.
4059 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
4060 Likewise.
4061 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
4062 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
4063 GC_initialize_offsets): Likewise.
4064 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
4065 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
4066 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
4067 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
4068 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
4069 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
4070 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
4071 GC_page_was_ever_dirty, GC_remove_protection,
4072 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
4073 GC_save_callers, GC_print_callers): Likewise.
4074 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
4075 GC_start_world, GC_stop_init): Likewise.
4076 * pthread_support.c (GC_mark_thread_local_free_lists,
4077 GC_lookup_thread, GC_reset_finalizer_nested,
4078 GC_check_finalizer_nested, GC_segment_is_thread_stack,
4079 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
4080 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
4081 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
4082 GC_wait_marker, GC_notify_all_marker): Likewise.
4083 * reclaim.c (GC_print_all_errors, GC_block_empty,
4084 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
4085 GC_reclaim_all): Likewise.
4086 * thread_local_alloc.c (GC_init_thread_local,
4087 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4088 * win32_threads.c (GC_reset_finalizer_nested,
4089 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
4090 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
4091 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
4092 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
4093 GC_thr_init, GC_init_parallel, GC_lock,
4094 GC_mark_thread_local_free_lists): Likewise.
4095 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
4096 GC_traverse_back_graph): Use GC_INNER for the function prototype.
4097 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4098 Likewise.
4099 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
4100 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
4101 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
4102 GC_get_next_stack): Likewise.
4103 * finalize.c (GC_reset_finalizer_nested,
4104 GC_check_finalizer_nested): Likewise.
4105 * gcj_mlc.c (GC_start_debugging): Likewise.
4106 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
4107 GC_has_other_debug_info, GC_store_debug_info): Likewise.
4108 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
4109 * include/private/gc_locks.h (GC_lock): Likewise.
4110 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
4111 GC_mark_from): Likewise.
4112 * include/private/pthread_support.h (GC_lookup_thread,
4113 GC_stop_init): Likewise.
4114 * include/private/thread_local_alloc.h (GC_init_thread_local,
4115 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4116 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
4117 * mark.c (GC_page_was_ever_dirty): Likewise.
4118 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
4119 * misc.c (GC_register_main_static_data, GC_init_win32,
4120 GC_setpagesize, GC_init_linux_data_start,
4121 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
4122 GC_do_blocking_inner): Likewise.
4123 * os_dep.c (GC_greatest_stack_base_below): Likewise.
4124 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
4125 Likewise.
4126 * include/private/gc_priv.h: Likewise.
4127 * include/private/gc_priv.h (GC_INNER): Update the comment.
4128 * doc/README.macros (GC_DLL): Update.
4129
4130 * alloc.c (GC_collection_in_progress): Move the prototype to
4131 gc_priv.h.
4132 * gc_dlopen.c (GC_collection_in_progress): Likewise.
4133 * pthread_support.c (GC_collection_in_progress): Likewise.
4134 * misc.c (GC_init_parallel): Likewise.
4135 * pthread_support.c (GC_init_parallel): Likewise.
4136 * win32_threads.c (GC_init_parallel): Likewise.
4137 * darwin_stop_world.c (GC_thr_init): Likewise.
4138 * misc.c (GC_thr_init): Likewise.
4139 * pthread_stop_world.c (GC_thr_init): Likewise.
4140 * pthread_support.c (GC_thr_init): Likewise.
4141 * blacklst.c (GC_clear_bl, GC_copy_bl,
4142 GC_number_stack_black_listed): Make STATIC.
4143 * dbg_mlc.c (GC_print_obj, GC_make_closure,
4144 GC_debug_invoke_finalizer): Likewise.
4145 * malloc.c (GC_alloc_large_and_clear): Likewise.
4146 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
4147 GC_push_marked4, GC_push_marked, GC_push_next_marked,
4148 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
4149 Likewise.
4150 * misc.c (GC_clear_stack_inner): Likewise.
4151 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
4152 * darwin_stop_world.c (FindTopOfStack): Make static; define only
4153 if not DARWIN_DONT_PARSE_STACK.
4154 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
4155 * dyn_load.c (GC_repeat_read): Remove unused prototype.
4156 * include/private/gc_pmark.h (GC_find_start): Likewise.
4157 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
4158 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
4159 THREADS).
4160 * dyn_load.c (GC_register_main_static_data): Define only if
4161 DYNAMIC_LOADING.
4162 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
4163 "return" statement.
4164 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
4165 GC_PTHREADS).
4166 * include/gc.h: Fix a typo.
4167 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
4168 the header is public.
4169 * include/gc_inline.h (GC_generic_malloc_many): New public
4170 function declaration.
4171 * mallocx.c (GC_generic_malloc_many): Make public.
4172 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
4173 (if available).
4174 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
4175 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
4176 MPROTECT_VDB.
4177 * os_dep.c: Don't include atomic_ops.h
4178 * win32_threads.c: Likewise.
4179 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
4180 GC_push_marked, GC_number_stack_black_listed,
4181 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
4182 GC_generic_malloc_many, GC_make_closure,
4183 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
4184 Remove the prototype.
4185 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
4186 PROC_VDB).
4187 * include/private/gc_priv.h (GC_push_next_marked_dirty,
4188 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
4189 the prototype to mark.c.
4190 * include/private/gc_priv.h (GC_is_static_root): Declare only if
4191 not THREADS.
4192 * include/private/gc_priv.h (GC_free_inner): Declare only if
4193 THREADS.
4194 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
4195 THREADS and DBG_HDRS_ALL.
4196 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
4197 if PARALLEL_MARK.
4198 * include/private/gc_priv.h (GC_register_main_static_data): Move
4199 the prototype to misc.c.
4200 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
4201 HAVE_PUSH_REGS definition.
4202 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
4203 definition with the ANSI C one.
4204 * mark.c (GC_started_thread_while_stopped): Declared only if not
4205 GNU C.
4206 * win32_threads.c (GC_started_thread_while_stopped): Don't define
4207 if GNU C.
4208 * mark.c (GC_mark_from): Avoid unbalanced brackets in
4209 #if-#else-#endif blocks.
4210 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
4211 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
4212 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
4213 except for PROC_VDB.
4214 * tests/test.c (main): Don't reference GC_print_obj,
4215 GC_make_closure, GC_debug_invoke_finalizer,
4216 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
4217 * thread_local_alloc.c: Don't include "gc_inline.h".
4218 * win32_threads.c (GC_write_fault_handler): Declare only if
4219 MPROTECT_VDB.
4220
4221 * allchblk.c (DEBUG): Remove macro (since unused).
4222 * allchblk.c: Include private/gc_priv.h before other includes and
4223 definitions.
4224 * alloc.c: Likewise.
4225 * gc_dlopen.c: Likewise.
4226 * headers.c: Likewise.
4227 * mallocx.c: Likewise.
4228 * mark_rts.c: Likewise.
4229 * new_hblk.c: Likewise.
4230 * reclaim.c: Likewise.
4231 * mark.c: Include private/gc_pmark.h before other includes.
4232 * misc.c: Likewise.
4233 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
4234 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
4235 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
4236 already defined in gc_config_macros.h).
4237 * dyn_load.c (GC_init_dyld): Remove parameter cast for
4238 _dyld_register_func_for_add_image() and
4239 _dyld_register_func_for_remove_image(); add the comment about
4240 possible warnings; add FIXME for the deprecated
4241 _dyld_bind_fully_image_containing_address().
4242 * include/private/gc_priv.h: Include gc.h before the standard
4243 headers inclusion.
4244 * tests/test.c: Likewise.
4245 * include/private/gcconfig.h (DebugBreak): Update the comment.
4246 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
4247
4248 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
4249 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
4250 * configure.ac: Add sparc-openbsd case.
4251 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
4252 Document.
4253 * tests/test.c (main): Handle OpenBSD case.
4254 * include/private/pthread_stop_world.h: Likewise.
4255 * extra/threadlibs.c (main): Replace K&R-style function definition
4256 with the ANSI C one.
4257 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
4258 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
4259 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
4260 define it for OpenBSD.
4261 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
4262 pthread_sigmask): Don't declare and redefine for OpenBSD.
4263 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
4264 amd64, powerpc).
4265 * mach_dep.c (NO_GETCONTEXT): Likewise.
4266 * include/private/pthread_stop_world.h (thread_stop_info): Don't
4267 define last_stop_count field if OpenBSD.
4268 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
4269 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
4270 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
4271 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
4272 (only if OpenBSD).
4273 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
4274 GC_skip_hole_openbsd): New static function (only if OpenBSD).
4275 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
4276 GC_register_data_segments): Define specially for OpenBSD case.
4277 * os_dep.c (GC_fault_handler_lock): Initialize to
4278 AO_TS_INITIALIZER (instead of 0).
4279 * pthread_support.c (GC_allocate_lock): Likewise.
4280 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
4281 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
4282 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
4283 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
4284 GC_restart_handler): Don't define and use if OpenBSD.
4285 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
4286 GC_start_world): Handle OpenBSD case.
4287 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
4288 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
4289 don't define the wrapper function if OpenBSD.
4290 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
4291
4292 * dyn_load.c: Move the inclusion of private/gc_priv.h below
4293 definition of a feature macro (_GNU_SOURCE).
4294
4295 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
4296 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
4297 (only if GC_I_HIDE_POINTERS).
4298 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
4299 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
4300 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
4301 GC_enqueue_all_finalizers): Likewise.
4302 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
4303 * finalize.c (GC_general_register_disappearing_link,
4304 GC_unregister_disappearing_link, GC_register_finalizer_inner,
4305 GC_finalize): Likewise.
4306 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
4307 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
4308 of I_HIDE_POINTERS.
4309 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
4310 * include/gc.h (_GC_H): Strip leading underscore.
4311 * include/gc_backptr.h (_GC_H): Likewise.
4312 * include/gc_gcj.h (_GC_H): Likewise.
4313 * include/gc_mark.h (_GC_H): Likewise.
4314 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
4315 * include/javaxfc.h (_GC_H): Likewise.
4316 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
4317 * include/private/dbg_mlc.h (_GC_H): Likewise.
4318 * include/private/gc_priv.h (_GC_H): Likewise.
4319
4320 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
4321
4322 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
4323 variable definitions).
4324 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
4325 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
4326 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
4327 GC_n_memory, GC_fail_count): Likewise.
4328 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
4329 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
4330 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4331 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
4332 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
4333 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
4334 GC_mark_no, GC_markers): Likewise.
4335 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
4336 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
4337 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
4338 GC_backtraces, GC_force_unmap_on_gcollect,
4339 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
4340 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
4341 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
4342 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
4343 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
4344 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
4345 GC_need_to_lock, GC_thr_initialized, GC_threads,
4346 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
4347 GC_mark_lock_holder): Likewise.
4348 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
4349 Likewise.
4350 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
4351 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
4352 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
4353 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
4354
4355 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
4356 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
4357 case (since they are not defined inside GC at present).
4358 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
4359 declaration (since made static).
4360 * mark.c (GC_objects_are_marked): Define as STATIC.
4361 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
4362 Likewise.
4363 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
4364 to initialize GC_n_kinds).
4365 * win32_threads.c (start_mark_threads): Adjust the comment.
4366
4367 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
4368 function.
4369 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
4370 * mark_rts.c (add_roots_to_index): Likewise.
4371
4372 * extra/gc.c: New file.
4373 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
4374
4375 * misc.c (GC_log): Remove the declaration; move the definition (to
4376 the place where it is used); make STATIC.
4377 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
4378 to print open log failure.
4379 * misc.c (GC_write): Don't abort on open log failure if the GC is
4380 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
4381
4382 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
4383
4384 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
4385 the variable declaration to gc_priv.h.
4386 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4387 GC_force_unmap_on_gcollect): Likewise.
4388 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4389 * finalize.c (GC_fail_count): Likewise.
4390 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4391 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
4392 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4393 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4394 GC_mark_stack_too_small, GC_mark_state): Likewise.
4395 * include/private/pthread_support.h (GC_threads,
4396 GC_thr_initialized, GC_in_thread_creation): Likewise.
4397 * mallocx.c (GC_bytes_found): Likewise.
4398 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4399 * misc.c (GC_unmap_threshold): Likewise.
4400 * os_dep.c (GC_unmap_threshold): Likewise.
4401 * pthread_support.c (GC_markers): Likewise.
4402 * thread_local_alloc.c (GC_gcjobjfreelist,
4403 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4404 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4405 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4406 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
4407 a tag for now); defined after "gcconfig.h" inclusion.
4408 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
4409 keyword for most global variables.
4410 * alloc.c (GC_copyright): Add the comment about the symbol
4411 visibility.
4412 * finalize.c (GC_fo_entries): Likewise.
4413 * include/private/gc_priv.h (GC_print_stats): Likewise.
4414 * misc.c (GC_quiet): Likewise.
4415 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
4416 STATIC.
4417 * pthread_support.c (GC_threads): Add explicit zero initializer
4418 (to make the variable definition differ from the declaration).
4419
4420 * backgraph.c (GC_quiet): Remove the declaration (not needed
4421 anymore since gc_priv.h is always included).
4422 * checksums.c (GC_quiet): Likewise.
4423 * gcj_mlc.c (GC_quiet): Likewise.
4424 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
4425 comment.
4426 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4427 GC_hdr_cache_misses): Likewise.
4428 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
4429 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
4430 Likewise.
4431 * win32_threads.c (GC_please_stop, GC_max_thread_index,
4432 GC_mark_mutex_waitcnt): Likewise.
4433
4434 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
4435 'D') in the name.
4436
4437 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
4438 redirection is turned off; turn it on later when dlopen real
4439 symbol is no longer needed (according to the comment and the same
4440 as in dyn_load.c).
4441 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
4442 REAL_DLFUNC, respectively (to have unique names since the
4443 definitions may differ from that of the similar ones in
4444 pthread_support.c).
4445 * mark.c (source): Undefine the macro when no longer needed.
4446 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
4447 have the unique name across the project).
4448 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
4449 comment.
4450 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
4451 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
4452 longer needed.
4453
4454 * pthread_stop_world.c (pthread_sigmask): Undefine before using
4455 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
4456 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
4457 neither redirected nor used here).
4458 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
4459 "tm" for short; remove "tm_" prefix.
4460 * win32_threads.c (in_use, next): Don't define the macros; use
4461 tm.in_use and tm.next fields, respectively (to ease debugging).
4462 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
4463 unique name across the project).
4464
4465 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
4466 inclusion.
4467 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
4468 not included yet.
4469 * finalize.c (I_HIDE_POINTERS): Don't define.
4470 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
4471 * misc.c (I_HIDE_POINTERS): Likewise.
4472 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
4473 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
4474 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
4475 inclusion order.
4476
4477 * dyn_load.c: Include gc_priv.h before using configuration
4478 information (MACOS).
4479 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
4480 GC_MUST_RESTORE_REDEFINED_DLOPEN.
4481
4482 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
4483 properly.
4484 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
4485 "ifdef DEBUG_THREADS".
4486 * pthread_stop_world.c: Likewise.
4487 * pthread_support.c: Likewise.
4488 * include/gc_inline.h: Guard with GC_INLINE_H.
4489
4490 * alloc.c (GC_copyright): Define as const.
4491 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
4492 (since the name starts with "GC_" prefix).
4493 * dbg_mlc.c (GC_describe_type_fns): Likewise.
4494 * dyn_load.c (GC_FirstDLOpenedLinkMap,
4495 GC_register_dynlib_callback, GC_dyld_sections,
4496 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
4497 Likewise.
4498 * malloc.c (GC_libpthread_start, GC_libpthread_end,
4499 GC_libld_start, GC_libld_end): Likewise.
4500 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
4501 Likewise.
4502 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
4503 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
4504 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
4505 GC_forward_exception): Likewise.
4506 * pthread_support.c (GC_syms_initialized): Likewise.
4507 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
4508 * win32_threads.c (GC_win32_dll_threads,
4509 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
4510 GC_waitForSingleObjectInfinite): Likewise.
4511 * darwin_stop_world.c (GC_use_mach_handler_thread,
4512 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
4513 "static" with "STATIC" and add zero initializer.
4514 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
4515 GC_sigbus_count): Likewise.
4516 * headers.c (free_hdr): Replace "static" with GC_INLINE.
4517 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
4518 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
4519 * os_dep.c (async_set_pht_entry_from_index): Make static (for
4520 MPROTECT_VDB case).
4521 * pthread_support.c (GC_real_pthread_create,
4522 GC_real_pthread_sigmask, GC_real_pthread_join,
4523 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
4524 for static GC_real_XXX symbols.
4525 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
4526
4527 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
4528 * dyn_load.c (GC_init_dyld): Likewise.
4529 * os_dep.c (GC_print_callers): Likewise.
4530 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
4531 result (since it's always of "struct mach_header" type).
4532 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
4533 GC_dyld_image_remove (to always have the first argument of
4534 "struct mach_header" pointer type).
4535
4536 * configure.ac: Add threads support for OpenBSD case (threads may
4537 not work correctly for it).
4538
4539 * acinclude.m4: Rename to m4/gc_set_version.m4.
4540 * m4/libtool.m4: Delete the file.
4541 * m4/lt~obsolete.m4: Likewise.
4542 * m4/ltoptions.m4: Likewise.
4543 * m4/ltsugar.m4: Likewise.
4544 * m4/ltversion.m4: Likewise.
4545
4546 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
4547 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
4548 declaration in winbase.h (the workaround would turn into a no-op
4549 when DebugBreak() will be defined as a macro in the toolchain).
4550
4551 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
4552 x86mingw32ce toolchain).
4553 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
4554 toolchain (or if already defined).
4555 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
4556 defined for WinCE or if NO_GETENV is defined).
4557 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
4558 NO_GETENV one.
4559
4560 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
4561 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
4562 * libtool.m4: Remove.
4563 * m4/libtool.m4: New file (generated).
4564 * m4/lt~obsolete.m4: Likewise.
4565 * m4/ltoptions.m4: Likewise.
4566 * m4/ltsugar.m4: Likewise.
4567 * m4/ltversion.m4: Likewise.
4568
4569 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
4570 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
4571 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
4572
4573 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
4574 comments; don't use "default" stop_func on a retry if
4575 GC_dont_expand.
4576 * alloc.c (GC_allocobj): Pass "retry" argument to
4577 GC_collect_or_expand().
4578 * malloc.c (GC_alloc_large): Likewise.
4579 * include/private/gc_priv.h (GC_collect_or_expand): Move the
4580 declaration to malloc.c; add "retry" argument.
4581
4582 * alloc.c (GC_start_call_back): Move the variable definition from
4583 misc.c.
4584 * include/private/gc_priv.h (GC_start_call_back): Remove the
4585 declaration.
4586 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
4587 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
4588 beginning of the function.
4589 * include/gc.h (GC_try_to_collect): Refine the comment about
4590 stop_func.
4591
4592 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
4593 GC_gcollect): Add the comment.
4594 * alloc.c (GC_try_to_collect_general): Move the assertion on
4595 stop_func != 0 to GC_try_to_collect().
4596 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
4597 GC_default_stop_func instead (holding the lock).
4598 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
4599 GC_default_stop_func (to prevent data races).
4600
4601 * Makefile.direct: Move "define arguments" documentation to
4602 doc/README.macros; add reference to doc/README.macros.
4603 * Makefile.dj: Change the documentation reference to
4604 doc/README.macros.
4605 * README.QUICK: Likewise.
4606 * configure.ac: Likewise.
4607 * allchblk.c: Remove unnecessary "-D" from the comment.
4608 * doc/README.macros: Likewise.
4609 * README.environment: Likewise.
4610 * include/gc.h: Likewise.
4611 * include/gc_inline.h: Likewise.
4612 * include/private/gcconfig.h: Likewise.
4613 * README.QUICK: Fix a typo.
4614
4615 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
4616 CreateFile(); don't immediately flush every write if very verbose.
4617
4618 * doc/README.win32: Replace ".exe.log" to ".gc.log".
4619 * doc/README.win64: Likewise.
4620 * doc/README.win64: Fix a typo.
4621 * misc.c (GC_CreateLogFile): Strip executable file extension for
4622 the log file; use ".gc.log" extension (instead of ".log").
4623
4624 * include/gc_config_macros.h: Avoid the redefinition of
4625 GC_xxx_THREADS macros.
4626
4627 * alloc.c (GC_try_to_collect_general): Change the type of "result"
4628 local variable to GC_bool.
4629
4630 * include/gc_config_macros.h: Use old behavior for FreeBSD and
4631 NetBSD platform detection code (check that other GC_xxx_THREADS
4632 are undefined); add FIXME.
4633
4634 * include/gc_config_macros.h: Rearrange the platform detection
4635 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
4636 GC_THREADS first if GC_XXX_THREADS already set; define proper
4637 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
4638 place; define _REENTRANT if posix threads except for Win32).
4639
4640 * alloc.c (GC_try_to_collect_general): New function (move the code
4641 from GC_try_to_collect, pass force_unmap argument).
4642 * alloc.c (GC_try_to_collect, GC_gcollect): Call
4643 GC_try_to_collect_general().
4644 * alloc.c (GC_gcollect_and_unmap): New public function.
4645 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
4646 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
4647 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
4648 and GC_gcollect()).
4649
4650 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
4651 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
4652 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
4653 (that is, don't depend on GC_THREADS macro).
4654 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
4655 with a check for GC_PTHREADS (since the former implies the
4656 latter).
4657
4658 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
4659 * include/gc.h (GC_MIN, GC_MAX): Don't define.
4660 * mallocx.c (GC_malloc_many): Add comment to #endif.
4661
4662 * configure.ac: Drop the subdir-objects Automake option, since
4663 it's incompatible with picking source files from libatomic_ops.
4664
4665 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
4666 "extern" keyword to a global variable declaration (some compilers
4667 require it).
4668 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4669 GC_force_unmap_on_gcollect): Likewise.
4670 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4671 * finalize.c (GC_fail_count): Likewise.
4672 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4673 GC_hdr_cache_misses): Likewise.
4674 * mallocx.c (GC_bytes_found): Likewise.
4675 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4676 * misc.c (GC_unmap_threshold): Likewise.
4677 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
4678 * pthread_support.c (GC_markers): Likewise.
4679 * thread_local_alloc.c (GC_gcjobjfreelist,
4680 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4681 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4682 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4683
4684 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
4685 suppress misleading GC "Out of Memory!" warning printed on every
4686 GC_MALLOC(LONG_MAX) call.
4687 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
4688 * tests/huge_test.c (main): Replace K&R-style function definition
4689 with the ANSI C one.
4690
4691 * dyn_load.c (GC_register_dynamic_libraries): Always use
4692 lpMaximumApplicationAddress value for WinCE (even for old
4693 versions).
4694 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
4695 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
4696 WinCE and THREADS).
4697 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
4698 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
4699 GC_dont_query_stack_min for older WinCE (prior to version 5).
4700 * win32_threads.c (GC_dont_query_stack_min): Declare.
4701 * win32_threads.c (GC_get_stack_min): Rename the macro to
4702 GC_wince_evaluate_stack_min for WinCE; update the comment.
4703 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
4704 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
4705 WinCE and don't update thread's last_stack_min value (only if
4706 GC_dont_query_stack_min).
4707 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
4708 GC_dont_query_stack_min (since the evaluated stack_min value may
4709 be incorrect if the stack is bigger than 64 KiB).
4710
4711 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
4712 GC_USE_LD_WRAP).
4713 * include/gc.h: Include "gc_pthread_redirects.h" even if
4714 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4715 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
4716 define and check for (since included only from gc.h).
4717 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
4718 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4719 * include/gc_pthread_redirects.h: Include signal.h only to get
4720 sigset_t definition.
4721
4722 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
4723 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
4724 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
4725 * os_dep.c (GC_sysinfo): Remove explicit global variable
4726 initialization to "{0}" (revert back the previous change) since it
4727 might produce a warning.
4728
4729 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
4730 gc_priv.h.
4731 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
4732 from misc.c; define as STATIC.
4733 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
4734 GC_large_alloc_warn_suppressed): Remove declaration.
4735 * alloc.c (GC_bytes_found): Add "defined in" comment.
4736 * mallocx.c (GC_bytes_found): Likewise.
4737 * misc.c (GC_unmap_threshold): Likewise.
4738 * os_dep.c (GC_old_allocator): Likewise.
4739 * pthread_support.c (GC_markers): Likewise.
4740 * thread_local_alloc.c (GC_gcjobjfreelist,
4741 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4742 * win32_threads.c (GC_markers): Likewise.
4743 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
4744 be distinctive from a variable declaration).
4745 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
4746 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
4747 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
4748 * checksums.c (GC_faulted, GC_n_dirty_errors,
4749 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
4750 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
4751 * dbg_mlc.c (GC_smashed): Likewise.
4752 * finalize.c (GC_old_dl_entries): Likewise.
4753 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
4754 GC_gcjdebugobjfreelist): Likewise.
4755 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4756 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
4757 GC_mark_stack_top): Likewise.
4758 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
4759 Likewise.
4760 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
4761 GC_old_segv_handler, GC_old_bus_handler,
4762 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
4763 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
4764 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
4765 * reclaim.c (GC_leaked): Likewise.
4766 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
4767 GC_typed_mark_proc_index, GC_array_mark_proc_index,
4768 GC_eobjfreelist, GC_arobjfreelist): Likewise.
4769 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
4770 GC_marker_Id): Likewise.
4771 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
4772 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
4773 * os_dep.c (GC_vd_base): Likewise.
4774 * pthread_support.c (GC_mark_threads): Likewise.
4775 * reclaim.c (GC_leaked): Likewise.
4776 * typd_mlc.c (GC_bm_table): Likewise.
4777 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
4778 that of definition; add "defined in" comment.
4779 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
4780 GC_save_regs_ret_val.
4781 * misc.c (GC_check_heap, GC_print_all_smashed,
4782 GC_start_call_back): Remove unnecessary cast (of 0).
4783 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
4784 * misc.c (GC_large_alloc_warn_interval): Initialize to
4785 GC_LARGE_ALLOC_WARN_INTERVAL value.
4786 * misc.c (GC_tmp): Change to "static".
4787 * os_dep.c (GC_mprotect_state): Define as static.
4788 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
4789 * win32_threads.c (WinMain): Remove FIXME for WinCE.
4790
4791 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
4792
4793 * configure.ac: Rewrite the tests for external or internal
4794 libatomic_ops.
4795 * configure.ac: In particular, drop the symbolic links. Add option
4796 --with-libatomic-ops for forced selection.
4797 * Makefile.am: Adjust the path of source files from libatomic_ops
4798 to not use the links.
4799 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
4800 be empty if we use the bundled AO sources.
4801
4802 * Makefile.am: Strip version suffix for libatomic_ops directory.
4803 * build_atomic_ops.sh: Likewise.
4804 * build_atomic_ops.sh.cygwin: Likewise.
4805 * configure_atomic_ops.sh: Likewise.
4806 * Makefile.direct: Remove AO_VERSION definition; strip version
4807 suffix for libatomic_ops directory.
4808 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4809 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4810 * NT_X64_THREADS_MAKEFILE: Likewise.
4811 * gc.mak: Likewise.
4812
4813 * libatomic_ops: Rename from "libatomic_ops-1.2".
4814
4815 * alloc.c (GC_version): Add "const" keyword.
4816 * alloc.c (GC_get_version): New public function.
4817 * include/gc.h (GC_get_version): New function declaration; update
4818 the comment for the GC version.
4819
4820 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4821 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
4822 (for the global variable declaration) again.
4823 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4824 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4825 GC_mark_stack_too_small, GC_mark_state): Likewise.
4826 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
4827 * include/private/pthread_support.h (GC_threads,
4828 GC_thr_initialized, GC_in_thread_creation): Likewise.
4829 * include/private/gc_priv.h: Likewise.
4830
4831 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
4832
4833 * allchblk.c (GC_hblkfreelist): Define as STATIC.
4834 * blacklst.c (GC_total_stack_black_listed): Likewise.
4835 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
4836 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
4837 declaration.
4838 * mark_rts.c (GC_stopped_mark): Add declaration (only if
4839 THREAD_LOCAL_ALLOC).
4840 * allchblk.c (GC_fail_count): Move the declaration out of
4841 GC_allochblk_nth(); remove "extern".
4842 * alloc.c (IF_THREADS): Remove unused macro.
4843 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
4844 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
4845 THREAD_LOCAL_ALLOC.
4846 * alloc.c (GC_bytes_found, GC_collection_in_progress,
4847 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
4848 Remove K&R-style "extern" for the declaration.
4849 * dbg_mlc.c (GC_free_inner): Likewise.
4850 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
4851 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
4852 * finalize.c (GC_fail_count): Likewise.
4853 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4854 GC_hdr_cache_misses): Likewise.
4855 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4856 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
4857 Likewise.
4858 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
4859 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
4860 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
4861 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
4862 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
4863 GC_page_size, GC_sysinfo, GC_black_list_spacing,
4864 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
4865 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
4866 GC_large_alloc_warn_suppressed, GC_blocked_sp,
4867 GC_activation_frame, GC_push_other_roots,
4868 GC_push_finalizer_structures, GC_push_thread_structures,
4869 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
4870 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
4871 GC_print_heap_obj, GC_have_errors, GC_print_stats,
4872 GC_dump_regularly, GC_backtraces, GC_print_back_height,
4873 GC_debug_generic_malloc_inner,
4874 GC_debug_generic_malloc_inner_ignore_off_page,
4875 GC_fl_builder_count, GC_mark_no, GC_help_marker,
4876 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
4877 * include/private/gcconfig.h (GC_SysVGetDataStart,
4878 GC_FreeBSDGetDataStart, GC_register_stackbottom,
4879 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
4880 * include/private/pthread_support.h (GC_threads,
4881 GC_thr_initialized, GC_in_thread_creation): Likewise.
4882 * malloc.c (GC_text_mapping): Likewise.
4883 * mallocx.c (GC_bytes_found): Likewise.
4884 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
4885 * mark_rts.c (GC_save_regs_ret_val): Likewise.
4886 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
4887 GC_setpagesize, GC_init_linux_data_start,
4888 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
4889 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
4890 GC_darwin_register_mach_handler_thread): Likewise.
4891 * pthread_support.c (GC_markers, GC_collection_in_progress):
4892 Likewise.
4893 * tests/test.c (GC_amiga_free_all_mem): Likewise.
4894 * thread_local_alloc.c (GC_gcjobjfreelist,
4895 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4896 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
4897 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
4898 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
4899 Move the declaration out of GC_init(); remove "extern".
4900 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
4901 compiler "unreachable code" warnings for ABORT callers (where
4902 ABORT is followed by a dummy return statement).
4903 * os_dep.c (GC_old_allocator): Move the declaration out of
4904 GC_default_push_other_roots(); remove "extern".
4905 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4906 Move the declaration out of GC_stop_world() and GC_start_world()
4907 (only if MPROTECT_VDB); remove "extern".
4908
4909 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
4910 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
4911 WinCE emulation and for custom WinCE 6 devices); add the comment.
4912 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
4913 of DWORD.
4914 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
4915 latest known stack_min value for WinCE (if GC_get_stack_min is
4916 defined as a macro); update the comments.
4917 * win32_threads.c (GC_wnt): Don't declare for WinCE.
4918
4919 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
4920 * gcj_mlc.c (GC_clear_stack): Remove declaration.
4921 * malloc.c (GC_clear_stack): Likewise.
4922 * mallocx.c (GC_clear_stack): Likewise.
4923 * typd_mlc.c (GC_clear_stack): Likewise.
4924 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
4925 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
4926 remove "lb" unnecessary cast to word.
4927 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
4928 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
4929 Move common declaration from typd_mlc.c and malloc.c; remove
4930 unnecessary result and "lb" parameter casts.
4931 * include/private/thread_local_alloc.h: Guard against duplicate
4932 header file inclusion.
4933 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
4934 the case when USE_MMAP is not defined.
4935 * pthread_support.c (GC_is_thread_tsd_valid): New internal
4936 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
4937 code from thread-local GC_malloc(); add FIXME for the condition.
4938 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
4939 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
4940 match that of its definition).
4941 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
4942 GC_gcjobjfreelist.
4943 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
4944 Remove unused declaration; don't include pthread.h.
4945 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
4946 (only if GC_ASSERTIONS).
4947 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
4948 instead of GC_lookup_thread().
4949 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
4950 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
4951 id different from that in os_dep.c).
4952
4953 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
4954 with GC_INLINE.
4955 * include/private/gc_priv.h (fixed_getenv): Likewise.
4956 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
4957 GC_INLINE.
4958 * mark_rts.c (rt_hash): Likewise.
4959 * win32_threads.c (GC_get_max_thread_index): Likewise.
4960 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
4961 "static"; define for Sun CC; define for VC++ (and other
4962 compilers).
4963 * pthread_support.c: Don't define __inline__ for non-GNU compilers
4964 (not needed anymore).
4965
4966 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
4967 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
4968 * Makefile.am: Likewise.
4969 * Makefile.dj: Likewise.
4970 * Makefile.direct: Likewise.
4971 * doc/README.win32: Add reference to gc.mak.
4972 * NT_X64_THREADS_MAKEFILE: Likewise.
4973
4974 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
4975
4976 * autogen.sh: Update.
4977
4978 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
4979 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
4980 * README.QUICK: Update information for Makefile.
4981 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
4982 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
4983 * tests/tests.am: Use it here to conditionally enable tracetest
4984 when possible.
4985
4986 * dyn_load.c (GC_wnt): Update the comment.
4987 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
4988 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
4989 macro); call GC_is_heap_base() only if check for Type succeeded.
4990
4991 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
4992 update the comment.
4993 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
4994
4995 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
4996 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
4997 ASSERT_CANCEL_DISABLED): New macros.
4998 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
4999 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
5000 Disable cancellation.
5001 (GC_add_to_our_memory): Check for overflow.
5002 * misc.c (GC_cancel_disable_count): declare.
5003 (GC_init, GC_write): Disable cancellation.
5004 (GC_init): Remove redundant GC_is_initialized test.
5005 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
5006 (GC_get_stack_base): Disable cancellation.
5007 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
5008 cancellation.
5009 * pthread_support.c (GC_mark_thread): Permanently disable
5010 cancellation.
5011 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
5012 Assert cancellation disabled.
5013 (fork handling): Disable cancellation, fix comment.
5014 (GC_pthread_create): Disable cancellation.
5015 (GC_unregister_my_thread): Disable cancellation.
5016 * Makefile.direct: Document NO_CANCEL_SAFE.
5017
5018 * Makefile: Remove outdated file (Makefile.direct should be used
5019 instead).
5020
5021 * include/gc.h (GC_use_DllMain): Refine the comment.
5022
5023 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
5024 EMPTY_GETENV_RESULTS.
5025 * configure.ac: Fix a typo.
5026 * Makefile.am: Likewise.
5027
5028 * checksums.c (GC_checksum, GC_update_check_page): Remove
5029 "register" keyword in local variable declarations (for the code
5030 used only for debugging or which is not time-critical).
5031 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
5032 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
5033 GC_print_smashed_obj, GC_debug_end_stubborn_change,
5034 GC_debug_invoke_finalizer): Likewise.
5035 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5036 * mallocx.c (GC_realloc): Likewise.
5037 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
5038 GC_clear_roots): Likewise.
5039 * misc.c (GC_write): Likewise.
5040 * os_dep.c (GC_print_callers): Likewise.
5041 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
5042 variable to "j" for the nested loop (just not to hide the similar
5043 variable in the outer one).
5044 * mark_rts.c (GC_print_static_roots): Output an error message
5045 using GC_err_printf() (instead of GC_printf()).
5046
5047 * configure.ac: Move include flag from ${INCLUDE} ...
5048 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
5049 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
5050 * configure.ac: Add documentation to all AC_DEFINE either directly
5051 or using AH_TEMPLATE.
5052
5053 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
5054 function (only if GC_WINMAIN_REDIRECT).
5055 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
5056 thru GC_do_blocking() instead of calling WaitForSingleObject()
5057 directly.
5058
5059 * pthread_support.c (start_mark_threads): Refine printed message.
5060 * win32_threads.c (GC_thr_init): Likewise.
5061
5062 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
5063 * Makefile.direct (NO_GETENV): Update the comment.
5064 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
5065 * include/gc.h (GC_WinMain): Remove declaration.
5066 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
5067 GC_WINMAIN_REDIRECT.
5068 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
5069 WinCE target unless GC_WINMAIN_REDIRECT is defined.
5070 * tests/test.c (WINMAIN_LPTSTR): New macro.
5071 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
5072 and GC_WINMAIN_WINCE_LPTSTR.
5073 * win32_threads.c (start_mark_threads): Add the comment for
5074 MARK_THREAD_STACK_SIZE.
5075 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
5076 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
5077 macro (only if GC_WINMAIN_REDIRECT).
5078 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
5079 * win32_threads.c (GC_WinMain): Add prototype (only if
5080 GC_WINMAIN_REDIRECT).
5081 * win32_threads.c (main_thread_args, WinMain): Rename
5082 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
5083 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
5084 use WINMAIN_THREAD_STACK_SIZE.
5085 * win32_threads.c (WinMain): Call GC_deinit() and
5086 DeleteCriticalSection() only if WinCE; add FIXME.
5087
5088 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
5089 value returned by GC_get_stack_base().
5090
5091 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
5092 Add the comment for.
5093 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
5094 Declare external variable (only if USE_MUNMAP).
5095 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
5096 value to 1 if GC_force_unmap_on_gcollect and restore it before
5097 unlocking (only if USE_MUNMAP).
5098 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
5099 information for.
5100 * include/gc.h (GC_set_force_unmap_on_gcollect,
5101 GC_get_force_unmap_on_gcollect): New public function prototype.
5102 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
5103 recognized.
5104 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
5105 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
5106 internal macro (used by GC_INIT only).
5107 * misc.c (GC_force_unmap_on_gcollect): New global variable.
5108 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
5109 environment variable (and set GC_force_unmap_on_gcollect).
5110 * misc.c (GC_set_force_unmap_on_gcollect,
5111 GC_get_force_unmap_on_gcollect): New public function.
5112 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
5113 to force the mode on if WM_HIBERNATE; restore the mode after
5114 GC_gcollect().
5115
5116 * Makefile.direct (LARGE_CONFIG): Update information.
5117 * include/gc.h (GC_stop_func): Refine the comment.
5118
5119 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
5120 Win32 (workaround for Wine bug).
5121
5122 * allchblk.c (GC_freehblk): Adjust local variables indentation.
5123 * mallocx.c (GC_generic_malloc_many): Likewise.
5124 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
5125 GC_calloc_explicitly_typed): Likewise.
5126 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
5127 brackets.
5128
5129 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
5130 * configure.ac: Process enable_parallel_mark option for Cygwin and
5131 Win32; define THREAD_LOCAL_ALLOC for Win32.
5132
5133 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
5134 PARALLEL_MARK (required for VC++ x86).
5135
5136 * dbg_mlc.c (GC_generate_random_backtrace): Call
5137 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
5138 if GC is disabled then print error message and return.
5139 * include/gc.h (GC_try_to_collect): Refine the comment.
5140 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
5141 refine the comment.
5142
5143 * add_gc_prefix.c: Move the file to the new "extra" directory.
5144 * AmigaOS.c: Likewise.
5145 * gcname.c: Likewise.
5146 * if_mach.c: Likewise.
5147 * if_not_there.c: Likewise.
5148 * MacOS.c: Likewise.
5149 * msvc_dbg.c: Likewise.
5150 * setjmp_t.c: Likewise.
5151 * threadlibs.c: Likewise.
5152 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
5153 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
5154 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
5155 with "extra" directory.
5156 * Makefile.am: Likewise.
5157 * Makefile.direct: Likewise.
5158 * Makefile.dj: Likewise.
5159 * Makefile.in: Likewise.
5160 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
5161 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5162 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5163 * NT_X64_THREADS_MAKEFILE: Likewise.
5164 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
5165 * gc.mak: Likewise.
5166 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
5167 directory.
5168 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
5169 directory.
5170 * doc/simple_example.html: Update for threadlibs.c.
5171 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
5172
5173 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
5174 function prototype.
5175 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
5176 single-threaded case) with an assertion check for the state to be
5177 not a "do-blocking" one.
5178 * include/private/gc_priv.h (blocking_data): Move the structure
5179 definition from pthread_support.c; change "fn" return type to void
5180 pointer.
5181 * include/private/gc_priv.h (GC_activation_frame_s): New structure
5182 type.
5183 * include/private/gc_priv.h (GC_push_all_stack_frames): New
5184 function declaration (only if THREADS).
5185 * include/private/gc_priv.h (GC_world_stopped): Don't declare
5186 unless THREADS.
5187 * include/private/gc_priv.h (GC_blocked_sp,
5188 GC_activation_frame_s): New declaration (only if not THREADS).
5189 * include/private/gc_priv.h (GC_push_all_register_frames): New
5190 function declaration (only for IA-64).
5191 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
5192 obsolete (unused) symbols.
5193 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
5194 Remove declaration (since it is static now).
5195 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
5196 (for code locality) and make STATIC.
5197 * mark_rts.c (GC_push_all_register_frames): New function (only for
5198 IA-64).
5199 * mark_rts.c (GC_push_all_stack_frames): New function (only if
5200 THREADS).
5201 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
5202 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
5203 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
5204 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
5205 function body (only for IA-64).
5206 * mark_rts.c (GC_push_current_stack): Call
5207 GC_push_all_stack_part_eager_frames() instead of
5208 GC_push_all_stack_partially_eager().
5209 * mark_rts.c (GC_push_current_stack): Call
5210 GC_push_all_register_frames() instead of GC_push_all_eager() for
5211 IA-64 backing store.
5212 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
5213 only).
5214 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
5215 GC_activation_frame): New global variables (only if not THREADS).
5216 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
5217 function (only if not THREADS).
5218 * misc.c (GC_do_blocking): Move the function from
5219 pthread_support.c.
5220 * include/private/pthread_support.h (GC_Thread_Rep): Add
5221 "activation_frame" field.
5222 * pthread_stop_world.c (GC_push_all_stacks): Call
5223 GC_push_all_stack_frames() and GC_push_all_register_frames instead
5224 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
5225 STACK_GROWS_UP here.
5226 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
5227 "fn" result back to "client_data" field.
5228 * pthread_support.c (GC_call_with_gc_active): New API function.
5229 * win32_threads.c (GC_call_with_gc_active): Likewise.
5230 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
5231 "activation_frame" fields.
5232 * win32_threads.c (GC_new_thread): Add assertion checking for
5233 thread_blocked_sp is NULL.
5234 * win32_threads.c (GC_do_blocking_inner): New function.
5235 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
5236 thread_blocked_sp is non-NULL.
5237 * win32_threads.c (GC_push_stack_for): Use thread
5238 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
5239 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
5240 thread before modifying its last_stack_min; call
5241 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
5242 the comments.
5243
5244 * alloc.c (GC_default_stop_func): New static variable (initialized
5245 to GC_never_stop_func).
5246 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
5247 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
5248 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
5249 else call GC_default_stop_func() before getting "current_time".
5250 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
5251 FIXME comment).
5252 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
5253 replacing GC_never_stop_func with GC_default_stop_func (if
5254 possible).
5255 * alloc.c (GC_gcollect): Use GC_default_stop_func.
5256 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
5257 (instead of GC_never_stop_func) unless it is trigged due to out of
5258 memory; don't increment GC_fail_count and don't output warning
5259 (before trying to collect again) in case the collection has been
5260 interrupted (by GC_default_stop_func) and the heap expansion has
5261 failed too.
5262 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
5263 prototypes.
5264
5265 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
5266 GC_get_writable_length() result.
5267
5268 * configure.ac: Don't use -lpthread -ldl for Cygwin.
5269
5270 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
5271
5272 * include/private/gcconfig.h (GWW_VDB): Undefine if
5273 USE_GLOBAL_ALLOC (since incompatible).
5274 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
5275 is defined.
5276 * os_dep.c (GC_unmap_threshold): Declare (for use in
5277 GC_init_win32) if USE_MUNMAP.
5278 * os_dep.c (GC_init_win32): Turn off memory unmapping if
5279 GlobalAlloc() is used.
5280 * os_dep.c (GC_win32_get_mem): Define and use new
5281 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
5282 MPROTECT_VDB is in use.
5283
5284 * Makefile: Replace "version.h" with "include/gc_version.h".
5285 * include/gc_version.h: Likewise.
5286
5287 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
5288 (before returning FALSE) for convenience.
5289
5290 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
5291 string.
5292 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
5293 * win32_threads.c (GC_delete_thread): Likewise.
5294 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
5295 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
5296 unnecessary cast for WARN argument.
5297 * pthread_support.c (start_mark_threads): if pthread_create()
5298 failed then don't try to create other marker threads and (after
5299 printing a warning) adjust GC_markers and GC_parallel values; log
5300 GC_markers value (possibly adjusted) after that.
5301
5302 * win32_threads.c (start_mark_threads): if pthread_create() is
5303 failed then don't try to create other marker threads and (after
5304 printing a warning) adjust GC_markers and GC_parallel values.
5305 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
5306 the definition upper (to be visible in start_mark_threads()).
5307 * win32_threads.c (start_mark_threads): if CreateThread() or
5308 _beginthreadex() is failed then don't try to create other marker
5309 threads and (after printing a warning) adjust GC_markers,
5310 GC_parallel values, and destroy the event objects (either only
5311 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
5312 not a single thread is created).
5313 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
5314 adjusted) after start_mark_threads() call.
5315
5316 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
5317 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
5318
5319 * include/private/gc_priv.h: Change include of config.h to
5320 private/config.h.
5321 * include/private/gc_pmark.h: Likewise.
5322 * gc_cpp.cc: Likewise.
5323 * tests/test.c: Likewise.
5324 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
5325 undefine GC_BUILD.
5326
5327 * finalize.c (GC_general_register_disappearing_link): Return
5328 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
5329 respectively).
5330 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
5331 * include/gc.h (GC_register_disappearing_link,
5332 GC_general_register_disappearing_link): Update the comment.
5333 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
5334 * finalize.c (GC_general_register_disappearing_link,
5335 GC_register_finalizer_inner): Recalculate the hash table index
5336 after GC_oom_fn succeeded (since the table may grow while not
5337 holding the lock) and check again that the entry is still not in
5338 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
5339 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
5340 local variable (to prevent a compiler warning).
5341 * finalize.c (GC_register_finalizer_inner): Don't modify the data
5342 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
5343 (due to out of memory).
5344
5345 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
5346 suppress compiler "variable might be uninitialized" warnings.
5347
5348 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
5349 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
5350 WinCE.
5351 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
5352 HANDLE thru word type (to avoid a compiler warning) for WinCE.
5353 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
5354 (only if DONT_USE_SIGNALANDWAIT).
5355 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
5356 and GC_marker_cv for each helper thread (only if
5357 DONT_USE_SIGNALANDWAIT).
5358 * win32_threads.c (GC_mark_mutex_state): New static variable (only
5359 if DONT_USE_SIGNALANDWAIT).
5360 * win32_threads.c (GC_mark_mutex_waitcnt,
5361 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
5362 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
5363 Use InterlockedExchange() over GC_mark_mutex_state (instead of
5364 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
5365 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
5366 Implement wait/broadcast primitives using Win32 multiple events
5367 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
5368 using Win32 SignalObjectAndWait).
5369 * win32_threads.c (GC_thr_init): Don't declare hK32 local
5370 variable, don't check for GC_wnt, and don't initialize
5371 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
5372
5373 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
5374 if GC_print_stats (after getting "done_time").
5375 * finalize.c (GC_old_dl_entries): New static variable (only if not
5376 SMALL_CONFIG).
5377 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
5378 if not SMALL_CONFIG).
5379 * finalize.c (GC_print_finalization_stats): Define if and only if
5380 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
5381 instead of GC_printf(); use "%lu" (instead of "%u") print format
5382 specifier; use unsigned long type for "ready" counter (for LP64
5383 targets).
5384 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
5385 here (since it is called from GC_finish_collection()).
5386 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
5387 ECOS).
5388
5389 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
5390 GC_init() one.
5391 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
5392 * mallocx.c (GC_generic_malloc_many): Likewise.
5393 * misc.c (GC_enable_incremental): Likewise.
5394 * alloc.c (GC_expand_hp): Update the comment.
5395 * mark.c (GC_obj_kinds): Likewise.
5396 * win32_threads.c (GC_allow_register_threads): Likewise.
5397 * private/gc_priv.h (GC_init_inner): Remove function declaration.
5398 * misc.c (GC_init_inner): Replace with public GC_init().
5399
5400 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
5401 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
5402 GC_gcj_fake_mark_proc (aborting with the appropriate message)
5403 instead.
5404
5405 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
5406 to out of memory) then don't increment GC_n_heap_bases and don't
5407 call VirtualAlloc() again (with MEM_COMMIT).
5408 * os_dep.c (GC_remap): Abort with a more informatory message if
5409 VirtualAlloc() fails due to out of memory; update FIXME.
5410
5411 * Makefile: Fix typo for msvc_dbg.c.
5412 * Makefile.direct: Likewise.
5413 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
5414 "GC_".
5415 * Makefile.dj: Don't reference remove files (nursery.c,
5416 gc_nursery.h, gc_copy_descr.h).
5417 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
5418 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5419 * NT_THREADS_MAKEFILE: Likewise.
5420 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5421 * NT_X64_THREADS_MAKEFILE: Likewise.
5422 * gc.mak: Likewise.
5423 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
5424 defined in the source files).
5425 * NT_THREADS_MAKEFILE: Likewise.
5426 * NT_X64_THREADS_MAKEFILE: Likewise.
5427 * gc.mak: Likewise.
5428 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
5429 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
5430 GC_THREADS.
5431 * NT_THREADS_MAKEFILE: Likewise.
5432 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5433 * NT_X64_THREADS_MAKEFILE: Likewise.
5434 * gc.mak: Likewise.
5435 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
5436 compiler warnings.
5437 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5438 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
5439 before "$*.C" (and "$*.CPP").
5440 * NT_X64_THREADS_MAKEFILE: Likewise.
5441
5442 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
5443 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
5444 * doc/README.win64: Add info about mingw-w64; add note for VC++
5445 warnings suppression.
5446
5447 * os_dep.c (GC_forward_exception): Fix logic in several places.
5448 (OSX-specific)
5449
5450 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
5451
5452 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
5453 from Makefile.
5454 * Makefile: Remove the information about "define arguments" (which
5455 is incomplete and outdated compared to that in Makefile.direct);
5456 add help reference to Makefile.direct.
5457 * Makefile.dj: Likewise.
5458
5459 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
5460 Replace "STATIC" with "static" in the definition (since the
5461 symbols aren't prefixed with "GC_").
5462 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
5463 start_mark_threads, mark_mutex, builder_cv, mark_cv,
5464 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
5465 Likewise.
5466 * pthread_support.c (GC_wait_builder): Define as STATIC.
5467 * win32_threads.c (GC_wait_builder): Likewise.
5468
5469 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
5470 API function.
5471 * include/gc_pmark.h (GC_get_heap_size_inner,
5472 GC_get_free_bytes_inner): New function declaration.
5473
5474 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
5475 * include/gc_config_macros.h: Likewise.
5476 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
5477 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
5478 internal use).
5479 * include/gc_config_macros.h: Always include stddef.h if GCC.
5480 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
5481 same way as for MinGW.
5482 * include/gc_config_macros.h (GC_API): Group the definition for
5483 all cases together (check for GC_DLL only once).
5484 * include/gc_pthread_redirects.h: Group non-Darwin code together.
5485 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
5486
5487 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
5488 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
5489 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
5490 comment for.
5491 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
5492 macro).
5493 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
5494 FIXME and the comment for WinCE.
5495 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
5496 (new macro).
5497 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
5498 WinCE (since backtrace() is unimplemented).
5499 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
5500 (since static).
5501 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
5502 definition to be above GC_is_heap_base().
5503 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
5504 (both for MinGW and CeGCC toolchains).
5505 * include/private/gcconfig.h: Recognize __CEGCC__ and
5506 __MINGW32CE__ (as synonyms for __WIN32_WCE).
5507 * include/private/gcconfig.h: If SH4 then don't set config
5508 parameters for SH.
5509 * include/private/thread_local_alloc.h (GC_key_create): Don't
5510 abort on failures, just return -1 in these cases (this also
5511 prevents compilation error for targets where ABORT is defined
5512 indirectly as an inline assembler sequence).
5513 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
5514 the GCC-based cross-compiler.
5515 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
5516 WRAP_MARK_SOME is defined; define also for WinCE case; don't
5517 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
5518 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
5519 the comment.
5520 * misc.c: Include signal.h after gc_pmark.h included; check for
5521 MSWINCE instead of _WIN32_WCE.
5522 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
5523 * misc.c: Don't include <crtdbg.h> for WinCE targets.
5524 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
5525 CeGCC toolchain).
5526 * misc.c (GC_write): Use OutputDebugStringW() instead of
5527 _CrtDbgReport() for WinCE targets.
5528 * os_dep.c (GC_least_described_address): Define as STATIC.
5529 * os_dep.c (GC_register_data_segments): Fix code indentation.
5530 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
5531 (to prevent a compiler warning).
5532 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
5533 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
5534 include assert.h instead.
5535 * tests/test.c (tiny_reverse_test): Define and use
5536 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
5537 useful for WinCE.
5538 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
5539 for WinCE (since thread Id is used as a "real" thread handle).
5540 * win32_threads.c (THREAD_HANDLE): New macro.
5541 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
5542 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
5543 WinCE.
5544 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
5545 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
5546 for MSWINCE.
5547 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
5548 close thread handle on WinCE (since it's a thread Id).
5549 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
5550 MPROTECT-related code (for the case if MPROTECT_VDB would be
5551 implemented for WinCE).
5552 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
5553 Use THREAD_HANDLE(t) to obtain thread handle.
5554 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
5555 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
5556 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
5557 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
5558 parallel mark support).
5559 * win32_threads.c (start_mark_threads): Use int type for "i" local
5560 variable (instead of "unsigned") to prevent a compiler warning.
5561 * win32_threads.c (start_mark_threads): Don't check CreateThread()
5562 result for -1; call CloseHandle() for the handle created by
5563 CreateThread() (on WinCE); don't use errno (since errno.h is
5564 missing on some targets like WinCE) when printing warning on a
5565 marker thread creation failure.
5566 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
5567 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
5568 for non-zero signalObjectAndWait_func (to make the code compilable
5569 for WinCE).
5570 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
5571 use GC_sysinfo to get processors count if WinCE; don't check for
5572 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
5573 GC_PTHREADS_PARAMARK.
5574 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
5575 macro (useful for testing parallel marking on WinCE).
5576 * win32_threads.c (GC_win32_start, main_thread_start): Define as
5577 STATIC.
5578 * win32_threads.c: Don't define main_thread_args,
5579 main_thread_start(), WinMain() for WinCE if GC_DLL.
5580 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
5581 (since the stack size parameter is ignored on WinCE).
5582 * win32_threads.c (main_thread_start): Remove forward declaration;
5583 place its definition before WinMain() one.
5584 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
5585 WaitForSingleObject() failed (for the main thread).
5586
5587 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
5588 a function.
5589 * allchblk.c (GC_unmap_threshold): New global variable definition
5590 (initialized to MUNMAP_THRESHOLD).
5591 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
5592 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
5593 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
5594 * misc.c (GC_unmap_threshold): New variable declaration.
5595 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
5596 environment variable to set GC_unmap_threshold value (only if
5597 USE_MUNMAP).
5598
5599 * dbg_mlc.c (OFN_UNSET): New macro (to detect
5600 GC_register_finalizer() failures).
5601 * dbg_mlc.c (store_old): Add a check for register_finalizer()
5602 failure caused by an out-of-memory event (leave *ofn and *ocd
5603 unmodified in that case).
5604 * dbg_mlc.c (GC_debug_register_finalizer,
5605 GC_debug_register_finalizer_no_order,
5606 GC_debug_register_finalizer_unreachable,
5607 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
5608 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
5609 as in GC_register_finalizer_inner()).
5610
5611 * Makefile.direct (GC_DLL): Add the comment for.
5612 * doc/README.macros: Fix a typo.
5613 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
5614 * doc/README.macros (__STDC__): Remove info.
5615 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
5616 GC_generate_random_valid_address, GC_print_backtrace,
5617 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
5618 GC_API and GC_CALL to function definition.
5619 * malloc.c (GC_generic_malloc): Likewise.
5620 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
5621 * mark.c (GC_mark_and_push): Likewise.
5622 * misc.c (GC_new_free_list_inner, GC_new_free_list,
5623 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
5624 Likewise.
5625 * include/gc_backptr.h (GC_get_back_ptr_info,
5626 GC_generate_random_heap_address, GC_generate_random_valid_address,
5627 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
5628 GC_CALL to function prototype.
5629 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
5630 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
5631 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
5632 GC_register_describe_type_fn): Likewise.
5633 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
5634 GC_generic_malloc_words_small): Likewise.
5635 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
5636 * include/private/gc_pmark.h: Likewise.
5637 * include/private/gc_priv.h: Likewise.
5638 * tests/test.c: Likewise.
5639 * gc_cpp.cc: Define GC_BUILD.
5640 * include/private/gc_pmark.h: Likewise.
5641 * include/private/gc_priv.h: Likewise.
5642 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
5643 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
5644 definition.
5645 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
5646 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
5647 pthread_detach, pthread_create): Likewise.
5648 * win32_threads.c (GC_pthread_join, GC_pthread_create,
5649 GC_pthread_sigmask, GC_pthread_detach): Likewise.
5650 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
5651 * include/gc_backptr.h: Include "gc.h".
5652 * include/gc_backptr.h: Use extern "C" for the exported functions.
5653 * include/gc_mark.h: Likewise.
5654 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
5655 GC_XXX_THREADS is defined.
5656 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
5657 Move the definitions below the place where GC_NETBSD_THREADS and
5658 GC_DGUX386_THREADS are defined.
5659 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
5660 is defined) for GCC.
5661 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
5662 same way as for VC++); define for GCC v4+ (other than already
5663 recognized MinGW/Cygwin) as a "default" visibility attribute if
5664 GC_DLL is defined.
5665 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
5666 New macro.
5667 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5668 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5669 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5670 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5671 GC_debug_malloc_atomic, GC_debug_strdup,
5672 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5673 GC_debug_malloc_ignore_off_page,
5674 GC_debug_malloc_atomic_ignore_off_page,
5675 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
5676 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5677 GC_gcj_malloc_ignore_off_page): Likewise.
5678 * include/gc.h (GC_malloc, GC_malloc_atomic,
5679 GC_malloc_uncollectable, GC_malloc_stubborn,
5680 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5681 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5682 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
5683 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
5684 GC_debug_malloc_atomic_ignore_off_page,
5685 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
5686 (for the first argument).
5687 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5688 GC_gcj_malloc_ignore_off_page): Likewise.
5689 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
5690 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
5691 (for the second argument).
5692 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5693 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5694 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
5695 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
5696 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
5697 GC_register_displacement, GC_debug_register_displacement,
5698 GC_try_to_collect, GC_malloc_ignore_off_page,
5699 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5700 GC_debug_malloc_atomic, GC_debug_strdup,
5701 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5702 GC_debug_malloc_ignore_off_page,
5703 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
5704 GC_debug_realloc, GC_debug_malloc_replacement,
5705 GC_debug_realloc_replacement, GC_finalization_proc,
5706 GC_register_finalizer, GC_debug_register_finalizer,
5707 GC_register_finalizer_ignore_self,
5708 GC_debug_register_finalizer_ignore_self,
5709 GC_register_finalizer_no_order,
5710 GC_debug_register_finalizer_no_order,
5711 GC_register_finalizer_unreachable,
5712 GC_debug_register_finalizer_unreachable,
5713 GC_register_disappearing_link,
5714 GC_general_register_disappearing_link,
5715 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
5716 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
5717 GC_call_with_alloc_lock, GC_stack_base_func,
5718 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
5719 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
5720 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
5721 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
5722 GC_endthreadex): Comment out (or remove if single and meaningless)
5723 function argument names (to avoid identifiers out of the name
5724 space).
5725 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
5726 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
5727 * include/gc.h (GC_try_to_collect): Update the comment.
5728 * include/gc.h (GC_size, GC_register_my_thread): Add const
5729 qualifier for the argument referent.
5730 * misc.c (GC_size): Likewise.
5731 * pthread_support.c (GC_register_my_thread_inner,
5732 GC_register_my_thread): Likewise.
5733 * win32_threads.c (GC_register_my_thread_inner,
5734 GC_register_my_thread): Likewise.
5735 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
5736 (define instead of GC_INIT() for Cygwin and AIX).
5737 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
5738 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
5739 GC_INITIAL_HEAP_SIZE): Recognize new macro.
5740 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
5741 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
5742 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
5743 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
5744 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
5745 * include/gc_mark.h: Prefix GC_H with '_'.
5746 * include/gc_mark.h (GC_least_plausible_heap_addr,
5747 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
5748 for the public variable declaration.
5749 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
5750 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
5751 * include/gc_pthread_redirects.h (GC_pthread_create,
5752 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
5753 Use GC_API for the wrapper prototype.
5754 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
5755 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
5756 before redirecting.
5757 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
5758 GC_incr_bytes_freed(); remove FIXME.
5759 * include/private/gc_priv.h (GC_make_closure,
5760 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
5761 function.
5762 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
5763 the target.
5764
5765 * finalize.c (GC_general_register_disappearing_link,
5766 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
5767 guard for LOCK/UNLOCK().
5768 * finalize.c (GC_general_register_disappearing_link,
5769 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
5770 the lock (to prevent data races).
5771 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
5772 GC_gcj_malloc_ignore_off_page): Likewise.
5773 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5774 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
5775 instead of GC_oom_fn (to prevent data races).
5776 * malloc.c (GC_generic_malloc): Likewise.
5777 * mallocx.c (GC_memalign): Likewise.
5778 * pthread_support.c (pthread_create): Likewise.
5779 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
5780 last_finalized_no value to prevent data races.
5781 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
5782 GC_set_find_leak, GC_set_finalize_on_demand,
5783 GC_set_java_finalization, GC_set_finalizer_notifier,
5784 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
5785 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
5786 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
5787 the comment.
5788 * misc.c (GC_set_oom_fn): Likewise.
5789 * include/gc.h (GC_general_register_disappearing_link): Refine the
5790 comment (replace "soft" word with "weak").
5791 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
5792 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
5793 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
5794 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
5795
5796 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
5797 "private/dbg_mlc.h" before it.
5798 * malloc.c: Likewise.
5799 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
5800 for WinCE (since deprecated); evaluate strlen() only once; don't
5801 set errno for WinCE.
5802 * malloc.c (GC_strdup): Likewise.
5803 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
5804 * include/gc.h (GC_unregister_my_thread): Refine the comment.
5805 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
5806 Don't declare for WinCE.
5807 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
5808 * include/gc.h (GC_WinMain): Remove GC_API.
5809 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
5810 lpCmdLine.
5811 * tests/test.c (GC_WinMain): Likewise.
5812 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
5813 * include/gc_config_macros.h (ptrdiff_t): Guard with
5814 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
5815 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
5816 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
5817 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
5818 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
5819 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
5820 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
5821 of include <atomic_ops.h>.
5822 * include/private/gc_priv.h: Likewise.
5823 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
5824 Don't export (replace GC_API to "extern").
5825 * win32_threads.c (GC_allocate_ml): Don't export.
5826 * include/private/gc_priv.h (DebugBreak): Define as macro for
5827 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
5828 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
5829 (since "UNALIGNED" is defined in winnt.h of WinCE).
5830 * mark.c (UNALIGNED): Likewise.
5831 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
5832 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
5833 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
5834 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
5835 for WinCE (since __declspec(thread) is unsupported).
5836 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
5837 Define for WinCE (if undefined).
5838 * malloc.c (GC_malloc): Remove outdated comment about disabling
5839 signals.
5840 * misc.c: Don't include <tchar.h> (since not used anymore and may
5841 break TEXT() macro defined in winnt.h).
5842 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
5843 InitializeCriticalSectionAndSpinCount() for WinCE.
5844 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
5845 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
5846 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
5847 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
5848 only); move the code from GC_write(); replace GETENV() with
5849 GetEnvironmentVariable(); replace CreateFileA() with
5850 CreateFile(); use TEXT() macro (for Unicode support); replace
5851 strcat() with memcpy() (since deprecated in WinCE).
5852 * misc.c (GC_write): Define as STATIC.
5853 * win32_threads.c (GC_attached_thread): Likewise.
5854 * misc.c (GC_write): Use GC_CreateLogFile().
5855 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
5856 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
5857 (Win32 only) if DONT_USE_USER32_DLL is defined.
5858 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
5859 WinCE).
5860 * misc.c (GC_abort): Use a more user-friendly abort if
5861 NO_DEBUGGING (Win32 only).
5862 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
5863 THREADS).
5864 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
5865 (for Unicode support); check GetModuleHandle() result.
5866 * tests/test.c: Don't define assert for WinCE (since may be
5867 redefined by "assert.h" included from libatomic_ops).
5868 * tests/test.c (FAIL): Define as ABORT for all targets (except
5869 for PCR).
5870 * tests/test.c (n_tests): Don't use AO_t.
5871 * tests/test.c (check_heap_stats): Don't cast n_tests.
5872 * tests/test.c (inc_int_counter): New function (for n_tests atomic
5873 incrementation).
5874 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
5875 * tests/test.c (run_one_test): Avoid unbalanced brackets in
5876 #if-#else-#endif blocks.
5877 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
5878 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
5879 * tests/test.c (check_heap_stats): Replace
5880 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
5881 "unreachable code" compiler warning.
5882 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
5883 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
5884 * tests/test.c (thr_window): Replace "L" string prefix with
5885 TEXT().
5886 * thread_local_alloc.c: Check THREADS is defined (to prevent other
5887 compiler errors and warnings otherwise).
5888 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
5889 GC_use_DllMain()).
5890 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
5891 the comments for.
5892 * win32_threads.c (GC_register_my_thread_inner): Recognize
5893 DONT_IMPORT_GETCURTHREAD macro.
5894 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
5895 DllMain support if needed).
5896 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
5897 thread registration is unsupported for a given configuration.
5898 * win32_threads.c (GC_use_DllMain): Update the comment; refine
5899 ABORT message.
5900 * win32_threads.c (GC_use_DllMain,
5901 GC_started_thread_while_stopped, GC_register_my_thread_inner,
5902 GC_lookup_thread_inner, GC_delete_gc_thread,
5903 GC_allow_register_threads, GC_lookup_pthread,
5904 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
5905 Check for GC_NO_DLLMAIN.
5906 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
5907 DllMain): Don't define if GC_NO_DLLMAIN.
5908 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
5909 variables only if not GC_NO_DLLMAIN (to suppress compiler
5910 warning).
5911 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
5912 CreateThread() instead of _beginthreadex() for WinCE.
5913 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
5914 New macros defined (used by start_mark_threads(), WinMain()).
5915 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
5916 WinCE for now (since getenv(), GetProcessAffinityMask() and
5917 SignalObjectAndWait() are missing on WinCE).
5918 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
5919 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
5920 TEXT() macro (for Unicode support).
5921
5922 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
5923 callback).
5924 * include/gc.h (GC_register_has_static_roots_callback): Use
5925 GC_has_static_roots_func type.
5926 * dyn_load.c (GC_has_static_roots,
5927 GC_register_has_static_roots_callback): Likewise.
5928 * dyn_load.c (GC_has_static_roots,
5929 GC_register_has_static_roots_callback): Define on all platforms.
5930 * dyn_load.c (GC_register_dynlib_callback,
5931 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
5932 functions definition with the ANSI C one.
5933 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
5934 "callback" (initialized from GC_has_static_roots) to minimize data
5935 races.
5936 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
5937 GC_cond_add_roots): Define as STATIC.
5938 * mark_rts.c (GC_remove_roots_inner): Likewise.
5939 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
5940 sections smaller than pointer size (just to avoid acquiring the
5941 lock unnecessarily).
5942 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
5943 only for DARWIN_DEBUG).
5944 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
5945 LOCK + GC_add_roots_inner() + UNLOCK.
5946 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
5947 callback (if set) holding the lock; if it returns 0 then don't call
5948 GC_add_roots_inner() for that region.
5949 * dyn_load.c (GC_register_has_static_roots_callback): Put
5950 "callback" value to GC_has_static_roots on all platforms.
5951 * dyn_load.c (GC_has_static_roots): Update the comments.
5952 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
5953 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
5954 * include/private/gc_priv.h (struct roots): Likewise.
5955 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
5956 to mark_rts.c and declare it as STATIC.
5957 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
5958 prototype.
5959 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
5960 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
5961 * misc.c (GC_init_inner): Likewise.
5962 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
5963 all the code from GC_exclude_static_roots(); add the comment.
5964 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
5965 add alignment assertion for the lower bound; add assertion for the
5966 lower bound to be less than the upper one.
5967 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
5968 the upper bound (round down to be of a pointer-aligned value);
5969 return in case of an empty range.
5970 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
5971 GC_exclude_static_roots_inner().
5972 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
5973 in case of a do-nothing case (before acquiring the lock).
5974
5975 * finalize.c (GC_fail_count): New external variable declaration.
5976 * finalize.c (GC_reset_finalizer_nested,
5977 GC_check_finalizer_nested): New function declarations (if THREADS
5978 only).
5979 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
5980 static global variables (used internally by GC_finalize() and
5981 GC_check_finalizer_nested()).
5982 * finalize.c (GC_check_finalizer_nested): New static function
5983 definition (only if not THREADS, used internally by
5984 GC_notify_or_invoke_finalizers() to minimize the probability of
5985 a deep recursion when a client finalizer tries to allocate GC
5986 memory).
5987 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
5988 call GC_reset_finalizer_nested()) if last heap expansion failed.
5989 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
5990 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
5991 last_finalizer_notification variables holding the lock (to avoid
5992 data races).
5993 * finalize.c (GC_finalizer_notifier): Add comment.
5994 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
5995 for an empty finalization queue (only if THREADS and not
5996 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
5997 * finalize.c (GC_notify_or_invoke_finalizers): Call
5998 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
5999 if appropriate.
6000 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
6001 finalizer_nested and finalizer_skipped fields (for internal use
6002 by the multi-threaded GC_check_finalizer_nested()).
6003 * win32_threads.c (GC_Thread_Rep): Likewise.
6004 * pthread_support.c (GC_reset_finalizer_nested,
6005 GC_check_finalizer_nested): New function definitions (the
6006 multi-threaded variants of that in finalize.c).
6007 * win32_threads.c (GC_reset_finalizer_nested,
6008 GC_check_finalizer_nested): Likewise.
6009
6010 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
6011 anymore and GCC produces a warning for it).
6012 * alloc.c (GC_stopped_mark): Adjust printf argument type
6013 specifier.
6014 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
6015 the case when the configuration information comes from a config.h
6016 file).
6017 * checksums.c: Likewise.
6018 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
6019 keyword instead of "unused".
6020 * include/gc_allocator.h: Fix typos in comments.
6021 * thread_local_alloc.c: Likewise.
6022 * include/javaxfc.h (GC_finalize_all): Update comment.
6023 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
6024 GC_API and serves only as a marker for the private but exported
6025 symbols used by test.c only).
6026 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
6027 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
6028 GC_API_PRIV one.
6029 * include/private/gc_priv.h (GC_fo_entries): Don't export it
6030 outside a DLL.
6031 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
6032 designated to check the arguments correctness of printf-like
6033 functions (currently works only for GCC v3+).
6034 * include/private/gc_priv.h (GC_printf, GC_err_printf,
6035 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
6036
6037 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
6038 Define for FreeBSD 7.0+.
6039
6040 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
6041
6042 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
6043 comment.
6044
6045 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
6046 free blocks have different mapping status.  Correctly handle gap
6047 between blocks.
6048 (GC_split_block): Remove dead code setting hb_flags.  Add comment.
6049 (GC_allochblk): Split blocks also in generational-only mode.
6050 * os_dep.c (GC_unmap_gap): Don't really use munmap.
6051
6052 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
6053 not USE_MUNMAP case.
6054
6055 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
6056 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
6057 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
6058 PARALLEL_MARK, STATIC): Update the comments.
6059 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
6060 recognized (only if MPROTECT_VDB).
6061 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
6062 Add the comments for.
6063 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
6064 environment variable (only if MPROTECT_VDB, if the variable is
6065 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
6066 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
6067 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
6068 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
6069 the future).
6070 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
6071 space returned to OS (GC_unmapped_bytes).
6072 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
6073 comments.
6074 * misc.c (GC_get_unmapped_bytes): New API function.
6075 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
6076 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
6077 "ifdef MSWIN32" one (for Cygwin).
6078
6079 * pthread_support.c (GC_allow_register_threads): New API function.
6080 * win32_threads.c (GC_allow_register_threads): Likewise.
6081 * include/gc.h (GC_allow_register_threads): New API prototype.
6082 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
6083 Update the comments.
6084 * pthread_support.c (GC_register_my_thread): Check the collector
6085 is in the multi-threaded mode.
6086 * win32_threads.c (GC_register_my_thread): Likewise.
6087
6088 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
6089 instead, following Ivan's original patch.
6090
6091 * allchblk.c (GC_allochblk_nth): Add assertion.
6092 * checksums.c: Add GC_record_fault, GC_was_faulted,
6093 CC_n_faulted_dirty_errors.
6094 (GC_check_dirty): Remove register declarations, print
6095 dirty bit errors on faulted pages.
6096 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
6097 * os_dep.c (GC_remove_protection): Compute index correctly.
6098
6099
6100 == [7.2alpha2] 2009-06-12 ==
6101
6102 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
6103 calls into a single one (for output atomicity).
6104 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
6105 GC_finalization_failures variable; check the result of
6106 GC_general_register_disappearing_link() (for lack of memory)
6107 instead.
6108 * finalize.c (GC_finalization_failures): Remove unused global
6109 variable.
6110 * finalize.c (GC_general_register_disappearing_link,
6111 GC_general_register_disappearing_link): Don't update the value of
6112 GC_finalization_failures (since unused).
6113 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
6114 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
6115 word type now (as FIXUP_POINTER requires numeric argument).
6116 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
6117 requires the first parameter of word type.
6118 * mark.c (PUSH_GRANULE): Likewise.
6119 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
6120 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
6121 GC_finalizer_notifier directly, instead
6122 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
6123 * include/javaxfc.h: Clarify GC_finalize_all comment.
6124 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
6125 after) for configuration information.
6126 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
6127 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
6128 variable for NULL before dereferencing it, return GC_oom_fn() in
6129 this case.
6130 * typd_mlc.c (GC_malloc_explicitly_typed,
6131 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
6132 suppress compiler warning (for uninitialized "lg" variable).
6133
6134 * win32_threads.c (GC_unregister_my_thread): add false assertion
6135 in unreachable code.
6136
6137 * pthread_support.c (GC_inner_start_routine): Don't release the
6138 GC lock between GC_register_my_thread_inner() and
6139 GC_init_thread_local() calls (post the "registered" even after
6140 calling GC_init_thread_local()).
6141 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
6142 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
6143 acquire the GC lock only once.
6144 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
6145 directly instead of GC_register_my_thread() since I_HOLD_LOCK
6146 and our (main) thread is not registered yet (add assertion for it).
6147 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
6148 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
6149 * win32_threads.c (GC_lookup_thread): Remove unused function.
6150 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
6151 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
6152 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
6153 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
6154 (for Cygwin).
6155 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
6156 (inside GC_ASSERT) to prevent compiler warning.
6157 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
6158 PARALLEL_MARK.
6159 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
6160 to a place before GC_get_next_stack().
6161 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
6162 as in pthread_support.c).
6163 * win32_threads.c (marker_last_stack_min): New static arrays (the
6164 same semantics as for last_stack_min of GC_Thread_Rep).
6165 * win32_threads.c (GC_get_next_stack): Handle marker threads.
6166 * win32_threads.c (GC_mark_thread): Save the current stack pointer
6167 to marker_[b]sp.
6168 * win32_threads.c (start_mark_threads): Initialize
6169 marker_last_stack_min elements (to "unset" value).
6170
6171 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
6172 GC_set_finalize_on_demand, GC_set_java_finalization,
6173 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
6174 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
6175 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
6176 Change return type to void (these API functions no longer return
6177 the old value).
6178 * include/gc.h: Likewise.
6179 * tests/test.c (main, WinMain, test): Remove explicit cast to void
6180 for GC_set_warn_proc().
6181 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
6182 GC_get_finalize_on_demand, GC_get_java_finalization,
6183 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
6184 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
6185 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
6186 API functions (to get the current value of the corresponding R/W
6187 public variables).
6188 * include/gc.h: Likewise.
6189 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
6190 Update the comment.
6191 * misc.c (GC_ignore_warn_proc): New API call-back function.
6192 * include/gc.h (GC_ignore_warn_proc): Likewise.
6193 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
6194 GC_get_non_gc_bytes): New API setter and getter functions (for the
6195 public GC_find_leak and GC_non_gc_bytes variables, respectively).
6196 * include/gc.h: Likewise.
6197 * include/gc.h (GC_memalign): Add proto to GC API.
6198 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
6199 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
6200 remove GC_memalign() proto.
6201 * misc.c (GC_write): Use multi-byte (A) variants of Win32
6202 GetModuleFileName() and CreateFile().
6203 * tests/test.c (main): Replace K&R-style function definition with the
6204 ANSI C one.
6205
6206 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
6207 recognized (for Linux on ARM32 without glibc).
6208 * include/private/gcconfig.h (STRTOULL): Define for all targets
6209 (define as "strtoul" for most targets except for LLP64/Win64).
6210 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
6211 (cast the result to word type) to decode values of "GC_TRACE",
6212 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
6213 variables.
6214
6215 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
6216 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
6217
6218 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
6219 AO_load in assertion.
6220
6221 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
6222 is defined as FALSE (otherwise the size of dll_thread_table is near
6223 200 KiB for 32-bit).
6224 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
6225 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
6226 backing_store_ptr fields for IA64 support.
6227 * win32_threads.c (GC_register_my_thread_inner): Set
6228 backing_store_end field to reg_base value for IA64 (same as in
6229 pthread_support.c).
6230 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
6231 "right" places, remove ';'.
6232 * win32_threads.c (GC_fault_handler_lock): Declare only
6233 if MPROTECT_VDB (and not WinCE).
6234 * win32_threads.c (GC_suspend): Acquire and release
6235 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
6236 * win32_threads.c (GC_suspend): Define as STATIC.
6237 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
6238 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
6239 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
6240 calls into a single one (for output atomicity).
6241 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
6242 before altering its last_stack_min ("thread" variable is added).
6243 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
6244 "s" is non-NULL.
6245 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
6246 if WinCE.
6247 * win32_threads.c (GC_get_next_stack): Pass current_min value to
6248 GC_get_stack_min as-is (without -1).
6249 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
6250 version of AO_fetch_and_sub1().
6251 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
6252 to pointer (and vice versa) thru word type to suppress warnings.
6253 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
6254 access atomically.
6255 * misc.c: Change GC_THREADS tests back to THREADS.
6256
6257 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
6258 a group of printf() calls into a single one (for output atomicity).
6259 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
6260 GC_set_time_limit): New prototypes.
6261 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
6262 GC_set_time_limit): New public setter/getter functions.
6263 * include/gc.h: Fix (and remove outdated) comments for thread-local
6264 allocation.
6265 * include/gc.h: Fix typos in comments.
6266 * misc.c (GC_init_inner, GC_printf): Likewise.
6267 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
6268 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
6269 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6270 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
6271 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6272 GC_bytes_allocd_at_reset): Define as STATIC.
6273 * misc.c (GC_get_heap_size, GC_get_free_bytes,
6274 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
6275 avoid data races.
6276 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
6277 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
6278 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
6279 set the default initial value of initial_heap_sz.
6280 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
6281 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
6282 word-compliant, "%p" is used w/o "0x").
6283 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
6284 environment variable if SMALL_CONFIG.
6285 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
6286 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
6287 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
6288 * doc/README.environment (GC_MARKERS): Refine information.
6289 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
6290 possible.
6291 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
6292 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
6293 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
6294 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
6295 (to prevent possible infinite recursion).
6296
6297 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
6298 with ANSI C one.
6299 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
6300 GC_enqueue_all_finalizers): Remove outdated comments about disabling
6301 signals.
6302 * finalize.c (GC_general_register_disappearing_link): Fix assertion
6303 to catch NULL "obj" value.
6304 * finalize.c (GC_unregister_disappearing_link): Check "link"
6305 alignment before gaining the lock.
6306 * finalize.c (GC_finalize): Refine comment.
6307 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
6308 word-compliant, "%p" is used w/o "0x").
6309 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
6310 variable (to 0) to suppress compiler warning.
6311 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
6312 * include/gc_gcj.h: add "extern C" header and tail.
6313 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
6314 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
6315 the comments to the place where these symbols are defined in mark.c).
6316 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
6317 GC_mark_some_inner, if PARALLEL_MARK only).
6318 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
6319 GC_active_count, GC_do_parallel_mark): Define as STATIC.
6320 * pthread_support.c (GC_mark_thread): Likewise.
6321 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
6322 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
6323 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
6324 GC_arobjfreelist): Likewise.
6325 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
6326 for HBLKSIZE to GC_STATIC_ASSERT.
6327 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
6328 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
6329 * pthread_support.c (GC_do_blocking_inner): Likewise.
6330 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
6331 switch branch to suppress compiler warning.
6332 * mark.c (GC_return_mark_stack): Append new-line to printf message.
6333 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
6334 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
6335 suppress compiler warning.
6336 * pthread_support.c (start_mark_threads): Move the code limiting
6337 "GC_markers" value (and printing a warning) to GC_thr_init().
6338 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
6339 if based on the number of CPUs.
6340 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
6341 values as one.
6342 * pthread_support.c (GC_register_my_thread_inner): Add a check for
6343 "stack_end" is non-NULL (the same as in win32_threads.c).
6344 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
6345 with ENOMEM.
6346 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
6347 to "while" one to suppress "possible extraneous ';'" warning.
6348
6349 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
6350 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
6351 (Darwin only).
6352 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
6353 * include/private/gcconfig.h (ARM32): Define config parameters for
6354 DARWIN (iPhone).
6355
6356 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
6357 GC_TIME_LIMIT): New macros (used to control the default initial
6358 values of GC_full_freq variable, GC_dont_expand,
6359 GC_free_space_divisor, GC_time_limit respectively).
6360 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
6361 with GC_TIME_LIMIT in alloc.c).
6362 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
6363 Define as STATIC.
6364 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
6365 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
6366 Move the prototypes to alloc.c, make STATIC.
6367 * include/private/gc_priv.h (GC_push_current_stack,
6368 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
6369 (move the comments to the places where these functions are defined).
6370 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
6371 as STATIC.
6372 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
6373 GC_print_heap_sects): Convert a group of printf() calls into
6374 a single one (for output atomicity).
6375 * mark_rts.c (GC_print_static_roots): Likewise.
6376 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
6377 convenience to delimit collections.
6378 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
6379 make "frames" local variable volatile (to prevent optimization).
6380 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6381 GC_finish_collection, GC_allocobj): Remove outdated comments about
6382 disabling signals.
6383 * include/private/gc_priv.h (GC_register_displacement_inner,
6384 GC_gcollect_inner): Likewise.
6385 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6386 GC_finish_collection): Initialize "start_time" local variable (to 0)
6387 to suppress compiler warning.
6388 * mark_rts.c (GC_add_roots_inner): Likewise.
6389 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
6390 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
6391 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
6392 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
6393 K&R-style function prototypes with ANSI C one.
6394 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
6395 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
6396 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
6397 macros.
6398 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
6399 same as for Watcom.
6400 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
6401
6402 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
6403 outdated comment about disabling signals.
6404 * mallocx.c (GC_malloc_uncollectable,
6405 GC_malloc_atomic_uncollectable): Likewise.
6406 * os_dep.c: Likewise.
6407 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
6408 Add ARGSUSED tag.
6409 * pthread_stop_world.c (GC_suspend_handler,
6410 GC_suspend_handler_inner): Likewise.
6411 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
6412 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
6413 switch branch to suppress compiler warning.
6414 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
6415 * include/private/darwin_semaphore.h (sem_init): Likewise.
6416 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
6417 * include/private/dbg_mlc.h (GC_has_other_debug_info,
6418 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
6419 C one.
6420 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
6421 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
6422 * include/private/pthread_support.h (GC_stop_init): Likewise.
6423 * include/private/gcconfig.h: Refine comment about setting
6424 GC_stackbottom.
6425 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
6426 "right" places.
6427 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
6428 for "stack_end" field.
6429 * mallocx.c (GC_malloc_uncollectable,
6430 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
6431 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
6432 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
6433 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
6434 format specifier (should be word-compliant, "%p" is used w/o "0x").
6435 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
6436 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
6437 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
6438 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
6439 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
6440 as STATIC.
6441 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
6442 "thread_blocked" is not set for the current thread.
6443 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
6444 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
6445 suppress compiler warning.
6446
6447 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
6448
6449 * win32_threads.c: restructure parallel marking mutex initialization.
6450 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
6451 pthread_stop_world.c, pthread_support.c: Add runtime conditions
6452 on GC_parallel were appropriate.
6453 * pthread_support.c: Condition marker_bsp on ia64.
6454 (GC_segment_is_thread_stack): Fix loop upper bound.
6455 * reclaim.c: Limit some assertions to PARALLEL_MARK.
6456 * pthread_support.c: Don't acquire mark lock for thread-local
6457 allocation.
6458 * include/private/gc_priv.h: Don't define parallel mark sync
6459 support just for THREAD_LOCAL_ALLOC.
6460
6461 * include/private/gcconfig.h: refine MINGW32 test.
6462 * mark.c: Add win64/gcc tests.
6463
6464 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
6465 typed_test, run_one_test, check_heap_stats, main, test): Replace
6466 all K&R-style function definitions with ANSI C ones.
6467 * trace_test.c (main): Likewise.
6468 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6469 THREAD_LOCAL_ALLOC.
6470 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
6471 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
6472 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
6473 local variables (to suppress "assigned value is never used"
6474 compiler warning).
6475 * test.c (tree_test): Use public GC_noop1() instead of private
6476 GC_noop().
6477 * test.c (typed_test): Likewise.
6478 * test.c (check_heap_stats): Define and assign value to
6479 "late_finalize_count" local variable only if its value is used
6480 (if FINALIZE_ON_DEMAND defined).
6481 * test.c (main): Remove DJGPP-specific initialization of
6482 GC_stackbottom (not needed anymore, handled in gcconfig.h).
6483 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
6484 * trace_test.c: Include "gc_backptr.h".
6485 * trace_test.c (main): Call GC_INIT().
6486 * trace_test.c (main): Add "return 0" statement.
6487
6488 * dyn_load.c (GC_register_dynlib_callback): Use new index j
6489 instead of i in the inner loop.
6490
6491 * tests/test.c: Increment n_tests with fetch_and_add when possible,
6492 avoiding need to export lock.
6493
6494 * include/gc_pthread_redirects.h:
6495 - dlfcn.h is included for dlopen() proto before undefining
6496 "dlopen" (so, it's possible now to include dlfcn.h after
6497 gc.h from user code);
6498 - GC_dlopen() proto is added (except for Darwin as
6499 it's missing there);
6500 - "dlopen" is explicitly undefined (before its redefinition).
6501 * include/gc.h:
6502 - "process.h" is included besides "windows.h"
6503 (for _beginthreadex/_endthreadex); win32 only.
6504 - GC_NO_THREAD_DECLS is moved to the right place
6505 (before closing "extern C").
6506 * pthread_support.c: Fix out of memory handling for Thread_Reps.
6507 * win32_threads.c: Don't include process.h on winCE,
6508 improve out of memory handling for thread structures, don't
6509 define GC_beginthreadex and GC_endthreadex for winCE.
6510
6511 * tests/test.c: Change gcj vtable decriptor type from size_t to
6512 GC_word.
6513
6514 * gcj_mlc.c: Add comment.
6515 * tests/test.c: Change NTEST to NTHREADS.  Fork 5 threads by default.
6516 Run reverse_test a second time in each thread.Add comments.
6517 Don't rely on AO_fetch_and_add.
6518
6519 * dyn_load.c (GC_register_dynlib_callback,
6520 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
6521 for GNU_PT_RELRO relocations.
6522
6523 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
6524 by GC_SOLARIS_THREADS.
6525 * include/gc.h: Improve finalizer documentation.
6526 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
6527 * pthread_stop_world.c, Makefile.dj: Fix typos.
6528
6529 * win32_threads.c (GC_new_thread): Make first_thread
6530 visible to the whole file.
6531 (UNPROTECT): New macro.
6532 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
6533 thread structures before writing.
6534 (GC_suspend): Acquire GC_fault_handler_lock before suspending
6535 thread.
6536 * os_dep.c: export GC_fault_handler_lock.
6537 (GC_remove_protection): Check if already unprotected.
6538
6539 * doc/README.win32: Add OpenWatcom warning.
6540 * include/private/gcconfig.h: Really check it in.
6541
6542 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
6543 code from gcc version.
6544 * os_dep.c: make gc compilable (optionally) for Cygwin with
6545 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
6546 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
6547 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
6548 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
6549 Watcom (Win32 only).  It works.
6550
6551 * mach_dep.c: Don't use __builtin_unwind_init for register
6552 state on PowerPC/Darwin.
6553
6554 * doc/gcdescr.html: Improve description of object freelist
6555 structure.
6556 * include/private/gc_priv.h: Fix comment for _size_map.
6557
6558 * os_dep.c (GC_linux_stack_base): Relax sanity test.
6559
6560 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
6561 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
6562
6563 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
6564 non-Cygwin win32.
6565
6566 * configure.ac: Enable thread-local allocation for sparc-linux.
6567
6568 * alloc.c (GC_try_to_collect): Remove duplicate initialization
6569 check.
6570 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
6571 threaded warnings.
6572 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
6573
6574 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
6575 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
6576 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
6577 thread_local_alloc.c.
6578 * misc.c: Refine comment.
6579
6580 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently.  Add FIXME
6581 comment.
6582
6583 * win32_threads.c (GC_push_stack_for): Yet another attempt
6584 at the stack_min finding logic.  Try to clean up the existing code
6585 while minimizing VirtualQuery calls.
6586 (GC_win32_start_inner): Register thread before GC_printf.
6587 Produce more output with DEBUG_THREADS.
6588 *include/gc.h: Update obsolete comments.
6589
6590 * tests/test.c:
6591 (gcj_class_struct2): Use cast instead of l suffix.
6592 Cast GetLastError to int in various places.
6593 Avoid unused result warning from incr/decr macros.
6594 Add cast for fake_gcj_mark_proc.
6595 Cast GC_gc_no to unsigned in printf.
6596
6597 * include/gc.h: Fix two typos in comments.
6598
6599 * finalize.c: Fix typo in comment.
6600
6601 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
6602 with lock.
6603
6604 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
6605 if we are checking for leaks.
6606
6607 * win32_threads.c: Remove mark lock spinning.
6608 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
6609 GC_spin_count, and GC_block_count using atomic operations.
6610 * tests/test.c: Declare n_tests as AO_t only if we have threads.
6611
6612 * win32_threads.c: Support PARALLEL_MARK.  Make printf arg
6613 types agree with format specifiers.
6614 Add STATIC for GC_threads.
6615 * include/private/gcconfig.h: Add FIXME comment.
6616 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
6617 AO_fetch_and_add1_full.  Declare n_tests as AO_t.
6618 (WinMain): Don't call GC_use_DllMain.
6619 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
6620
6621 * alloc.c (GC_try_to_collect_inner): Don't print redundant
6622 GC_bytes_allocd and GC_gc_no.
6623 (GC_stopped_mark): Print average world stop time.
6624 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
6625
6626 * misc.c, doc/README.environment: Add support  for
6627 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
6628 * include/gc.h: Make GC_set_free_space_divisor correspond to
6629 (somewhat unfortunate) reality.
6630
6631 (Mostly improves LLP64 support.)
6632 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
6633 misc.c, reclaim.c: Changed some int and long type to word or size_t
6634 (and vice versa where appropriate)
6635 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
6636 include/private/thread_local_alloc.h, mark.c,
6637 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
6638 casts to word type when casting from int to pointer (or pointer
6639 to int, or data pointer to code pointer) - just to remove the
6640 corresponding compiler warning.
6641 * ptr_chck.c (GC_is_visible): cast int const to word type to
6642 prevent left shift overflow.
6643 * os_dep.c: change the type of GC_mem_top_down global variable
6644 (containing a flag) to DWORD.
6645 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
6646 is defined on SunOS x86_64.
6647 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
6648 for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
6649 (the compiler gets hung if invoked with -Ox -D
6650 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
6651 * backgraph.c: cast GC_gc_no value to unsigned short when
6652 assigned/compared to height_gc_no field of back_edges.
6653 * os_dep.c (GC_remove_protection): Add ARGSUSED.
6654 * win32_threads.c (GC_thread_exit_proc): Remove unused local
6655 variable.
6656 * mark.c (GC_check_dirty): Move declaration out of func body.
6657
6658 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
6659 * include/gc.h (GC_register_my_thread): Improve comment.
6660
6661 * Makefile.direct: Add comment for -DCHECKSUMS.
6662
6663 * thread_local_alloc.c, include/private/thread_local_alloc.h:
6664 Fix typos in comments.
6665 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
6666 STATIC.
6667 * malloc.c (GC_free): Move size calculation below assertion.
6668
6669 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
6670 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
6671 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
6672
6673 * finalize.c (GC_general_register_disappearing_link): Add
6674 assertion.
6675 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
6676 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
6677 granules, not words.
6678
6679 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
6680 * configure.ac: Define mach_dep for sparc-linux.
6681
6682 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
6683 warning.
6684
6685 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
6686 order.
6687
6688 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
6689 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
6690 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
6691 include/javaxfc.h, include/private/gc_locks.h,
6692 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
6693 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
6694 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
6695 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
6696 * test.c: Remove some old K&R code.
6697
6698 * win32_threads.c (GC_may_be_in_stack): New.  (GC_Thread_Rep):
6699 Add last_stack_min.  (GC_push_stack_for): Use last_stack_min.
6700 (GC_get_next_stack): Add limit argument, use_last_stack_min.
6701 (GC_suspend): make stack_base assignment conditional.
6702 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
6703 GC_get_next_stack.
6704 * configure_atomic_ops.sh: Remove.
6705 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
6706 Makefile.direct: Partially support build directories whose path
6707 name contains blanks.
6708 * Makefile.am: Support new files (build_atomic_ops.sh,
6709 build_atomic_ops.sh.cygwin)
6710
6711 * include/private/gc_locks.h, include/private/gc_pmark.h,
6712 include/private/gc_priv.h, include/private/gcconfig.h,
6713 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
6714 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
6715 Fix comments.
6716
6717 * pthread_support.c: Comment out LOCK_STATS.
6718 * include/gc.h: Fix comments.
6719
6720 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
6721 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
6722 * os_dep.c (GC_get_main_stack_base): Use alternate definition
6723 with USE_MMAP.
6724 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
6725
6726 * doc/README: Make it clearer when Makefile.direct is assumed.
6727 * cord/cord.am: install include/cord.h.
6728
6729 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
6730 Remove unused variables.
6731 * darwin_stop_world.c: Always declare GC_thr_init().
6732 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
6733 SHORT_DBG_HDRS is defined.
6734 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
6735 mark, USE_MARK_BITS version): Refer to correct parameter name.
6736
6737 * finalize.c (GC_general_register_disappearing_link): Remove
6738 redundant code.
6739 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
6740 * os_dep.c: (GC_write_fault_handler): Remove remaining
6741 references to deleted variable "code".  Remove redundant
6742 FREEBSD definitions.
6743 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
6744 defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
6745
6746 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
6747
6748 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
6749 smashed string, (GC_debug_free_inner): Mark as free.
6750 * mallocx.c (GC_malloc_many): Always clear new block if
6751 GC_debugging_started.
6752 * reclaim.c: Move GC_debugging_started from
6753 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
6754 which is also called directly.
6755 * doc/README: Fix spelling error.  Update license summary.
6756 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
6757 * tests/test.c: Don't define GC_DEBUG if already defined.
6758
6759 * doc/simple_example.html: update --enable-full-debug reference,
6760 Make HTML formatting standards compliant.
6761 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
6762 * doc/gcinterface.html: specify encoding.
6763
6764 * doc/simple_example.html: Update thread-local allocation
6765 description.
6766
6767 * configure.ac: Check for gc-debug earlier; replace remaining
6768 full-debug tests.
6769 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
6770 Use signed offset type.  Use ptr_t internally.
6771 * doc/gcinterface.html: Update LOCAL_MALLOC description.
6772 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
6773 Fix full-debug reference.
6774 * include/gc.h: Rewrite GC_..._INCR and friends.
6775 * tests/test.c: Minimally test GC_..._INCR and friends.
6776
6777 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
6778 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
6779 on free hblk.
6780 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
6781 (GC_header_cache_miss): Always blacklist pointers for free
6782 hblks.  Add assertion and comment.
6783 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
6784 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
6785 Delete it.
6786 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
6787
6788 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
6789
6790 * configure.ac: Set win32_threads on MinGW.
6791
6792 Ivan's description of the patch follows. Note that a few pieces like
6793 the GC_malloc(0) patch, were not applied since an alternate had been
6794 previously applied.  A few differed stylistically from the rest of
6795 the code (mostly casts to void * instead of target type),
6796 or were classified as too minor to bother.  Note that
6797 all of Ivan's static declarations which did not correct outright
6798 naming bugs (as a few did), where replaced by STATIC, which is
6799 ignored by default.
6800
6801 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
6802 GC_malloc(0));
6803 - addition of missing getter/setter functions for public variables
6804 (may be useful if compiled as Win32 DLL);
6805 - addition of missing GC_API for some exported functions;
6806 - addition of missing "static" declarator for internal functions
6807 and variables (where possible);
6808 - replacement of all remaining K&R-style definitions with ANSI
6809 C ones (__STDC__ macro is not used anymore);
6810 - addition of some Win32 macro definitions (that may be missing in
6811 the standard headers supplied with a compiler) for GWW_VDB mode;
6812 - elimination of most compiler warnings (except for
6813 "uninitialized data" warning);
6814 - several typos correction;
6815 - missing parenthesis addition in macros in some header files of
6816 "libatomic_ops" module.
6817
6818 My highlights based on reading the patch:
6819
6820 * allchblk.c: Remove GC_freehblk_ptr decl.
6821 Make free_list_index_of() static.
6822 * include/gc.h: Use __int64 on win64, define GC_oom_func,
6823 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
6824 add getter and setters: GC_get_gc_no, GC_get_parallel,
6825 GC_set_oom_fn, GC_set_finalize_on_demand,
6826 GC_set_java_finalization, GC_set_dont_expand,
6827 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
6828 GC_set_finalizer_notifier.  Always define GC_win32_free_heap.
6829 gc_config_macros.h: Define _REENTRANT after processing
6830 GC_THREADS.
6831 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
6832 handling of operator new[] for old Windows compilers.
6833 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
6834 around arguments.
6835 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
6836 * mark.c (GC_mark_and_push_stack): Fix source argument for
6837 blacklist printing.
6838 * misc.c: Fix log file naming based on environment variable
6839 for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
6840 just return current value with 0 argument.  Add DONT_USE_USER32_DLL.
6841 Add various getters and setters as in gc.h.
6842 * os_dep.c: Remove no longer used GC_disable/enable_signals
6843 implementations.  (GC_get_stack_base): Add pthread_attr_destroy
6844 call.  No longer set GC_old_bus_handler in DARWIN workaround.
6845 * pthread_support.c: GC_register_my_thread must also
6846 call GC_init_thread_local.
6847
6848 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
6849 * mach_dep.c: Include signal.h.
6850 * gc_priv.h: Factor out INLINE declaration.
6851
6852 * include/private/gcconfig.h: Update MIPS/LINUX config.
6853 * doc/gcdescr.html: Fix typo.
6854 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
6855 for MIPS/LINUX.
6856
6857 * configure.ac: SPARC fixes.
6858 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
6859 size 0, except for gcj.
6860 * doc/gc.man: Expand C++ cautions.
6861 * include/gc_inline.h: Fix comments.
6862
6863
6864 == [7.1] 2008-05-03 ==
6865
6866 * doc/gcinterface.html: Improve C++ interface documentation.
6867
6868 * allchblk.c (GC_allochblk): Check for overflow during size
6869 rounding.
6870 * tests/huge_test.c: New.
6871 * Makefile.direct, tests/tests.am: Add huge_test.c
6872
6873 * pthread_support.c: Fix typo in comment.
6874 * os_dep.c (GC_win32_get_mem): Add heap section only if
6875 allocation succeeded.
6876
6877 * malloc.c: (free replacement) Fix caller address space check.
6878
6879 * finalize.c (GC_grow_table): Dereference table in null-check.
6880
6881 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
6882 Consistently call CloseHandle. (GC_suspend): Call
6883 GC_delete_gc_thread.
6884 * tests/test.c: Don't reference GC_print_stats if not exported.
6885
6886 * tests/test.c (run_one_test): Don't mention pthread_self().
6887 * misc.c: Declare GC_thr_init().
6888
6889 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
6890 and refine assertions to handle huge unmergable blocks.
6891 (GC_allochblk_nth): Add comment.
6892
6893 * include/private/gcconfig.h: Add missing FREEBSD macro
6894 consistency test.
6895
6896 * allchblk.c (GC_enough_large_bytes_left): No longer take
6897 parameters; return free list index bound.
6898 (GC_merge_unmapped): Don't access nexthdr until after null test.
6899 (Fixes bug in 1/29/08 check-in.)  (GC_allochblk): Calculate
6900 when splitting is allowable only once here, not when considering each
6901 block. (GC_allchblk_nth): Accept new may_split parameter.
6902 Avoid some redundant tests for exact size matches.
6903 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
6904 (GC_maybe_gc): Make locking assertion testable.
6905 * mark_rts.c: Fix indentation.
6906 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
6907 * tests/test.c: Remove (void) casts.  Optionally print some
6908 timing information.
6909
6910 * windows-untested/gc.def: Remove CreateThread line.
6911 * windows-untested/README: New file.
6912 * win32_threads.c (GC_use_DllMain): Force collector initialization.
6913 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
6914 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
6915 * include/gc_cpp.h: Add matching placement delete overloads
6916 everywhere.
6917 * include/private/gc_locks.h (NO_THREAD): Add cast.
6918 * include/private/gcconfig.h: Add test for __HP_aCC.
6919 * configure.ac, tests/tests.am:  Avoid libgccpp on HP/UX.
6920
6921 * doc/README.win32: Fix typo.
6922 * configure.ac: Fix printing of enable-shared result.
6923
6924 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
6925 defined.  (GC_call_with_stack_base): Add GC_API.
6926 * os_dep.c (GC_get_stack_base): Add GC_API.
6927 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
6928 Add GC_API.
6929 * include/gc.h: Add GC_API annotations.
6930 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
6931 PCR.
6932 * include/private/gc_pmark.h: Fix comments.
6933
6934 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
6935 Add GC_push_typed_structures() to push GC_ext_descriptors.
6936
6937 * tests/test.c: Call GC_INIT for DARWIN; test system type using
6938 gcconfig.h-defined macros.
6939
6940 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
6941 blocks large enough that their size, when interpreted as a signed
6942 value, would be negative.
6943 * include/private/gc_priv.h: Comment hb_sz range limit.
6944
6945 * mark.c (GC_push_next_marked): correct comment.
6946 * Makefile.direct: document NO_PROC_STAT.
6947 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
6948
6949
6950 == [7.1alpha2] 2008-01-10 ==
6951
6952 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
6953 again.  Refer to build directory as ".".
6954
6955 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
6956 * darwin_stop_world.c: Add FIXME comment for parallel marker.
6957
6958 * include/private/gc_priv.h: Update MAX_ROOT_SETS
6959 and LOG_PHT_ENTRIES to handle larger heaps.
6960
6961 * include/gc.h (GC_INIT,GC_init): Update comments.
6962
6963 * allchblk.c, alloc.c, include/private/gc_priv.h:
6964 Track GC_bytes_dropped and use in GC triggering decisions.
6965 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
6966
6967 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
6968 adjusting p.
6969
6970 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
6971
6972 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
6973 * alloc.c: Add declaration for GC_add_current_malloc_heap.
6974 * win32_threads.c (GC_beginthreadex): Clean up error
6975 return code.
6976 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
6977 Add NT_X64_THREADS_MAKEFILE.
6978
6979 * alloc.c: Define GC_version instead of in version.h.
6980 * version.h: Remove.
6981 * include/gc_version.h: Move most of version.h here.
6982 * include/gc.h: Include gc_version.h.
6983 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
6984 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
6985 Adjust for version.h rename.
6986
6987 * configure.ac: Put libatomic_ops links in build directory.
6988 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
6989 as nodist sources.
6990
6991 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
6992 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
6993
6994 * alloc.c: Deal correctly with address wrapping for
6995 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
6996 * finalize.c, include/gc.h (GC_register_disappearing_link,
6997 GC_register_finalizer_inner): Improve out-of-memory handling.
6998 * include/private/gc_pmark.h: Fix comment spelling.
6999
7000 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
7001 in other contexts.
7002
7003 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
7004
7005 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
7006
7007 * allchblk.c, configure.ac (add --enable-munmap)
7008
7009 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
7010 GC_GETSECTBYNAME instead.
7011 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
7012 architecture (Darwin).
7013
7014 * reclaim.c (GC_bytes_found): Expand comment.
7015 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
7016 granules, not bytes, to GC_FAST_MALLOC_GRANS.
7017 * include/gc.h: Never include gc_local_alloc.h.
7018 * tests/test.c: Add size zero allocation tests.
7019
7020 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
7021 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
7022
7023 * Makefile.direct: Invoke $(MAKE) instead of make.
7024
7025 * doc/scale.html: Reflect gc7 thread local allocation behavior.
7026
7027 * include/extra/gc.h, include/extra/gc_cpp.h: New.
7028 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
7029 again.
7030
7031 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
7032 for HURD.
7033
7034 * include/private/gcconfig.h: Add Linux/mips-64 support.
7035
7036 * dbg_mlc.c: Use random() on all glibc systems.
7037 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
7038 HURD.  Add comment.
7039 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
7040 systems without SA_SIGINFO.
7041
7042 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
7043 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
7044 No longer test for RS6000.
7045
7046 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
7047 Maintain GC_our_memory and GC_n_memory.
7048 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
7049 (GC_print_all_smashed_proc): Pass client object address instead of
7050 base.
7051 * dyn_load.c (sort_heap_sects): New.  (GC_register_map_entries):
7052 Register sections that are contiguous and merged with our heap.
7053 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
7054 of libraries.
7055 * malloc.c (calloc): Check for special callers even with
7056 USE_PROC_FOR_LIBRARIES. Move assertion.  Add rudimentary
7057 malloc/free tracing.
7058 * misc.c: No longer call GC_init_lib_bounds explicitly.
7059 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
7060 initialize on demand.
7061 * tests/test.c: Call GC_INIT only when required.
7062
7063 * Makefile.direct: Remove comment fragment.
7064 * tests/tests.am: Add smashtest.
7065 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
7066 * pthread_support.c: Fix comment spelling.
7067 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
7068 GC_LINUX_THREADS and REDIRECT_MALLOC.
7069 * tests/smash_test.c: Initial check-in.
7070 * obj_map.c: Print log entry to correct file.
7071 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
7072
7073 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
7074 while world is still running.
7075 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
7076 with world stopped.
7077 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
7078 * misc.c (GC_init/GC_init_inner): Perform all work in
7079 GC_init_inner.
7080 * Makefile.direct: Expand -DUSE_MUNMAP comment.
7081
7082 * include/gc.h: Define uintptr_t explicitly for VC++6.
7083 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
7084 exist.
7085
7086
7087 == [7.0] 2007-07-02 ==
7088
7089 * include/gc_config_macros.h: Also check for IA64 when setting
7090 GC_HPUX_THREADS.
7091 * mallocx.c: Change my_bytes_allocd to signed_word.
7092 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
7093 (as opposed to pthreads) support.
7094
7095 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
7096 on ARM/Linux.  Check getcontext() return value.
7097
7098 * backgraph.c (per_object_func): Make argument types consistent.
7099 (GC_traverse_back_graph): Mark GC_deepest_obj.
7100
7101 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
7102 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
7103
7104 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
7105 anachronisms.
7106 * dyn_load.c: Partially support cygwin, but don't enable it yet.
7107
7108 * Makefile.am: Use -no-undefined for libgc.
7109 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
7110 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
7111 consistently.
7112 * misc.c: Fix some WARN calls.  Move GC_is_initialized setting and
7113 GC_thr_init() call.
7114 * os_dep.c: Consistently use WARN where appropriate.
7115 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test.  Instead
7116 remove inappropriate pthread.h include.
7117 * doc/README.linux: Remove some anachronisms.
7118
7119 * alloc.c: Also use GC_check_tls on non-Linux systems.
7120 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
7121 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
7122 with prototype.
7123
7124 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
7125 (GC_print_heap_sects): Use size_t instead of unsigned long.
7126 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
7127 context.
7128 * win32_threads.c, include/gc_config_macros.h: The last of Romano
7129 Paolo Tenca's patch.  Move stdint.h include to gc_config_macros.h.
7130 * include/gc_inline.h: Avoid gc_priv.h dependencies.
7131 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
7132
7133 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
7134 * mark_rts.c (GC_push_roots): Fix kind type.
7135
7136 * doc/README.win64: New file.
7137 * doc/doc.am, Makefile.direct: Add README.win64.
7138
7139 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
7140 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
7141 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
7142 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
7143 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
7144 win32_threads.c, cord/de_win.c, include/gc_mark.h,
7145 include/private/gc_hdrs.h, include/private/gc_pmark.h,
7146 include/private/gc_priv.h, tests/test_cpp.cc:
7147 Replace old style function declarations.  Clean up integral types.
7148 Remove register declarations.  The change in malloc.c and the
7149 "int descr" declaration in mark.c are the most likely to have
7150 been real bugs outside of win64.
7151 * msvc_dbg.c: Disable on win64.
7152 * win32_threads.c: Add AMD64 support.
7153 * include/gc.h: no backtrace on AMD64 for now.
7154
7155 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
7156
7157 * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
7158 Don't include windows.h in an extern "C" context.
7159 * include/private/gcconfig.h: Fix win64/X86_64 configuration.
7160 * tests/test.c: Eliminate more old style function definitions.
7161 Cleanup pointer and integer casts for win64.
7162 * tests/test_cpp.cc: Don't include gc_priv.h.
7163 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
7164 * NT_X64_STATIC_THREADS_MAKEFILE: New.
7165
7166 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK.  Ignore
7167 FINISHED threads for suspension.  (GC_pthread_join): Add
7168 pthread_self() cast.  (GC_pthread_start_inner): Execute cleanup
7169 handler when popping it.
7170 * include/private/gc_locks.h: Inline THREAD_EQUAL for
7171 GC_WIN32_PTHREADS.  Define USE_PTHREAD_LOCKS only if we have
7172 pthreads.
7173
7174 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
7175 tests/test.c: Accommodate GC_WIN32_PTHREADS.
7176 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
7177 * include/gc_config_macros.h: Define both PTHREADS and
7178 GC_WIN32_THREADS.
7179 * include/private/gc_locks.h: Nonstandard definitions of
7180 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
7181 * doc/README.win32, Makefile.direct: Include documentation
7182 for GC_WIN32_PTHREADS.
7183 * Makefile.direct: Remove some anachronisms in the documentation.
7184
7185 * Makefile.am: Move includes to bottom.  Add better library
7186 dependencies.  Increment library version.  Remove "SUBDIRS += .".
7187 * cord/cord.am, tests/tests.am: Add better library dependencies.
7188 Remove now unnecessary dependencies.
7189 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
7190 Move to define on all Windows platforms.  (_beginthread): define
7191 to generate error if used.
7192
7193 * include/private/gc_locks.h: Format to 80 columns.
7194
7195 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
7196 * NT_MAKEFILE: msvc_dbg.h is in include/private.  Don't use cvars
7197 rc.
7198 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
7199 case.
7200 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
7201 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
7202 * include/gc.h: Add GC_reachable_here().  (GC_WinMain): Add GC_API.
7203 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
7204 * tests/test.c: Add GC_reachable_here() call.
7205
7206 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
7207 * tests/thread_leak_test.c: Don't unconditionally define
7208 GC_LINUX_THREADS.
7209
7210 * Makefile.am: Remove extra_ldflags_libgc definition.
7211
7212 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
7213
7214 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
7215 value.
7216
7217
7218 == [7.0alpha9] 2007-05-15 ==
7219
7220 * Some gc6.9 changes.
7221 * Change FindTopOfStack decl in darwin_stop_world.c.
7222 * Move some static tests from misc.c to gcconfig.h.  Use #error.
7223 * Add GC_print_free_list() function (thanks to Bruce Hoult).
7224 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
7225 Barry DeFreese, and possibly other Debian maintainers).
7226 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
7227 Peter Wang).
7228 * Integrated various MacOSX patches and tried to reconcile them (thanks to
7229 Allan Hsu, several contributors at Apple, and probably others).
7230 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
7231
7232 * Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
7233 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
7234 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New.  GC_lock_holder: now
7235 unsigned long.  I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
7236 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
7237 NUMERIC_THREAD_ID, THREAD_EQUAL.
7238 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
7239 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
7240 ARM.
7241
7242 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
7243 GC_debug_register_finalizer_unreachable() patch from gcc tree.
7244 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
7245 to check GC has been initialized.
7246
7247 * include/gc_cpp.h: Documentation updates.
7248 * include/gc_config_macros.h: Don't check for __ppc__ to set
7249 DARWIN_THREADS.
7250 * Makefile.am: Include configure_atomic_ops.sh in dist.
7251
7252 * Makefile.am: Don't distribute copied atomic_ops files.  Include
7253 libatomic_ops with "make dist".
7254 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
7255 * win32_threads.c: Report error for Cygwin + GC_DLL.
7256
7257 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
7258 * cord/de_win.c: Rename and move AboutBox.  Call GC_INIT.  Remove
7259 MakeProcInstance anachronism.
7260 * doc/README.macros: Officially remove elif prohibition.
7261 Remove documentation for defunct SRC_M3 support.
7262 * include/gc.h: Remove more SRC_M3 references.
7263 * include/private/gcconfig.h: Remove still more SRC_M3 references.
7264 GC_SOLARIS_THREADS no longer needs to be checked separately.
7265
7266 * thread_local_alloc.c, include/private/thread_local_alloc.h:
7267 Spell __declspec correctly.
7268 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
7269
7270 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
7271
7272 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
7273 GC_started_thread_while_stopped.
7274 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
7275 * win32_threads.c: (client_has_run): remove,
7276 GC_started_thread_while_stopped, GC_attached_thread: add.
7277 (GC_push_all_stacks): Add verbose output.
7278 (DllMain): Avoid initializing collector or the like.
7279 Never update both thread tables.
7280 * doc/README.win32: Adjust GC_win32_dll_threads rules.
7281
7282 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
7283 GC_PRINT_VERBOSE_STATS.
7284
7285 * configure.ac: Comment out redundant
7286 AC_DEFINE(NO_EXECUTE_PERMISSION).
7287 * sparc_mach_dep.S: Remove single quote in comment.
7288 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
7289 * win32_threads.c: Include stdint.h for Mingw.  Add GC_API for DllMain.
7290 (GC_use_DllMain): Fix assertion.
7291
7292 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
7293 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
7294 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
7295 targets. Remove comments.
7296 Prepare ppc64 support for Darwin.
7297
7298 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
7299 Make i unsigned.
7300 (GC_stop_world): Likewise. Remove unused GC_thread p.
7301 (GC_start_world): Likewise.
7302
7303 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
7304 Remove double SIG_HNDLR_PTR definition.
7305 (GC_forward_exception): Fix compiler warnings, make i unsigned.
7306 Initialize thread_state to NULL.
7307 (catch_exception_raise): Fix compiler warnings, make i unsigned.
7308
7309 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
7310 also define for X86_64.
7311 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
7312 * README.changes: Point to ChangeLog.
7313
7314 * darwin_stop_world.c: Move THREAD_FLD defines to ...
7315 * include/private/gc_priv.h: ... here.
7316 Fix THREAD_STATE definitions for ppc64.
7317 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
7318 access.
7319
7320 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
7321 HAS_X86_THREAD_STATE32_*.
7322 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
7323 HAS_X86_THREAD_STATE64_*.
7324 Added value 1 in the above AC_DEFINE's. Important for the upcoming
7325 Leopard.
7326 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
7327 Removed __x86_64__ check in POWERPC section. Added base definitions
7328 for the X86_64 Darwin port.
7329 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
7330 to distinguish between 32 and 64-bit applications. Added definitions
7331 for X86_64 Darwin.
7332 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
7333 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
7334 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
7335 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
7336 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
7337 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
7338 Distinguish between getsectbynamefromheader_64 and
7339 getsectbynamefromheader.
7340 * os_dep.c (catch_exception_raise): Introduce exception definition for
7341 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
7342 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
7343
7344
7345 == [7.0alpha7] 2006-09-19 ==
7346
7347 * More 6.7 changes.
7348 * Declare GC_dump() in gc.h.
7349 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
7350 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
7351 Charles Mills).
7352 * Use #elif in the definitions of GET_MEM.
7353 * Overhaul porting.html.  Remove corresponding text from README.
7354 * Fix typo in DARWIN section of gcconfig.h.
7355 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
7356 * Update x86 AO_test_and_set implementation to use "=q".
7357 * Add $(EXEEXT) to many tests in tests/tests.am.  (Corresponds to a
7358 6.7 fix, which no longer applied.)
7359 * Fix Darwin/PPC port.
7360 * Fix Cygwin/threads port.
7361 * Fix gcj malloc support.
7362 * For GNU-style make, don't build libatomic_ops unless threads are requested.
7363 This should allow single-threaded builds on platforms which do not
7364 currently support libatomic_ops.
7365 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
7366 (Substantially improves things on HP/UX.)
7367 * Integrated Andrei Polushin's Visual C++ patches.  These provide for
7368 stack traces, better C++ debug support, and better log file handling.
7369 Note that these change the location of the log file to a the path of the
7370 executable with a .log extension.  To get the old behavior back, define
7371 OLD_WIN32_LOG_FILE.  For the time being, I'm checking his project
7372 files and the like into a windows-untested subdirectory.  They
7373 are almost certainly already out of date, but better than what we had
7374 before.
7375 * Fixed some win32 threads bugs, and added support for _beginthreadex.
7376 * Fix zero size thread local allocation so that explicit deallocation
7377 works correctly.
7378 * Removed serious bug in GC_malloc_uncollectable(large size).
7379 * Do not try to do thread-local gcj allocation in incremental mode.  There
7380 are races in setting up the descriptor.
7381 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
7382 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
7383 it can now spuriously return TRUE.
7384 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
7385 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
7386 and then switching to mmap if that fails.
7387 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
7388 * Fix REDIRECT_MALLOC with threads on Linux.  It now usually seems to work
7389 with ugly hacks that include having calloc behave differently when it is
7390 called from ld.so or the pthreads library.  A reasonable amount of
7391 infrastructure was added to support some of this.  (Thanks to Roland McGrath
7392 for ideas and information.)
7393 * Import various updated build scripts.
7394 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
7395 * Fix serious bugs in GC_malloc_atomic_uncollectable().
7396 * Return GC_SUCCESS form GC_get_stack_base().
7397 * Fix several atomic_ops problems on IA64 with HP Compiler.
7398 * Update to atomic_ops-1.2.
7399 * Fix hb_n_marks description and reclaim.c assertion.
7400 * Various additional win32 threads fixes.
7401 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
7402
7403
7404 == [7.0alpha5] 2005-09-29 ==
7405
7406 * More 6.6, 6.7 changes.
7407 * Some Solaris fixes, including some more general changes in how
7408 the assembly pieces of mach_dep.c are handled.
7409 * Removed a lot of SOLARIS_THREADS-specific code that was only
7410 needed with the old implementation.  This included many (mostly no-op)
7411 versions of GC_is_fresh.
7412 * Don't use atomic_ops in gc_locks.h unless we need threads.
7413 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
7414 * Removed Solaris GC_INIT hack.  It's a workaround for a long dead bug,
7415 and it seemed to be wrong anyway.
7416 * Changed win32_threads.c to require preprocessor-based interception
7417 of thread routines by default.  A client call to GC_use_DllMain is
7418 now required to get the old behavior in which DllMain is used to implicitly
7419 register threads.  This was done for uniformity with other platforms, and
7420 because the DllMain solution seemed to require very tricky code which,
7421 at least in the past, imposed hard bounds on the number of threads.
7422 * Many small changes to make thread support work again on Cygwin.
7423 * Moved definition of allocator lock etc. to pthread_support.c and
7424 win32_threads.c for those two cases.
7425 * Got rid of the FASTLOCK() machinery.  It doesn't seem useful on modern
7426 platforms.
7427 * Cleaned up the uncollectible allocation routines, speeding up the
7428 slower paths.  The code did enough unnecessary work off the critical path
7429 that the underlying logic was getting hard to extract.
7430 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL.  Indications
7431 are it just works, and I think the reasons for it not working disappeared
7432 a while ago.
7433 * Fixed bugs in hb_n_marks calculation and assertion.
7434 * Don't use __builtin_expect for pre-3.0 gcc.
7435 * Define GWW_VDB only for recent Microsoft tool chains.
7436 * Add overview.html to doc directory.
7437 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
7438 * Made thread local allocation sort of work with Cygwin.  The code should
7439 be there to deal with other Windows variants, But non-Cygwin Windows
7440 threads need more bug fixes.
7441
7442
7443 == [7.0alpha4] 2005-08-02 ==
7444
7445 * Various 6.5, 6.6 changes.
7446 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
7447 (thanks to Ben Maurer).
7448 * Integrated build patches from Davide Angelocola and Petter Urkedal.
7449 * Fix dynamic-linker-based pthread call redirection.
7450 * Renamed RS6000 to POWERPC/AIX.
7451 * Allow recovery from SIGSEGV in marker on Linux.  This works around
7452 a race in thread stack marking if /proc is used to find roots.  We do
7453 that by default with malloc redirection and threads.  This involved
7454 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
7455 * Added doc/porting.html file.
7456 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
7457 memory overwrite errors.
7458 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
7459 * Added GC_getattr_np-based GC_get_stack_base (untested).
7460 * Separated thread local allocation into a separate file and added the
7461 beginning of win32 support for that.
7462
7463
7464 == [7.0alpha3] 2005-04-28 ==
7465
7466 * Added support for dlopen-based interception of pthread functions.
7467 This is only half done.  The gc.h redefinitions currently interfere.
7468 * Integrated major automake overhaul from Petter Urkedal.
7469
7470
7471 == [7.0alpha2] 2005-04-07 ==
7472
7473 * GC_bytes_allocd was incremented by a possibly uninitialized variable
7474 in GC_generic_malloc_inner.  (Bug introduced in gc7.0alpha1.  Thanks
7475 to Ben Hutchings for tracking it down.)
7476 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
7477 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
7478 implementation for win32.
7479 * Removed pc_gc.tar and floppy targets in Makefile.direct.  Removed
7480 pc_excludes file.
7481 * No longer include GC_bytes_wasted when evaluating allocation progress.
7482 Since we are now counting live memory, it no longer makes sense.
7483 * Applied Davide Angelocola's configure patch.  There are now separate
7484 Makefile.am's in the cord and tests subdirectory, more tests, etc.
7485 * Renamed configure.in to configure.ac.
7486 * Merged a very small number of Nathanael Nerode's configure.ac
7487 cleanups from the gcc tree.  Unfortunately, that file is a bit
7488 different from ours.
7489 * Changed EINTR handling in sem_wait slightly.
7490 * Restructure the root marking code.  Remove all traces of
7491 USE_GENERIC_PUSH_REGS, and effectively make it the default.
7492 Make it easier to pass a context pointer to the mark routine, in
7493 case we ever want to do precise stack marking.
7494 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
7495 This remains undocumented, and only implemented for pthreads.  But it
7496 removes an otherwise unavoidable race with stores of callee-save
7497 registers.
7498 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case.  This
7499 resulted in bogus complaints in heap dumps.
7500 * Upgrade to libatomic_ops-1.0, and update build structure to match.
7501 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
7502 * Removed gc_local_alloc.h.  If THREAD_LOCAL_ALLOC is defined, the
7503 thread local allocation routines are now called automatically.
7504 * Renamed gc_inl.h back to gc_inline.h.  Changed the interface appreciably
7505 since locking has turned into a dominant issue, and in-line allocation
7506 only makes sense if it's no worse than thread-local allocation.
7507 Gc_inline.h is now also used to implement thread-local allocation.
7508 * Finished replacing stubborn allocation with manual write barrier.
7509 Untested.
7510 * Use thread-local allocation code by default.
7511 * Added GC_register_my_thread and friends for Posix and win32.
7512 * Patch for GWW_VDB from Ben Hutchings.
7513 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
7514 redefines GC_malloc.
7515 * Removed now unused AIX memory allocation code.
7516 * Various minor fixes for bugs introduced in 7.0alpha1.
7517
7518
7519 == [7.0alpha1] 2004-11-09 ==
7520
7521 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST.  Assume ANSI C compiler
7522 and use ANSI constructs unconditionally.
7523 * Introduce #elif and #error in some of the appropriate places.
7524 * Remove GC_printf cruft. Use stdargs.
7525 * Remove separate Solaris threads support.  Use the more generic Posix
7526 implementation.
7527 * Use atomic_ops for atomic operations and memory barriers.
7528 * Clean up MPROTECT_VDB implementation.  Use SA_SIGINFO wherever
7529 possible.
7530 * Remove broken SIGNALS stuff.
7531 * Use size_t instead of word, where appropriate.
7532 * Add .S.o rule to Makefile.am.
7533 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
7534 A/UX, HP), IBM PC/RTs and RISCOS/Irix4.  (I doubt the old code worked.
7535 If anyone cares, these should be easy to resurrect.)
7536 * Add EXPECT() in some critical places.
7537 * Redefined hb_sz and hb_body to deal with bytes rather than words.
7538 This affected a great deal of code.  I would like to consistently use
7539 byte offsets and sizes where there's not a convincing reason to do
7540 otherwise.
7541 * Redefined several other variables (GC_mem_found, GC_words_allocd)
7542 etc. to use units of bytes.  Most of these were also renamed to
7543 reflect that fact.
7544 * Killed as many "register" declarations as possible.
7545 * Partially replaced stubborn allocation with manual write barrier.
7546 It's currently broken.
7547 * Restructured mark code, to allow mark bits to be kept either on
7548 a per allocation granule or per object basis.  The emphasis is
7549 now on the -DUSE_MARK_BYTES option, since individual bits perform
7550 quite badly on hyper-threaded P4s, and are probably suboptimal on
7551 other architectures.  -DUSE_MARK_BITS is currently broken, and may
7552 be resurrected only for the single-threaded case.  This significantly
7553 reduced the cache footprint required by auxiliary GC data structures.
7554 It also reduces space overhead for small heaps.  It probably slows
7555 things down slightly if interior pointers are very common.
7556 * As part of the above, we now maintain an approximate count of set
7557 mark bits in each heap block.
7558 * As part of the above, the semantics of hb_map changed drastically.
7559 For MARK_BIT_PER_OBJ, it doesn't exist.  For MARK_BIT_PER_GRANULE,
7560 it is purely a way to replace a mod instruction with a table lookup.
7561 (Somewhat to my surprise, this still wins on modern hardware.)
7562 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros.  Everything is
7563 now controlled by GC_print_stats variable and GC_PRINT_STATS
7564 and new GC_PRINT_VERBOSE_STATS environment variables.
7565 * Add GC_log_printf and use it consistently for logging output.
7566 * Unconditionally count the objects we reclaim in the sweep phase.
7567 For thread local allocation, we need that anyway, and we expect
7568 that's increasingly the only case that matters.  And it simplifies
7569 the code.  In general expect minor performance hacks that benefit
7570 only the single-threaded case to disappear.
7571 * Remove GC_quiet from gc.h and elsewhere.
7572 * Changed the heap expansion heuristic, and the definition of
7573 GC_free_space_divisor, to refer to live data size, instead of total
7574 heap size.  I believe this is much more robust.  It wasn't previously
7575 possible, because we didn't have access to live data size.
7576 * Thread local allocation added the extra byte in twice: Once in
7577 thread_local_alloc, and once in malloc_many.
7578 * Removed GC_malloc_words_small and GC_gcj_fast_malloc.  A new
7579 mechanism based on the thread local allocation data structures
7580 is expected to be added instead.  This should allow inlined code
7581 that is both fast and doesn't rely on collector internals.
7582 * Changed both free lists and reclaim lists to be indexed by granules
7583 instead of words, norming halving their size.
7584 * MERGE_SIZE is now the only option, and the macro was removed.
7585 (Without it, we need a memory reference to GC_all_interior_pointers
7586 anyway.  Thus it costs us nothing.)
7587 * Change GC_size_map to map to granules instead of words.  Make sure
7588 that every possible size up to TINY_FREELISTS is present.
7589 * Split of macros need for fast inline allocation into gc_tiny_fl.h
7590 in anticipation of a new inline allocator that doesn't rely on GC
7591 internals.
7592 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
7593 in anticipation of a merge with the inline allocation code.
7594 * Removed ALIGN_DOUBLE.  This is mostly handled by GRANULE_BYTES.
7595 * Make locking on most platforms conditional on GC_need_to_lock.
7596
7597
7598 == [6.9] ==
7599
7600 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
7601 * Fix M68K LINUX port (thanks to Debian packagers).
7602 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
7603 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
7604 * Applied FreeBSD/X86_64 patch.
7605
7606
7607 == [6.8] 2006-07-08 ==
7608
7609 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
7610 Thomas Klausner).
7611 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
7612 to Andreas Tobler).
7613 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
7614 extremely unlikely circumstances.  (Thanks to Jean-Baptiste Nivois for
7615 some careful code inspection.)
7616 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
7617 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
7618 * Added initial Solaris/X86-64 support (thanks to Rainer Orth).
7619
7620
7621 == [6.7] 2006-03-03 ==
7622
7623 * Add "int" to Solaris "end" and "etext" declaration in gc.h.  Declared
7624 the symbols with underscores and as arrays, since that's what's actually
7625 used.  Perhaps this could all just be removed.  (Thanks to John Bowman.)
7626 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
7627 * Added casts for assignments to hb_last_reclaimed, which truncate the
7628 value.  Added a cast to GC_adj_words_allocd.  Use GetModuleHandleA
7629 when retrieving a handle to kernel32.dll under win32.
7630 * Added Tandem S-Series support.  (Thanks to Craig McDaniel.  A modified
7631 version of his patch was applied, and hence breakage is probably not
7632 his fault.)
7633 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
7634 to Hanno Boeck).
7635 * Changed a test for LINUX in config_macros.h to one for __linux__.
7636 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
7637 David Ayers).
7638 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
7639 (thanks to Andreas Tobler).
7640 * Add support for Darwin/X86 (thanks to Geoff Norton and the Mono
7641 developers).
7642 * Merge in some recent gcc fixes.  Add ppc64 asm code.  (Thanks to
7643 Bryce McKinlay and other GCJ developers.)
7644 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
7645 * Interior pointers with some largish offsets into large objects could
7646 be ignored, if GC_all_interior_pointers was set.  (Oddly this worked
7647 correctly for stack references if it was not set.  Otherwise it failed
7648 for both stack and heap references.  Thanks to Andrew McKinlay for the
7649 critical test case.)
7650 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
7651 untested changes.
7652 * Added GC_strdup and friends to make leak detection work correctly
7653 for strdup clients (thanks to Jon Moore).  Fixed the existing strdup
7654 with malloc redirection to handle a null malloc return correctly.
7655
7656
7657 == [6.6] 2005-09-09 ==
7658
7659 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
7660 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
7661 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
7662 * Don't access the GC thread structure from the restart handler.  It's
7663 unsafe, since the handler may run too late.  (Thanks to Ben Maurer for
7664 tracking this down.)
7665 * Applied Christian Thalinger's patch to change comment syntax in
7666 alpha_mach_dep.S.
7667 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
7668 Juan Jose Garcia-Ripoll).
7669 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
7670 Sugioka Toshinobu and Christian Thalinger).
7671 * Rewrote GC_parse_map_entry.  This assumed a fixed column layout of
7672 /proc/self/maps on Linux.  This ceased to be true about 2 years ago.
7673 The old code is probably quite problematic with -DREDIRECT_MALLOC.  It
7674 is also used by default for IA64, though I haven't seen actual failures
7675 there.
7676 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
7677 4K pages (thanks to Andrew Haley).
7678 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
7679 to Ben Hutchings for the observation and patch).
7680 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
7681
7682
7683 == [6.5] 2005-05-22 ==
7684
7685 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
7686 * Make GC_approx_sp() write to dummy location to ensure that stack
7687 is grown here, when sp looks reasonable, rather than later, when
7688 it might look like a bad memory reference.  (Problem was never
7689 observed that I know of.  But on rereading the code it seemed
7690 dubious.)
7691 * Separate out GC_with_callee_saves_pushed and sometimes call
7692 it from GC_suspend_handler in pthread_stop_world.c.  Callee-save
7693 register values sometimes failed to get traced under HP/UX on
7694 PA-RISC.  Linux/IA64 had the same problem, though non-stacked
7695 callee-save registers seem to be so rarely used there that nobody
7696 ever noticed.
7697 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
7698 from Andreas Tobler, which I had lost.
7699 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
7700 pickier compiler versions.
7701 * Fixed Itanium 32-bit ABI support (HP/UX).  In particular, the
7702 compare_and_exchange implementation didn't consider that possibility.
7703 * Undefine GC_pthread_detach in win32_threads.c (thanks to
7704 Tommaso Tagliapietra).
7705 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
7706 * Applied Dan Bonachea's patch to use mmap on AIX.
7707 * Several fixes to resurrect the Irix port on recent OS versions.
7708 * Change ALPHA to use LINUX_STACKBOTTOM.
7709 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM.  Deal with potential
7710 bad values of __libc_stack_end on that platform (thanks to David Miller).
7711 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
7712 (Unnecessary in 7.0)
7713 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
7714 we get prototypes.  (Unnecessary in 7.0)
7715 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
7716 which are only defined in private include files.
7717 * Integrated some small gcconfig.h patches from Dan Bonachea.  Also
7718 relaxed assertion about FreeBSD stack size in pthread_support.c.
7719 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
7720 support.  This may need additional work.
7721 * Avoided potentially infinite recursion in GC_save_callers if
7722 the system backtrace calls malloc.  The workaround currently requires
7723 __thread support if this code is used with threads.
7724 * Avoided another similar infinite recursion by conditionally
7725 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
7726 for helping to track down both of these).
7727 * Removed all traces of aix_irix_threads.c.  AIX and Irix now use
7728 pthread_support.c and pthread_stop_world.c.  The old code appeared
7729 to be unreliable for AIX, and was not regularly maintained.
7730 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
7731 they're not always safe to read.
7732 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
7733 in GC_remove_from_fl.
7734 * Fix stack_size assertion in GC_pthread_create.
7735 * Fix assertion in GC_steal_mark_stack.
7736
7737
7738 == [6.4] 2004-12-21 ==
7739
7740 * Merge gcconfig.h changes from gcc tree.
7741 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
7742 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
7743 * Start marker threads in GC_thr_init, so that they get started even
7744 if no other threads are ever started.  (Oddly enough, the parallel
7745 collector worked correctly, though not well, with no helper threads.)
7746 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
7747 is set (thanks to Alexander Petrossian).
7748 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
7749 * Let in_progress_space in backgraph.s grow dynamically.
7750 * Fix README.solaris2.  The GC_thr_init() hack doesn't work anymore.
7751 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
7752 * Add missing declaration for GC_generic_malloc_words_small_inner.
7753 Without it, s390x breaks.  (Thanks to Ulrich Weigand.)
7754 * Applied several MacOSX patches to support older tool chains (thanks
7755 to Stefan Ring).
7756 * Bug fix for NetBSD/amd64 (thanks to Marc Recht).
7757 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
7758 * Fixed an uninitialized variable in cordprnt.c.
7759 * Eliminated some, but not all, gcc -Wall warnings.
7760 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
7761 (thanks to Dan Grayson).
7762 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
7763 GC_DONT_ADD_BYTE_AT_END is set.
7764 * Changed some (long) casts to (word) in preparation for win64 (thanks
7765 to Peter Colson).
7766 * Changed "int stack_size" declaration in pthread_support.c to use
7767 size_t.  (Only mattered with GC_ASSERTIONS enabled.)
7768 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
7769 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
7770 it with a check that the mapping type is MEM_IMAGE.
7771 In theory, this should work much better, but it is a high
7772 risk change for win32.  (Thanks to Ashley Bone for the crucial
7773 experimental data behind this, and to Rutger Ovidius for
7774 some further experiments.)
7775 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
7776 words.
7777 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
7778 reason.  (A hack to avoid some extremely unlikely scenarios in which
7779 we manage to allocate only "wasted" space.  7.0 has a better fix.)
7780 * Changed PowerPC GC_clear implementation to use lwsync instead of
7781 eieio, since the documentation recommends against eieio, and
7782 it seems to be incorrect if the preceding memory op is a load.
7783 * Fixed print_block_list to print the correct kind number for
7784 STUBBORN (thanks to Rutger Ovidius).
7785 * Have configure.in generate an error if it is asked to support
7786 pthreads, but doesn't know how to.
7787 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
7788 * Have the GNU build mechanism link with -ldl.  Rename THREADLIBS
7789 to THREADDLLIBS to reflect this.  (Thanks to Sven Verdoolaege.)
7790 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
7791 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
7792 (Thanks to John Merryweather Cooper.)
7793 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
7794 dirty page tracking mechanism uses threads.  (This avoids an undefined
7795 reference to _GC_darwin_register_mach_handler_thread.)
7796 * By popular demand, use __libc symbols only if we are built with
7797 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
7798 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
7799 The GC itself will dirty lots of pages in this cases, probably making
7800 it counterproductive on all platforms.  And the DARWIN port crashes.
7801
7802
7803 == [6.3] 2004-07-08 ==
7804
7805 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
7806 * Very large allocations could cause a collector hang.  Correct
7807 calculation of GC_collect_at_heapsize.
7808 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
7809 was defined.
7810 * Include gc_config_macros.h in threadlibs.c.
7811 * Correct MacOSX thread stop code (thanks to Dick Porter).
7812 * SMALL_OBJ definition was off by one.  This could cause crashes
7813 at startup.  (Thanks to Zoltan Varga for narrowing this down to
7814 a trivial test case.)
7815 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
7816 thread stopping code.
7817 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
7818 implementation.  The old approach appears to have been broken by
7819 recent kernels.
7820 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
7821 to Andrew Begel).
7822 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
7823 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
7824
7825
7826 == [6.3alpha6] 2004-05-06 ==
7827
7828 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
7829 * Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
7830 different prefetch instructions from AMD64).  (Thanks to H.J. Lu.)
7831 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
7832 GC_THREADS.
7833 * Added simple_example.html.
7834 * Merged Andrew Gray's patch to correctly restore signal handlers on
7835 FreeBSD.
7836 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
7837 on x86-64.  Added some other casts so that the PREFETCH macros
7838 always get a ptr_t argument.  Removed some casts in the PREFETCH
7839 implementations.
7840 * Added a header guard for gc_allocator.h and changed GC_debug_free to
7841 clobber contents of deallocated object (suggested by Jesse Jones).
7842 * The signal masking code in pthread_stop_world.c contained some errors.
7843 In particular SIGSEGV was masked in the handler, in spite of the fact that
7844 it wrote to the heap.  This could lead to an uncaught SIGSEGV, which
7845 apparently became much more likely in Linux 2.6.  Also fixed some
7846 typos, and reduced code duplication in the same area.
7847 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
7848 Adrian Bunk for the patches).
7849 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
7850
7851
7852 == [6.3alpha5] 2004-03-30 ==
7853
7854 * Fix & vs && typo in GC_generic_malloc and
7855 GC_generic_malloc_ignore_off_page.  (Propagated from the gcc tree.)
7856 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
7857 (According to Christian Limpach, the NetBSD problem is fixed.
7858 Presumably so is the Solaris 2.3 problem.)
7859 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
7860 to Simon Gornall for the patch).
7861 * Changed semantics of the GC_IGNORE_FB environment variable, based
7862 on experimentation by Nicolas Cannasse pointing out that the old
7863 interpretation was useless.  We still need help in identifying win32
7864 graphics memory mappings.  The current "solution" is a hack.
7865 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
7866 It probably made more sense in the gcc context.
7867 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
7868 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
7869 supports the same extension on various platforms.
7870 * Added some basic (completely untested) defines for win64, in support
7871 of future work.
7872 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
7873 a memory overwrite bug on Solaris and perhaps other platforms.
7874 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
7875 Jakub Jelinek for the patch and explaining the problem).
7876 Otherwise pre-linking could cause the collector to fail.
7877 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
7878 for HP/UX with gcc.  The compiler-based implementation appears to work
7879 only with the vendor compiler.
7880 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
7881 making client mark code cleaner and less dependent on GC version.
7882 * Export several new procedures and GC_generic_malloc from gc_mark.h
7883 to support user-defined kinds.  Use the new procedures to replace existing
7884 code in gcj_mlc.c and typd_mlc.c.
7885 * Added support for GC_BACKTRACES.
7886 * Fixed a remaining problem in CORD_str with signed characters (thanks
7887 to Alexandr Petrosian for the patch).
7888 * Removed supposedly redundant, but very buggy, definitions of finalizer
7889 macros from javaxfc.h.  Fortunately this file probably has no users.
7890 The correct declarations were already in gc.h.
7891 * Also need to set GC_in_thread_creation while waiting for GC during
7892 thread termination, since it is also possible to collect from an
7893 unregistered thread in that case.
7894 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
7895 Plus some other minor WinCE fixes (thanks to Alain Novak).
7896 * Added GC_register_describe_type_fn.
7897 * Arrange for debugging finalizer registration to ignore non-heap
7898 registrations, since the regular version of the routine also behaves
7899 that way.
7900 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
7901 One of the more obscure allocation routines with missing a LOCK() call.
7902 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
7903 to work with VS.NET.
7904 * Cleaned up GC_INIT calls in test.  Updated gc.man to encourage GC_INIT
7905 use in portable code.
7906 * Taught the GC to use libunwind if --enable-full-debug is specified on
7907 IA64 and libunwind is present.
7908 * The USE_MUNMAP code could get confused about the age of a block and
7909 prematurely unmap it.  GC_unmap_old had a bug related to wrapping of
7910 GC_gc_no.  GC_freehblk and GC_merge_unmapped didn't maintain
7911 hb_last_reclaimed reasonably when blocks were merged.  The code was
7912 fixed to reflect original intent, but that may not always be an
7913 improvement.
7914
7915
7916 == [6.3alpha4] 2004-01-01 ==
7917
7918 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
7919 * Darwin support was broken in alpha3 as a result of my mis-integration of
7920 Andrew Begel's patches.  Fixed with another patch from Andrew Begel.
7921 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
7922 overly aggressive.  We may collect from an unregistered thread during
7923 thread creation.  Fixed by explicitly checking for that case.  (Added
7924 GC_in_thread_creation.)
7925
7926
7927 == [6.3alpha3] 2003-12-20 ==
7928
7929 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
7930 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
7931 * Mostly applied a DJGPP patch from Doug Kaufman.  Especially Makefile.dj
7932 had suffered from serious bit rot.
7933 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
7934 and a call to alloca (for lcc compatibility).
7935 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
7936 the memory with PROT_NONE instead of unmapping it.  The latter risks
7937 an intervening mmap grabbing the address space out from underneath us.
7938 Updated this code to reflect a cleaner patch from Ulrich Drepper.
7939 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
7940 (Patch from Andrew Begel.)
7941 * Dynamically choose whether or not lock should spin on win32 (thanks
7942 to Maurizio Vairani for the patch).  This may be a significant performance
7943 improvement for win32.
7944 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
7945 in the distribution (thanks to Maurizio Vairani).
7946 * Maybe_install_looping_handler() was accidentally exported, violating
7947 our name space convention.
7948 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD.  (Thanks to
7949 Christian Limpach.  I generalized the patch to use sigsetjmp on all
7950 UNIX_LIKE platforms, admittedly a slightly risky move.  But it may avoid
7951 similar problems on some other platforms.  I also cleaned up the definition
7952 of UNIX_LIKE a bit.)
7953 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
7954 some of Fergus Hendersons's comments.  (Patch didn't apply cleanly,
7955 errors are possible.)
7956 * Added another test or two for the Intel 8.0 compiler to avoid
7957 confusing it with gcc.  The single-threaded collector should now build
7958 with icc, at least on ia64.
7959
7960
7961 == [6.3alpha2] 2003-11-04 ==
7962
7963 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
7964 * Put back the WINABI qualifier for GC_CreateThread.  (Thanks to
7965 Danny Smith for the patch.  6.3alpha1 had the qualifier in one place
7966 but not elsewhere, which was clearly wrong.)
7967 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
7968 include.  (Thanks to Andreas Tobler for posting the patch.)
7969 * Included signal.h from pthread_support.c.  Removed GC_looping_handler,
7970 which was dead code.
7971 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
7972 defined (thanks to Glauco Masotti for testing and reporting this).
7973 Changed GC_find_start to never just return 0.  According to its
7974 comment it doesn't, and it's unclear that's correct.
7975 * GC_alloc_large had several largely compensating bugs in the
7976 computation of GC_words_wasted.  (It was confused about bytes vs.
7977 words in two places.)
7978 * Integrated Slava Sysoltsev's patch to support more recent versions of
7979 the Intel compiler on IA64/Linux.
7980 * Changed win32 spinlock initialization to conditionally set a spin count.
7981 (Emmanual Stumpf pointed out that enabling this makes a large performance
7982 difference on win32 multiprocessors.)  Also cleaned up the win32 spinlock
7983 initialization code a bit.
7984 * Fixed thread support for HP/UX/IA64.  The register backing store base for
7985 the main thread was sometimes not set correctly.  (Thanks to
7986 Laurent Morichetti.)
7987 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
7988 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
7989 avoid 64-bit size mismatches (thanks to Bernie Solomon).
7990 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
7991 tail call optimization.  This could lead to prematurely reclaimed
7992 objects on configurations that used the generic routine and the new
7993 build infrastructure (which potentially optimizes mach_dep.c).
7994 This was a serious bug, but it's unclear whether it has resulted in
7995 any real failures.
7996 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
7997 for noticing the problem and supplying the patch).
7998 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
7999 to Anthony Green).
8000 * Partially merged a win32 patch from Ben Hutchings, and substantially
8001 revised other parts of win32_threads.c.  It had several problems.
8002 Under MinGW with a statically linked library, the main thread was
8003 not registered.  Cygwin detached threads leaked thread descriptors.
8004 There were several race conditions.  For now, unfortunately the
8005 static threads limit remains, though we increased it, and made table
8006 traversal cost depend on the actual thread count.
8007 There is also still some code duplication with pthread_support.c.
8008 (Thread descriptors did become much smaller, since Ben Hutchings
8009 removed the thread context from them.)
8010 * Integrated a Solaris configure.in patch from Rainer Orth.
8011 * Added GC_IGNORE_FB and associated warning to very partially address
8012 the issue of the collector treating a mapped frame buffer as part
8013 of the root set.  (Thanks to David Peroutka for providing some
8014 insight.  More would be helpful.  Is there anything that can be used
8015 to at least partially identify such memory segments?)
8016
8017
8018 == [6.3alpha1] 2003-07-26 ==
8019
8020 * Integrated some NetBSD patches by Marc Recht.  These
8021 were already in the NetBSD package.
8022 * GC_pthread_create waited for the semaphore even if pthread_create failed.
8023 (Thanks to Dick Porter for the pthread_support.c patch.)  Applied the
8024 analogous fix for aix_irix_threads.c.
8025 * Added Rainer Orth's Tru64 fixes.
8026 * The check for exceeding the thread table size in win32 threadDetach
8027 was incorrect (thanks to Alexandr Petrosian for the patch).
8028 * Applied Andrew Begel's patch to correct some reentrancy issues
8029 with dynamic loading on Darwin.
8030 * GC_CreateThread() was neglecting to duplicate the thread handle in
8031 the table (thanks to Tum Nguyen for the patch).
8032 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
8033 Roger Sayle for the patch).
8034 * Applied more AIX threads patches from Scott Ananian.
8035
8036
8037 == [6.2] 2003-06-21 ==
8038
8039 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
8040 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
8041 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
8042 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
8043 * There was a race between GC_pthread_detach and thread exit that could
8044 result in a thread structure being deallocated by GC_pthread_detach
8045 even though it was still needed by the thread exit code (thanks to
8046 Dick Porter for the small test case that allowed this to be debugged).
8047 * Fixed version parsing for non-alpha versions in acinclude.m4 and
8048 version checking in version.h.
8049 * Issues identified (not yet fixed):
8050 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
8051 against libdl.
8052 - GC_proc_fd for Solaris is not correctly updated in response to a
8053 fork() call.  Thus incremental collection in the child won't work
8054 correctly.  (Thanks to Ben Cottrell for pointing this out.)
8055 - --enable-redirect-malloc is mostly untested and known not to work
8056 on some platforms.
8057 - There seem to be outstanding issues on Solaris/X86, possibly with
8058 finding the data segment starting address.
8059 - Very large root set sizes (> 16 MB or so) could cause the collector
8060 to abort with an unexpected mark stack overflow.  (Thanks to
8061 Peter Chubb.)  NOT YET FIXED.  Workaround is to increase the initial
8062 size.
8063 - The SGI version of the collector marks from mmapped pages, even
8064 if they are not part of dynamic library static data areas.  This
8065 causes performance problems with some SGI libraries that use mmap
8066 as a bitmap allocator.  NOT YET FIXED.  It may be possible to turn
8067 off DYNAMIC_LOADING in the collector as a workaround.  It may also
8068 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
8069 The real fix is to walk rld data structures, which looks possible.
8070 - Incremental collector should handle large objects better.  Currently,
8071 it looks like the whole object is treated as dirty if any part of it is.
8072
8073
8074 == [6.2alpha6] 2003-06-05 ==
8075
8076 * There was an extra underscore in the name of GC_save_registers_in_stack
8077 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
8078 * Integrated Brian Alliet's patch for Darwin.  This restructured the
8079 linuxthreads/pthreads support to separate generic pthreads support
8080 from more the system-dependent thread-stopping code.  I believe this
8081 should make it easier to eliminate the code duplication between
8082 pthreads platforms in the future.  The patch included some other
8083 code cleanups.
8084 * Integrated Dan Bonachea's patch to support AIX threads.  This required
8085 substantial manual integration, mostly due to conflicts with other
8086 recent threads changes.  It may take another iteration to
8087 get it to work.
8088 * Removed HPUX/PA-RISC support from aix_irix_threads.c.  It wasn't used
8089 anyway and it cluttered up the code.  And anything we can do to migrate
8090 towards generic pthreads support is a good thing.
8091 * Added a more explicit test for tracing of function arguments to test.c.
8092 * Added Akira Tagoh's PowerPC64 patch.
8093 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
8094 pointing it out).  gc.h now includes just windows.h, not winbase.h.
8095 * Declared GC_save_regs_in_stack() in gc_priv.h.  Remove other declarations.
8096 * Changed --enable-cplusplus to use automake consistently.  The old way
8097 confused libtool.  "Make install" didn't work correctly for the old version.
8098 Previously --enable-cplusplus was broken on cygwin.
8099 * Changed the C version of GC_push_regs to fail at compile time if it is
8100 generated with an empty body.  This seems to have been the cause of one
8101 or two subtle failures on unusual platforms.  Those failures should
8102 now occur at build time and be easily fixable.
8103
8104
8105 == [6.2alpha5] 2003-05-14 ==
8106
8107 * GC_invoke_finalizers could, under rare conditions, set
8108 GC_finalizer_mem_freed to an essentially random value.  This could
8109 possibly cause unbounded heap growth for long-running applications
8110 under some conditions.  (The bug was introduced in 6.1alpha5, and
8111 is not in gcc3.3.)
8112 * Attempted to sanitize the various DLL macros.  GC_USE_DLL disappeared.
8113 GC_DLL is used instead.  All internal tests are now on GC_DLL.
8114 README.macros is now more precise about the intended meaning.
8115 * Include DllMain in the multi-threaded win32 version only if the
8116 collector is actually built as a dll (thanks to Mohan Embar for
8117 a version of the patch).
8118 * Hide the cygwin threadAttach/Detach functions.  They were violating our
8119 namespace rules.
8120 * Fixed an assertion in GC_check_heap_proc.  Added GC_STATIC_ASSERT
8121 (thanks again to Ben Hutchings).
8122 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
8123 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
8124 a CORD invariant.  Also tweaked the re-balancing rule for
8125 CORD_cat_char_star.  (Thanks to Alexandr Petrosian for the bug report
8126 and patch.)
8127 * Added hand-coded structured exception handling support to mark.c.
8128 This should enable support of dynamic libraries under win32 with
8129 gcc-compiled code.  (Thanks to Ranjit Mathew for the patch.)
8130 Turned on dynamic library scanning for win32/gcc.
8131 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
8132 GC_USE_LD_WRAP was probably broken in recent versions.
8133 * The build could fail on some platforms since gcconfig.h could include
8134 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
8135 was built (thanks to Yann Dirson for pointing this out).  Also
8136 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
8137 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
8138 collection, since the write fault handler was erroneously overridden.
8139 Handlers are now set up in the correct order.
8140 * It used to be possible to call GC_mark_thread_local_free_lists() while
8141 the world was not stopped during an incremental GC.  This was not safe.
8142 Fortunately, it was also unnecessary.  Added GC_world_stopped flag
8143 to avoid it.  (This caused occasional crashes in GC_set_fl_marks
8144 with thread local allocation and incremental GC.  This probably happened
8145 primarily on old, slow multiprocessors.)
8146 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
8147 command line (thanks to Yannis Bres for the patch).
8148 * Taught the IA64/linux code to determine the register backing store base from
8149 /proc/self/maps after checking the __libc symbol, but before guessing.
8150 (__libc symbols are on the endangered list, and the guess is likely to not
8151 always be right for 2.6 kernels.)  Restructured the code to read and parse
8152 /proc/self/maps so it only exists in one place (all platforms).
8153 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux.  It claimed that it
8154 also registered the main data segment, but didn't actually do so.  (I don't
8155 think anyone actually uses this configuration, but ...)
8156 * Made another attempt to get --enablecplusplus to do the right thing.
8157 Since there are unavoidable problems with C programs linking against a
8158 dynamic library that includes C++ code, I separated out the c++ code into
8159 libgccpp.
8160
8161
8162 == [6.2alpha4] 2003-03-10 ==
8163
8164 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS.  (See Debian bug
8165 # 177204)
8166 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
8167 * Integrated Grzegorz Jakacki's substantial GNU build patch.  "Make dist"
8168 should now work for the GNU build process.  Documentation files
8169 are installed under share/gc.
8170 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
8171 Rene Girard for pointing out the problems).
8172 * Updated BCC_MAKEFILE (thanks to Rene Girard).
8173 * Added GC_ASSERT check for minimum thread stack size.
8174 * Added --enable-gc-assertions.
8175 * Added some web documentation to the distribution.  Updated it in the
8176 process.
8177 * Separate gc_conf_macros.h from gc.h.
8178 * Added generic GC_THREADS client-defined macro to set the appropriate
8179 GC_XXX_THREADS internal macro.  (gc_config_macros.h.)
8180 * Add debugging versions of _ignore_off_page allocation primitves.
8181 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
8182 from gc.h to gc_priv.h.
8183 * Reset GC_fail_count even if only a small allocation succeeds.
8184 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
8185 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
8186 when it should have called the lower case version, since it was
8187 explicitly computing a base pointer.
8188
8189
8190 == [6.2alpha3] 2003-01-30 ==
8191
8192 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
8193 exist.
8194
8195
8196 == [6.2alpha2] ==
8197
8198 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
8199 Hironori Sakamoto for the patch).
8200 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
8201 * Attempted to work around the problems with .S filenames and the SGI
8202 compiler.  (Untested.)
8203 * Worked around an HP/UX make issue with the GNU-style build process.
8204 * Fixed the --enable-cplusplus build machinery to allow builds without
8205 a C++ compiler.  (That was always the intent ...)
8206 * Changed the debugging allocation macros to explicitly pass the return
8207 address for Linux and XXXBSD on hardware for which we can't get stack
8208 traces.  Use __builtin_return_address(0) to generate it when possible.
8209 Some of the configuration work was cleaned up (good) and moved to gc.h
8210 (bad, but necessary).  This should make leak detection more useful
8211 on a number of platforms.  (Thanks to Fabian Thylman for the suggestion.)
8212 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
8213 * Bumped revision number for dynamic library.
8214
8215
8216 == [6.2alpha1] 2003-01-23 ==
8217
8218 * Guard the test for GC_DUMP_REGULARLY in misc.c with
8219 "#ifndef NO_DEBUGGING".  Otherwise it fails to build with NO_DEBUGGING
8220 defined.  (Thanks to Manuel Serrano.)
8221 * Message about retrying suspend signals was incorrectly generated even when
8222 flag was not set.
8223 * Cleaned up MACOSX/NEXT root registration code.  There was apparently a
8224 separate ifdef case in GC_register_data_segments() for no reason.
8225 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
8226 * Arrange for gc.h and friends to be correctly installed with GNU-style
8227 "make install".
8228 * Enable the GNU-style build facility include C++ support in the library
8229 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
8230 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
8231 from the garbage collected heap, as it is with our own thread-specific
8232 storage implementation (thanks to Jeff Sturm).
8233 * Mark all free list header blocks if they are heap allocated.  This avoids
8234 some unnecessary tracing.  And it remains correct if we clear the
8235 root set.  (Thanks to Jeff Sturm for identifying the bug.)
8236 * Improved S390/Linux support.  Add S390/Linux 64-bit support (thanks to
8237 Ulrich Weigand).
8238 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
8239 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h.  This is technically
8240 an interface change.  Based on the fact that nobody reported this,
8241 I suspect/hope there were no clients.
8242 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
8243 when appropriate, (2) doesn't generate references to undefined internal
8244 macros, and (3) allows easier manual construction of descriptors.
8245 * Close the file descriptor used by GC_print_address_map().
8246 * Set the "close-on-exec" bit for various file descriptors maintained
8247 for the collector's internal use.
8248 * Added a hack to find memory segments owned by the system allocator
8249 under win32.  Based on my tests, this tends to eventually find all
8250 segments, though it may take a while.  There appear to be cleaner,
8251 but slower solutions under NT/XP.  But they rely on an API that's
8252 unsupported under 9X.
8253 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM.  (Thanks
8254 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
8255 64-bit kernels.)
8256 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
8257 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
8258 of candidate pointers for tagging, etc.
8259 * Always lock around GC_notify_full_gc().  Simplified code for
8260 invoking GC_notify_full_gc().
8261 * Changed the way DATASTART is defined on FreeBSD to be robust against
8262 an unmapped page after etext.  (Thanks to Hironori Sakamoto for
8263 tracking down the intermittent failure.)
8264 * Made GC_enable() and GC_disable() official.  Deprecated direct update
8265 of GC_dont_gc.  Changed GC_gcollect to be a noop when garbage collection
8266 is disabled.
8267 * Call GC_register_dynamic_libraries before stopping the world on Linux,
8268 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
8269 * Introduced a more general mechanism for platform-dependent code to
8270 decide whether the main data segment should be handled separately
8271 from dynamic libraries, or registered by GC_register_dynamic_libraries.
8272 The latter is more reliable and easier on Linux with dl_iterate_phdr.
8273
8274
8275 == [6.1] ==
8276
8277 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
8278 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
8279 * Double page hash table size for -DLARGE_CONFIG.
8280 * Integrated Bo Thorsen's X86-64 support.
8281 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
8282 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
8283 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
8284 SEARCH_FOR_DATA_START.  It doesn't hurt to fall back to a search.
8285 And __data_start doesn't seem to get defined correctly of the GC
8286 library is loaded with LD_PRELOAD, e.g. for leak detection.
8287 * If the GC_find_leak environment variable is set, do a
8288 atexit(GC_gcollect) to give us at least one chance to detect leaks.
8289 This may report some very benign leaks, but ...
8290 * Addeded REDIRECT_FREE.  It's necessary if we want leak detection with
8291 LD_PRELOAD.
8292 * Defer printing of leaked objects, as for smashed objects.
8293 * Fixed process and descriptor leak in GC_print_callers.  Try for
8294 line number even if we got function name.)
8295 * Ported parallel GC support and thread local allocation to Alpha.
8296 Not yet well-tested.
8297 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
8298 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
8299 alpha_mach_dep.s.
8300 * Incorporated a change to new_gc_alloc.h,
8301 which should make it work with gcc3.1.
8302 * Use alpha_mach_dep.S only on Linux.  (It's not clear that this is
8303 optimal, but it otherwise didn't build on Tru64.  Thanks to Fergus Henderson.)
8304 * Added ifdef to guard free() in os_dep.c.  Otherwise we get a
8305 compilation error on Irix (thanks to Dai Sato).
8306 * Added an experimental version of GC_memalign to mallocx.c.  This can't
8307 always work, since we don't handle alignment requests in the hblk-level
8308 allocator, and we can't handle arbitrary pointer displacements unless
8309 GC_all_interior_pointers is enabled.  But it should work for alignment
8310 requests up to HBLKSIZE.  This is not yet documented in the standard
8311 places.
8312 * Finally debugged the OSF1/Tru64 thread support.  This needs more testing,
8313 since I needed to add a somewhat unconvincing workaround for signal
8314 delivery issues that I don't yet completely understand.  But it does
8315 pass my tests, even in parallel GC mode.  Incremental GC support is
8316 disabled if thread support is enabled, due to the signal issues.
8317 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
8318 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
8319 declarations to gc.h.  On IA64, this is required for REDIRECT_MALLOC
8320 to work correctly with these.
8321 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
8322
8323
8324 == [6.1alpha5] 2002-06-19 ==
8325
8326 * Added GC_finalizer_mem_freed, and changed some of the code that
8327 decided on heap expansion to look at it.  Memory explicitly
8328 deallocated by finalizers essentially needs to be counted as reclaimed
8329 by the GC.  Otherwise there are cases in which the heap can grow
8330 infinitely.  (Thanks to Mark Reichert for the test case.)
8331 * Integrated Adam Megacz patches to not scan dynamic libraries if
8332 we are compiling with gcc on win32.  Otherwise we need structured
8333 exception handling to deal with asynchronously unmapped root
8334 segments, and gcc doesn't directly support that.
8335 * Integrated Anthony Green's patch to support Wine.
8336 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
8337 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
8338 * Integrated Loren J. Rittle's Alpha FreeBSD patches.  These also
8339 changed the declarations of symbols like _end on many platforms to
8340 that they wouldn't mistakenly be declared as short data symbols (suggested by
8341 Richard Henderson).
8342 * Integrated changes from the Debian distribution (thanks to Ryan Murray
8343 for pointing these out).
8344 Fix C++ comments in POWERPC port.  Add ARM32
8345 incremental GC support.  Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
8346 this time for real.  Use va_copy to get rid of cord printf problems
8347 (finally).
8348 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
8349 pointing out the omission).
8350 * Don't just drop gcj free lists in GC_start_reclaim, since that can
8351 eventually cause the marker to see a bogus mark descriptor in the
8352 dropped objects.  The usual symptom was a very intermittent segmentation
8353 fault in the marker.  This mattered only if one of the GC_gcj_malloc
8354 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
8355 Tom Tromey for helping to track this down).
8356 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
8357 Jeff Sturm, Tom Tromey, and Christian Joensson).
8358 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
8359 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
8360 This is needed on Linux.  I'm not sure whether it's better or worse
8361 on Tru64.
8362 * Changed gc_cpp.h once more to declare operator new and friends only in
8363 a Microsoft environment.  This may need further fine tuning (thanks to
8364 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
8365 * Don't ever override strdup if it's already macro defined (thanks to
8366 Adnan Ali for pointing out the problem).
8367 * Changed gc_cpp.h yet again to also overload placement new.  Due to the
8368 C++ overloading rules, the other overloaded new operations otherwise hide
8369 placement new, which causes many STL uses to break (thanks to Reza Shahidi
8370 for reporting this, and to Matt Austern for proposing a fix).
8371 * Integrated cygwin pthreads support from Dan Bonachea.
8372 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
8373 * Changed printing code to print more complete GC times.
8374 * Applied Mark Mitchell's Irix patch to correct some bit rot.
8375 * Clarified which object-printing routines in dbg_mlc.c should hold
8376 the allocation lock.  Restructured the code to allow reasonable object
8377 printing with -DREDIRECT_MALLOC.
8378 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
8379 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
8380 Jeffrey Mark Siskind).
8381 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
8382 with a system header (thanks to Philip Brown).
8383 * Cause win32_threads.c to handle an out of range stack pointer correctly,
8384 though currently with a warning.  (Thanks to Jonathan Clark for
8385 observing that win32 applications may temporarily use the stack
8386 pointer for other purposes, and suggesting a fix.  Unfortunately, it's
8387 not clear that there is a complete solution to this problem.)
8388
8389
8390 == [6.1alpha4] 2002-06-16 ==
8391
8392 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
8393 building.  Increased 64-bit heap size limit in test.c slightly, since
8394 a functional SPARC collector seems to slightly exceed the old limits.
8395 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
8396 go wrong.
8397 * Added GC_MARKERS environment variable to allow use of a single marker
8398 thread on an MP without confusing the lock implementation.
8399 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
8400 This is really a purely generational mode, and we can afford to
8401 postpone the collection until the heap is (nearly) full.
8402 * Remove read() wrapper for MPROTECT_VDB.  It was causing more harm than
8403 good.  It is often no longer needed if system calls avoid writing to
8404 pointerful heap objects.
8405 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
8406 * Change GC_test_and_set so that it consistently has one argument.
8407 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
8408 Ryan Murray).
8409 * Fixed a formatting error in dbg_mlc.c.  Added prototype to GC_abort()
8410 declaration (thanks to Michael Smith).
8411 * Removed "source" argument to GC_find_start().  Eliminate GC_FIND_START().
8412 * Added win32 recognition code in configure.in.  Changed some of the
8413 dllimport/export defines in gc.h (thanks to Adam Megacz).
8414 * GC_malloc_many didn't set hb_last_reclaimed when it called
8415 GC_reclaim_generic.  (I'm not sure this matters much, but ...)
8416 * Allocating uncollectible objects with debug information sometimes
8417 allocated objects that were one byte too small, since uncollectible
8418 objects don't have the extra byte added at the end (thanks to
8419 Wink Saville for pointing this out).
8420 * Added a bit more assertion checking to make sure that gcj objects
8421 on free lists never have a nonzero second word.
8422 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
8423 * Upgraded libtool, configure.in and some related files to hopefully
8424 support NetBSD/SPARC (thanks to Adrian Bunk).  Unfortunately,
8425 libtool 1.4.2 seemed to be buggy due to missing quotes in several
8426 "test" invocations.  Fixed those in the ltmain.sh script.
8427 * Some win32-specific patches, including the introduction of
8428 GC_CreateThread (thanks to Adam Megacz).
8429 * Merged in gcj changes from Anthony Green to support embedded systems.
8430 * Tried to consistently rename preprocessed assembly files with a capital
8431 .S extension.
8432 * Use alpha_mach_dep.S on ALPHA again.  It doesn't really matter, but this
8433 makes our distribution consistent with the gcc one, avoiding future merge
8434 problems.
8435 * Move GET_MEM definition into gcconfig.h.  Include gcconfig.h slightly
8436 later in gc_priv.h to avoid forward references to ptr_t.
8437 * Add some testing of local allocation to test.c.
8438 * Change definition of INVALID_QTID in specific.h.  The -1 value was used
8439 inconsistently, and too likely to collide with a valid stack address.
8440 Some general clean-up of specific.[ch].  Added assertions.  (Thanks
8441 to Michael Smith for tracking down an intermittent bug to this
8442 general area.  I'm not sure it has been squashed yet, however.)
8443 * On Pthread systems it was not safe to call GC_malloc() between fork()
8444 and exec().  According to the applicable standards, it doesn't appear
8445 to be safe to call malloc() or many other libc functions either, thus
8446 it's not clear this is fixable.  Added experimental support for
8447 -DHANDLE_FORK in linux_threads.c which tries to support it.  It may
8448 succeed if libc does the right thing.  I'm not sure whether it does.
8449 (Thanks to Kenneth Schalk for pointing out this issue.)
8450 * Documented thread local allocation primitives to require an
8451 explicit GC_init call.  GC_init_parallel is no longer declared to
8452 be a constructor function, since that isn't portable and often
8453 seems to lead to initialization order problems.
8454 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
8455 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
8456 * Some more patches for Linux on HP PA-RISC.
8457 * Added include/gc_allocator.h.  It implements (hopefully) standard
8458 conforming (as opposed to SGI-style) allocators that allocate
8459 collectible (gc_allocator) or GC-traceable, but not collectible
8460 (traceable_allocator) objects.  This borrows heavily from libstc++,
8461 which borrows heavily from the SGI implementation, this part of
8462 which was written by Matt Austern.  Changed test_cpp.cc to very
8463 minimally test this.
8464 * On Linux/X86, retry mmap with a different start argument.  That should
8465 allow the collector to use more (closer to 3GB) of the address space.
8466 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
8467 patch to the gcc tree).
8468 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
8469 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
8470 * Compensated for the fact that current versions of glibc set
8471 __libc_stack_end incorrectly on Linux/IA64 while initialization code
8472 is running.  This could cause the collector to miss 16 bytes of
8473 the memory stack if GC_malloc or friends where called before main().
8474 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
8475 This will probably take another iteration to work, since his
8476 patch conflicted with the libtool upgrade.
8477 * Added README.arm.cross containing some information about cross-
8478 compiling to an ARM processor from Margaret Fleck (original code provided by
8479 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
8480 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
8481
8482
8483 == [6.1alpha3] 2002-02-07 ==
8484
8485 * Minor cleanup on the gcconfig.h section for SPARC.
8486 * Minor fix to support Intel compiler for I386/Linux (thanks to
8487 Sven Hartrumpf).
8488 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
8489 * Restructured the way in which we determine whether or not to keep
8490 call stacks for debug allocation.  By default SAVE_CALL_COUNT is
8491 now zero on all platforms.  Added SAVE_CALL_NARGS parameters.
8492 If possible, use execinfo.h to capture call stack.  (This should
8493 add support for a number of new platforms, though often at
8494 considerable runtime expense.)
8495 * Try to print symbolic information for call stacks.  On Linux, we
8496 do this with a combination of execinfo.h and running addr2line in
8497 a separate process.  This is both much more expensive and much more
8498 useful.  Amazingly, it seems to be fast enough for most purposes.
8499 * Redefined strdup if -DREDIRECT_MALLOC is given.
8500 * Changed incremental collector and MPROTECT_VDB implementation so that,
8501 under favorable conditions, pointer-free objects are not protected.
8502 Added GC_incremental_protection_needs() to determine ahead of time whether
8503 pointer-free objects may be protected.  Replaced GC_write_hint() with
8504 GC_remove_protection().
8505 * Added test for GC_ENABLE_INCREMENTAL environment variable.
8506 * Made GC_time_limit runtime configurable.  Added GC_PAUSE_TIME_TARGET
8507 environment variable.
8508 * Eliminated GC_page_sz, a duplicate of GC_page_size.
8509 * Caused the Solaris and Irix thread creation primitives to call
8510 GC_init_inner().
8511
8512
8513 == [6.1alpha2] 2001-12-20 ==
8514
8515 * No longer wrap read by default in multi-threaded applications.  It was
8516 pointed out on the libgcj list that this holds the allocation lock for
8517 way too long if the read blocks.  For now, reads into the heap are
8518 broken with incremental collection.  It's possible to turn this back on
8519 if you make sure that read calls don't block (e.g. by calling select
8520 first).
8521 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
8522 * Added check for environment variable GC_IGNORE_GCJ_INFO.
8523 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
8524 variable is set.
8525 * The calloc definition in leak_detector.h was missing parentheses, and
8526 realloc was missing a second argument to GC_REALLOC (thanks to
8527 Elvenlord Elrond).
8528 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
8529 code, mostly in the new file backgraph.c.  See doc/README.environment.
8530 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
8531 Jonathan Clark).
8532 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
8533 different address-space layout).  This may help for other machines with
8534 holes in the data segment.  (Thanks to Hironori Sakamoto.)
8535 * Changed the order in which GC_push_roots and friends push things onto
8536 the mark stack.  GC_push_all calls need to come first, since we can't
8537 necessarily recover if those overflow the mark stack.  (Thanks to
8538 Matthew Flatt for tracking down the problem.)
8539 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
8540
8541
8542 == [6.1alpha1] 2001-09-22 ==
8543
8544 * Non-debug, atomic allocations could result in bogus smashed object
8545 reports with debugging on (thanks to Patrick Doyle for the small test case).
8546 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
8547 2.2.4 bug.
8548 * Initial port to HP/UX on Itanium.  Thread support and both 32 and 64
8549 bit ABIs appear to work.  Parallel mark support doesn't yet, due to
8550 some inline assembly code issues.  Thread local allocation does appear
8551 to work.
8552 * ifdef'ed out glibc2.1/Itanium workaround.  I suspect nobody is using
8553 that combination anymore.
8554 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
8555 Dimitris Vyzovitis for the patch).
8556 * Debugged 64-bit support on HP/UX PA-RISC.
8557 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
8558 * Unregistering of finalizers with debugging allocation was broken (thanks
8559 to Jani Kajala for the test case).
8560 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
8561 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
8562 * Cleaned up some statistics gathering code in reclaim.c (thanks to
8563 Walter Bright).
8564 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
8565 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
8566 traversal to dyn_load.c.  Changed it to weakly reference dl_iterate_phdr,
8567 so that the old code is still used with old versions of glibc.
8568 * Cleaned up feature test macros for various threads packages and
8569 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
8570 It's likely that the cleanup broke something, since it touched lots of
8571 code.  It's also likely that it fixed some unreported bugs in the
8572 less common thread implementations, since some of the original code
8573 didn't stand up to close scrutiny.  Support for the next pthreads
8574 implementation should be easier to add.
8575
8576
8577 == [6.0] 2001-07-26 ==
8578
8579 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
8580 * Fixed a stack clearing problem that resulted in SIGILL with a
8581 misaligned stack pointer for multi-threaded SPARC builds.
8582 * Integrated another HURD patch (thanks to Igor Khavkine).
8583
8584
8585 == [6.0alpha9] ==
8586
8587 * added README.macros.
8588 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
8589 hard links.
8590 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
8591 it on untested platforms.
8592 * Integrated initial GNU HURD port (thanks to Chris Lingard and
8593 Igor Khavkine).
8594 * A few more fixes for Digital Mars compiler (by Walter Bright).
8595 * Fixed gcc version recognition.  Renamed OPERATOR_NEW_ARRAY to
8596 GC_OPERATOR_NEW_ARRAY.  Changed GC_OPERATOR_NEW_ARRAY to be the default.
8597 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
8598 Cesar Eduardo Barros).
8599 * Changed the byte size to free-list mapping in thread local allocation
8600 so that size 0 allocations are handled correctly.
8601 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
8602 * Changed finalization registration to invoke GC_oom_fn when it runs out
8603 of memory.
8604 * Removed lvalue cast in finalize.c.  This caused some debug configurations
8605 not to build with some non-gcc compilers.
8606
8607
8608 == [6.0alpha8] 2001-06-15 ==
8609
8610 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
8611 so that they compile under Irix (thanks to Dave Love).
8612 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
8613 is in a dynamic library (thanks to Andrew Begel).
8614 * Transformed README.debugging into debugging.html, updating and
8615 expanding it in the process.  Added gcdescr.html and tree.html
8616 from the web site to the GC distribution.
8617 * Fixed several problems related to PRINT_BLACK_LIST.  This involved
8618 restructuring some of the marker macros.
8619 * Fixed some problems with the sizing of objects with debug information.
8620 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST.  Reduced the
8621 object size with SHORT_DEBUG_HDRS by another word.
8622 * The "Needed to allocate blacklisted ..." warning had inadvertently
8623 been turned off by default, due to a buggy test in allchblk.c.  Turned
8624 it back on.
8625 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
8626 They were messy and the performance improvement seemed minimal.  We'll
8627 leave such scheduling issues to the compiler.
8628 * Changed Linux/PowerPC test to also check for __powerpc__ in response
8629 to a discussion on the gcc mailing list.
8630 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
8631 (suggested by Matthew Flatt).  This was causing problems in
8632 systems that register all of their own roots.  It looks far more correct
8633 to me without the "static" anyway.
8634 * Fixed several problems with thread local allocation of pointer-free or
8635 typed objects.  The collector was reclaiming thread-local free lists, since
8636 it wasn't following the link fields.
8637 * There was apparently a long-standing race condition related to
8638 multi-threaded incremental collection.  A collection could be started and
8639 a thread stopped between the memory unprotect system call and the setting of
8640 the corresponding dirt bit.  I believe this did not affect Solaris or PCR,
8641 which use a different dirty-bit implementation.  Fixed this by installing
8642 signal handlers with sigaction instead of signal, and disabling the thread
8643 suspend signal while in the write-protect handler.  (It is unclear
8644 whether this scenario ever actually occurred.)
8645 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
8646 implementation of GC_malloc_many or the local_malloc primitives.  It still
8647 doesn't work well, but it shouldn't lose memory anymore.
8648 * Integrated some changes from the gcc source tree that I had previously
8649 missed (thanks to Bryce McKinlay for the reminder and patch).
8650 * Added Makefile.direct as a copy of the default Makefile, which would
8651 normally be overwritten if configure is run.
8652 * Changed the gc.tar target in Makefile.direct to embed the version number
8653 in the gc directory name.  This will affect future tar file distributions.
8654 * Changed the Irix dynamic library finding code to no longer try to
8655 eliminate writable text segments under Irix6.x, since that is probably no
8656 longer necessary, and can apparently be unsafe on occasion (thanks to
8657 Shiro Kawai for pointing this out).
8658 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
8659 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
8660 debug header.  Call GC_register_finalizer_ignore_self instead, even with
8661 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
8662 * The collector didn't build with call chain saving enabled but NARGS=0.
8663 * Fixed up the GNU-style build files enough so that they work in some
8664 obvious cases (thanks to Maarten Thibaut).
8665 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
8666 Bright).
8667
8668
8669 == [6.0alpha7] 2001-04-19 ==
8670
8671 * Added GC_finalizer_notifier.  Fixed GC_finalize_on_demand.  (The variable
8672 actually wasn't being tested at the right points.  The build-time flag
8673 was.)
8674 * Added Tom Tromey's S390 Linux patch.
8675 * Added code to push GC_finalize_now in GC_push_finalizer_structures
8676 (thanks to Matthew Flatt).
8677 * Added GC_push_gc_structures() to push all GC internal roots.
8678 * Integrated some FreeBSD changes from Matthew Flatt.
8679 * It looks like USRSTACK is not always correctly defined under Solaris.
8680 Hacked gcconfig.h to attempt to work around the problem.  The result
8681 is not well tested.  (Thanks again to Matthew Flatt for pointing this out.)
8682 * Added Ji-Yong Chung's win32 threads and C++ fixes.
8683 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
8684 It was causing build problems with gas, and it's not clear this is
8685 better than the pthreads alternative on this platform.
8686 * Some MINGW32 fixes from Hubert Garavel.
8687 * Added initial Hitachi SH4 port from Kaz Kojima.
8688 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
8689 * Made include/gc_mark.h more public and separated out the really private
8690 pieces.  This is probably still not quite sufficient for clients that
8691 want to supply their own kind of type information.  But it's a start.
8692 This involved lots of identifier renaming to make it namespace clean.
8693 * Added GC_dont_precollect for clients that need complete control over
8694 the root set.
8695 * GC_is_visible didn't do the right thing with gcj objects.  (Not that
8696 many people are likely to care, but ...)
8697 * Don't redefine read with GC_USE_LD_WRAP.
8698 * Initial port to LINUX/HP_PA.  Incremental collection and threads are not
8699 yet supported.  (Incremental collection should work if you have the
8700 right kernel.  Threads may work with a sufficiently patched pthread
8701 library.)
8702 * Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
8703 many places (thanks to Benjamin Lerman).
8704 * Made win32_threads.c more tolerant of detaching a thread that it didn't
8705 know about (thanks to Paul Nash).
8706 * Added Makefile.am and configure.in from gcc to the distribution, with
8707 minimal changes.  For the moment, those are just placeholders.  In the
8708 future, we're planning to switch to a GNU-style build environment for
8709 Un*x-like systems, though the old Makefile will remain as a backup.
8710 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
8711 option.
8712 * Redistributed some functions between malloc.c and mallocx.c, so that
8713 simple statically linked apps no longer pull in mallocx.o.
8714 * Changed large object allocation to clear the first and last few words
8715 of each block before releasing the lock.  Otherwise the marker could see
8716 objects with nonsensical type descriptors.
8717 * Fixed a couple of subtle problems that could result in not recognizing
8718 interior pointers from the stack.  (I believe these were introduced
8719 in 6.0alpha6.)
8720 * GC_debug_free_inner called GC_free, which tried to reacquire the
8721 allocator lock, and hence deadlocked.  (DBG_HDRS_ALL probably never worked
8722 with threads.)
8723 * Fixed several problems with back traces.  Accidental references to a free
8724 list could cause the free list pointer to be overwritten by a back pointer.
8725 There seemed to be some problems with the encoding of root and finalizer
8726 references.
8727
8728
8729 == [6.0alpha6] ==
8730
8731 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
8732 and __data_start are not defined by earlier versions of glibc.  This might
8733 need to be fixed on other platforms as well.
8734 * Changed the way the stack base and backing store base are found on IA64.
8735 This should now remain reliable on future kernels.  But since it relies
8736 on /proc, it will no longer work in the simulated NUE environment.
8737 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
8738 on the OS.  On non-Unix systems, rand() should be used instead.  Handled
8739 small RAND_MAX (thanks to Peter Ross for pointing this out).
8740 * Fixed the cord make rules to create the cord subdirectory, if necessary
8741 (thanks to Doug Moen).
8742 * Changed fo_object_size calculation in finalize.c.  Turned finalization
8743 of non-heap object into a no-op.  Removed anachronism from GC_size()
8744 implementation.
8745 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
8746 It was missed in a previous renaming (thanks to Vladimir Tsichevski
8747 for pointing this out).
8748 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
8749 * Added GC_no_dls hook for applications that want to register their own
8750 roots.
8751 * Integrated Kjetil Matheussen's Amiga changes.
8752 * Added FREEBSD_STACKBOTTOM.  Changed the X86/FreeBSD port to use it
8753 (thanks to Matthew Flatt).
8754 * Added pthread_detach interception for platforms supported by linux_threads.c
8755 and irix_threads.c.
8756 * Changed the USE_MMAP code to check for the case in which we got the
8757 high end of the address space, i.e. mem_ptr + mem_sz == 0.  It appears
8758 that this can happen under Solaris 7.  It seems to be allowed by what
8759 I would claim is an oversight in the mmap specification.  (Thanks to
8760 Toshio Endo for pointing out the problem.)
8761 * Cleanup of linux_threads.c.  Some code was originally cloned from
8762 irix_threads.c and now unnecessary.  Some comments were obviously wrong.
8763 * (Mostly) fixed a longstanding problem with setting of dirty bits from
8764 a signal handler.  In the presence of threads, dirty bits could get lost,
8765 since the getting of a bit in the bit vector was not atomic with respect
8766 to other updates.  The fix is 100% correct only for platforms for which
8767 GC_test_and_set is defined.  The goal is to make that all platforms with
8768 thread support.  Matters only if incremental GC and threads are both
8769 enabled.
8770 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
8771 initialization time, instead of build-time option.  This is a
8772 nontrivial, high risk change.  It should slow down the code measurably
8773 only if MERGE_SIZES is not defined, which is a very nonstandard
8774 configuration.
8775 * Added doc/README.environment, and implemented what it describes.  This
8776 allows a number of additional configuration options to be set through
8777 the environment.  It documents a few previously undocumented options.
8778 * Integrated Eric Benson's leak testing improvements.
8779 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
8780 This became less and less useful as processors enforce stricter alignment.
8781 And it hadn't been tested in ages, and was thus probably broken anyway.
8782
8783
8784 == [6.0alpha5] ==
8785
8786 * Changed the definition of GC_pause in linux_threads.c to use a volatile
8787 asm.  Some versions of gcc apparently optimize away writes to local volatile
8788 variables.  This caused poor locking behavior starting at about
8789 4 processors.
8790 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
8791 to linux_threads.c.
8792 The first two calls could be used to generally avoid sending GC signals to
8793 blocked threads, avoiding both premature wakeups and unnecessary overhead.
8794 * Fixed a serious bug in thread-local allocation.  At thread termination,
8795 GC_free could get called on small integers.  Changed the code for thread
8796 termination to more efficiently return left-over free-lists.
8797 * Integrated Kjetil Matheussen's BeOS support.
8798 * Rearranged the directory structure to create the doc and tests
8799 subdirectories.
8800 * Sort of integrated Eric Benson's patch for OSF1.  This provided basic
8801 OSF1 thread support by suitably extending hpux_irix_threads.c.  Based
8802 on earlier email conversations with David Butenhof, I suspect that it
8803 will be more reliable in the long run to base this on linux_threads.c
8804 instead.  Thus I attempted to patch up linux_threads.c based on Eric's code.
8805 The result is almost certainly broken, but hopefully close enough that
8806 someone with access to a machine can pick it up.
8807 * Integrated lots of minor changes from the NetBSD distribution.  (These
8808 were supplied by David Brownlee.  I'm not sure about the original
8809 authors.)
8810 * Hacked a bit more on the HP/UX thread-support in linux_threads.c.  It
8811 now appears to work in the absence of incremental collection.  Renamed
8812 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
8813 support HPUX there.
8814 * Changed gc.h to define _REENTRANT in cases in which it should already
8815 have been defined. It is still safer to also define it on the command
8816 line.
8817
8818
8819 == [6.0alpha4] ==
8820
8821 * Moved up the detection of mostly full blocks to the initiation of the
8822 sweep phase.  This eliminates some lock contention in the PARALLEL_MARK case,
8823 as multiple threads try to look at mostly full blocks concurrently.
8824 * Restored the code in GC_malloc_many that grabs a prefix of the global
8825 free list.  This avoids the case in which every GC_malloc_many call
8826 tries and fails to allocate a new heap block, and the returns a single
8827 object from the global free list.
8828 * Some minor fixes in new_hblk.c.  (Attempted to build free lists in order
8829 of increasing addresses instead of decreasing addresses for cache performance
8830 reasons.  But this seems to be only a very minor gain with -DEAGER_SWEEP,
8831 and a loss in other cases.  So the change was backed out.)
8832 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
8833 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
8834 large numbers of mmaps (thanks to Eric Benson).  Also fixed that code to
8835 deal with short reads.
8836 * Added GC_get_total_bytes().
8837 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
8838 (This should also now be easy for the other supported threads packages.
8839 But the code is tricky enough that I'm hesitant to do it without being able
8840 to test.  Everything allocated in the GC thread support itself should be
8841 explicitly deallocated.)
8842 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
8843
8844
8845 == [6.0alpha3] 2000-09-26 ==
8846
8847 * Fixed the /proc/self/maps code to not seek, since that apparently is not
8848 reliable across all interesting kernels.
8849 * Fixed some compilation problems in the absence of PARALLEL_MARK
8850 (introduced in alpha2).
8851 * Fixed an algorithmic problem with PARALLEL_MARK.  If work needs to
8852 be given back to the main mark "stack", the BOTTOM entries of the local
8853 stack should be given away, not the top ones.  This has substantial
8854 performance impact, especially for > 2 processors, from what I can tell.
8855 * Extracted gc_lock.h from gc_priv.h.  This should eventually make it a
8856 bit easier to avoid including gc_priv.h in clients.
8857 * Moved all include files to include/ and removed duplicate links to the
8858 same file.  The old scheme was a bad idea because it was too easy to get the
8859 copies out of sync, and many systems don't support hard links.
8860 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
8861 the process, although I tried to update them appropriately.
8862 * Removed the partial support for a copied nursery.  It's not clear that
8863 this would be a tremendous win, since we don't consistently lose to
8864 generational copying collectors.  And it would significantly complicate
8865 many things.  May be reintroduced if/when it really turns out to win.
8866 * Removed references to IRIX_JDK_THREADS, since I believe there never
8867 were and never will be any clients.
8868 * Added some code to linux_threads.c to possibly support HPUX threads
8869 using the Linux code.  Unfortunately, it doesn't work yet, and is
8870 currently disabled.
8871 * Added support under Linux/X86 for saving the call chain, both in (debug)
8872 objects for client debugging, and in GC_arrays._last_stack for GC
8873 debugging.  This was previously supported only under Solaris.  It is
8874 not enabled by default under X86, since it requires that code be compiled
8875 to explicitly gave frame pointers on the call stack.  (With gcc this
8876 currently happens by default, but is often turned off explicitly.)
8877 To turn it on, define SAVE_CALL_CHAIN.
8878
8879
8880 == [6.0alpha2] ==
8881
8882 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
8883 for which that's expensive.
8884 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
8885 * Added a missing volatile to OR_WORD and renamed the parameter to
8886 GC_compare_and_swap so it's not a C++ reserved word (thanks to
8887 Toshio Endo for pointing out both of those).
8888 * Changed Linux dynamic library registration code to look at /proc/self/maps
8889 instead of the rld data structures when REDIRECT_MALLOC is defined.
8890 Otherwise some of the rld data data structures may be prematurely garbage
8891 collected.
8892 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
8893 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
8894 Temporarily added some backward compatibility definitions.  Renamed
8895 USE_LD_WRAP to GC_USE_LD_WRAP.
8896 * Many MACOSX POWERPC changes, some additions to the gctest output, and
8897 a few minor generic bug fixes (thanks to Dietmar Planitzer).
8898
8899
8900 == [6.0alpha1] ==
8901
8902 * Added HP/PA prefetch support.
8903 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
8904 the reliability of generating pointer backtrace information, e.g. in
8905 the Bigloo environment.
8906 * Added parallel marking support (-DPARALLEL_MARK).  This currently
8907 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
8908 to other platforms.  This is intended to be a lighter-weight (less
8909 new code, probably not as scalable) solution than the work by Toshio Endo
8910 et al, at the University of Tokyo.  A number of their ideas were
8911 reused, though the code wasn't, and the underlying data structure
8912 is significantly different.  In particular, we keep the global mark
8913 stack as a single shared data structure, but most of the work is done
8914 on smaller thread-local mark stacks.
8915 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
8916 with -DPARALLEL_MARK.
8917 * Added full support for thread local allocation under Linux
8918 (-DTHREAD_LOCAL_ALLOC).  This is a thin veneer on GC_malloc_many, and
8919 should be easily portable to other platforms, especially those that
8920 support pthreads.
8921 * CLEAR_DOUBLE was not always getting invoked when it should have been.
8922 * GC_gcj_malloc and friends used different out of memory handling than
8923 everything else, probably because I forgot about one when I implemented
8924 the other.  They now both call GC_oom_fn(), not GC_oom_action().
8925 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
8926 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
8927 GC_arrays, and separately registered the first two as excluded roots.
8928 This makes code compiled with gc_inl.h less dependent on the
8929 collector version.  (It would be nice to remove the inclusion of
8930 gc_priv.h by gc_inl.h completely, but we're not there yet.  The
8931 locking definitions in gc_priv.h are still referenced.)
8932 This change was later conditioned on SEPARATE_GLOBALS, which
8933 is not defined by default, since it involves a performance hit.
8934 * Register GC_obj_kinds separately as an excluded root region.  The
8935 attempt to register it with GC_arrays was usually failing.  (This wasn't
8936 serious, but seemed to generate some confusion.)
8937 * Moved backptr.h to gc_backptr.h.
8938
8939
8940 == [5.4] ==
8941
8942 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
8943 Shawn Wagner for actually testing this).
8944 * Fixed GC_is_thread_stack in solaris_threads.c.  It forgot to return a value
8945 in the common case.
8946 * Fixed another silly syntax problem in GC_double_descr (thanks to
8947 Fergus Henderson for finding it).
8948 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
8949
8950
8951 == [5.3] 2000-09-24 ==
8952
8953 * Fixed _end declaration for OSF1.
8954 * There were lots of spurious leak reports in leak detection mode, caused
8955 by the fact that some pages were not being swept, and hence unmarked
8956 objects weren't making it onto free lists.  (This bug dated back to 5.0.)
8957 * Fixed a typo in the liblinuxgc.so Makefile rule.
8958 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
8959 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
8960
8961
8962 == [5.2] ==
8963
8964 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
8965 was defined as a macro.  This prevented the collector from building on
8966 Irix.
8967 * We quietly assumed that indirect mark descriptors were never 0.
8968 Our own typed allocation interface violated that.  This could result
8969 in segmentation faults in the marker with typed allocation.
8970 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
8971 Ben Hutchings for the patch).
8972 * Taught the collector about VC++ handling array operator new (thanks to
8973 Ben Hutchings for the patch).
8974 * The two copies of gc_hdrs.h had diverged.  Made one a link to the other
8975 again.
8976
8977
8978 == [5.1] ==
8979
8980 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
8981 * Fixed a typo in GC_double_descr in typd_mlc.c.
8982 This probably could result in objects described by array descriptors not
8983 getting traced correctly (thanks to Ben Hutchings for pointing this out).
8984 * The block nearly full tests in reclaim.c were not correct for 64 bit
8985 environments.  This could result in unnecessary heap growth under unlikely
8986 conditions.
8987
8988
8989 == [5.0] ==
8990
8991 * Fixed threadlibs.c for linux threads.  -DUSE_LD_WRAP was broken and
8992 -ldl was omitted.  Fixed Linux stack finding code to handle
8993 -DUSE_LD_WRAP correctly.
8994 * Added MSWIN32 exception handler around marker, so that the collector
8995 can recover from root segments that are unmapped during the collection.
8996 This caused occasional failures under Windows 98, and may also be
8997 an issue under Windows NT/2000.
8998
8999
9000 == [5.0alpha7] ==
9001
9002 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
9003 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
9004 accept it.
9005 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
9006 linked into every executable.
9007 * Added PREFETCH to bitmap marker.  Changed it to use the header cache.
9008 * GC_push_marked sometimes pushed one object too many, resulting in a
9009 segmentation fault in GC_mark_from_mark_stack.  This was probably an old
9010 bug.  It finally showed up in gctest on win32.
9011 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
9012 when SMALL_CONFIG was defined.  This was no doubt a major performance bug for
9013 the default win32 configuration.
9014 * Removed -DSMALL_CONFIG from NT_MAKEFILE.  It seemed like an anachronism now
9015 that the average PC has 64MB or so.
9016 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
9017 from the libgcj tree.  Turned on dynamic loading support for Linux/PPC.
9018 * Changed the stack finding code to use environ on HP/UX (thanks
9019 to Gustavo Rodriguez-Rivera for the suggestion).  This should
9020 probably be done on other platforms, too.  Since I can't test those, that'll
9021 wait until after 5.0.
9022
9023
9024 == [5.0alpha6] ==
9025
9026 * GC_malloc_explicitly_typed and friends sometimes failed to
9027 initialize first word.
9028 * Added allocation routines and support in the marker for mark descriptors
9029 in a type structure referenced by the first word of an object.  This was
9030 introduced to support gcj, but hopefully in a way that makes it
9031 generically useful.
9032 * Added GC_requested_heapsize, and inhibited collections in non-incremental
9033 mode if the actual used heap size is less than what was explicitly
9034 requested.
9035 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
9036 attribute pointer.  Solaris thread support used the wrong default thread
9037 stack size (thanks to Melissa O'Neill for the patch).
9038 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
9039 This usually doesn't matter, but it was certainly an accident waiting
9040 to happen ...
9041 * Added GC_register_finalizer_no_order and friends to gc.h.  They're
9042 needed by Java implementations.
9043 * Integrated a fix for a win32 deadlock resulting from clock() calling
9044 malloc (thanks to Chris Dodd).
9045 * Integrated Hiroshi Kawashima's port to Linux/MIPS.  This was designed
9046 for a handheld platform, and may or may not be sufficient for other
9047 machines.
9048 * Fixed a va_arg problem with the %c specifier in cordprnt.c.  It appears
9049 that this was always broken, but recent versions of gcc are the first to
9050 report the (statically detectable) bug.
9051 * Added an attempt at a more general solution to dlopen races/deadlocks.
9052 GC_dlopen now temporarily disables collection.  Still not ideal, but ...
9053 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
9054 prefetch instructions.  May improve performance measurably, but I'm not
9055 sure the code will run correctly on processors that don't support the
9056 instruction.  Won't build except with very recent gcc.
9057 * Added caching for header lookups in the marker.  This seems to result
9058 in a barely measurable performance gain.  Added support for interleaved
9059 lookups of two pointers, but unconfigured that since the performance
9060 gain is currently near zero, and it adds to code size.
9061 * Changed Linux DATASTART definition to check both data_start and
9062 __data_start, since nothing else seems to be portable.
9063 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
9064 wrapping mechanism.  Probably currently useful only on Linux.
9065 * Moved some variables for the scratch allocator into GC_arrays (suggested
9066 by Martin Hirzel).
9067 * Fixed a win32 threads bug that caused the collector to not look for
9068 interior pointers from one of the thread stacks without
9069 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
9070 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
9071 * Changed the alpha port to use the generic register scanning code instead
9072 of alpha_mach_dep.s.  Alpha_mach_dep.s doesn't look for pointers in fp
9073 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
9074 for helping debug this).  Changed the IA64 code to
9075 do something similar for similar reasons.
9076
9077
9078 == [5.0alpha4] 1999-10-30 ==
9079
9080 * Added protection fault handling patch for Linux/M68K from Fergus
9081 Henderson and Roman Hodek.
9082 * Removed the tests for SGI_SOURCE in new_gc_alloc.h.  This was causing that
9083 interface to fail on non-SGI platforms.
9084 * Changed the Linux stack finding code to use /proc, after changing it
9085 to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook).
9086 * Added HP/UX incremental GC support and HP/UX 11 thread support.
9087 Thread support is currently still flaky.
9088 * Added basic Linux/IA64 support.
9089 * Integrated Anthony Green's PicoJava support.
9090 * Integrated Scott Ananian's StrongARM/NetBSD support.
9091 * Fixed some fairly serious performance bugs in the incremental
9092 collector.  These have probably been there essentially forever.
9093 (Mark bits were sometimes set before scanning dirty pages.
9094 The reclaim phase unnecessarily dirtied full small object pages.)
9095 * Changed the reclaim phase to ignore nearly full pages to avoid
9096 touching them.
9097 * Limited GC_black_list_spacing to roughly the heap growth increment.
9098 * Changed full collection triggering heuristic to decrease full GC
9099 frequency by default, but to explicitly trigger full GCs during
9100 heap growth.  This doesn't always improve things, but on average it's
9101 probably a win.
9102 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
9103 bug report and fix).
9104
9105
9106 == [5.0alpha3] 1999-09-15 ==
9107
9108 (Also known as 4.15alpha3.)
9109 * Added some highly incomplete code to support a copied young generation.
9110 Comments on nursery.h are appreciated.
9111 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
9112 so the same effect could be obtained with a runtime switch.   This is
9113 a step towards standardizing on a single dynamic GC library.
9114 * Significantly changed the way leak detection is handled, as a consequence
9115 of the above.
9116
9117
9118 == [5.0alpha2] 1999-07-23 ==
9119
9120 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
9121 * Added -DKEEP_BACK_PTRS and backptr.h interface.  (The implementation
9122 idea came from Alan Demers.)
9123
9124
9125 == [5.0alpha1] 1999-06-30 ==
9126
9127 (Also known as 4.15alpha1.)
9128 * Reworked large block allocator.  Now uses multiple doubly linked free
9129 lists to approximate best fit.
9130 * Changed heap expansion heuristic.  Entirely free blocks are no longer
9131 counted towards the heap size.  This seems to have a major impact on
9132 heap size stability; the old version could expand the heap way too
9133 much in the presence of large block fragmentation.
9134 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
9135 This is mainlyt for collector debugging.
9136 * added -DUSE_MUNMAP to allow the heap to shrink.  Supported on only
9137 a few UNIX-like platforms for now.
9138 * added GC_dump_regions() for debugging of fragmentation issues.
9139 * Changed PowerPC pointer alignment under Linux to 4.
9140 * Changed the Linux/Alpha port to walk the data segment backwards until
9141 it encounters a SIGSEGV.  The old way to find the start of the data
9142 segment broke with a recent release.
9143 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
9144 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
9145 * allochblk sometimes cleared the wrong block for debugging purposes
9146 when it dropped blacklisted blocks.  This could result in spurious
9147 error reports with GC_DEBUG.
9148 * added MACOS X Server support (thanks to Andrew Stone).
9149 * Changed the Solaris threads code to ignore stack limits > 8 MB with
9150 a warning.  Empirically, it is not safe to access arbitrary pages
9151 in such large stacks.  And the dirty bit implementation does not
9152 guarantee that none of them will be accessed.
9153 * Integrated Martin Tauchmann's Amiga changes.
9154 * Integrated James Dominy's OpenBSD/SPARC port.
9155
9156
9157 == [4.14] 1999-04-16 ==
9158
9159 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
9160
9161
9162 == [4.14alpha2] 1999-03-26 ==
9163
9164 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
9165 Recycling the mark stack during expansion could result in a size
9166 zero heap segment, which confused things.  (This was probably also an
9167 issue with the normal config and huge pages.)
9168 * Did more work to make sure that callee-save registers were scanned
9169 completely, even with the setjmp-based code.  Added USE_GENERIC_PUSH_REGS
9170 macro to facilitate testing on machines I have access to.
9171 * Added code to explicitly push register contents for win32 threads.
9172 This seems to be necessary.  (Thanks to Pierre de Rop.)
9173
9174
9175 == [4.14alpha1] 1999-03-10 ==
9176
9177 * Fixed GC_print_source_ptr to not use a prototype.
9178 * generalized CYGWIN test.
9179 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
9180 Rauli Ruohonen).
9181 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
9182 values could fail to be scanned if the register was saved and
9183 reused in a GC frame.  This showed up in verbose mode with gctest
9184 compiled with an unreleased SGI compiler.  I vaguely recall an old
9185 bug report that may have been related.  The bug was probably quite old.
9186 (The problem was that the stack scanning could be deferred until
9187 after the relevant frame was overwritten, and the new save location
9188 might be outside the scanned area.  Fixed by more eager stack scanning.)
9189 * PRINT_BLACK_LIST had some problems.  A few source addresses were garbage.
9190 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
9191 Gary Leavens).
9192 * GC_try_to_collect was broken with the non-incremental collector.
9193 * gc_cleanup destructors could pass the wrong address to
9194 GC_register_finalizer_ignore_self in the presence of multiple
9195 inheritance (thanks to Darrell Schiebel).
9196 * Changed PowerPC Linux stack finding code.
9197
9198
9199 == [4.13] 1999-02-19 ==
9200
9201 * Fixed a crucial bug in the Watcom port.  There was a redundant declaration
9202 of GC_push_one in gc_priv.h.
9203 * Added FINALIZE_ON_DEMAND.
9204 * Fixed some pre-ANSI cc problems in test.c.
9205 * Removed getpagesize() use for Solaris.  It seems to be missing in one
9206 or two versions.
9207 * Fixed bool handling for SPARCCompiler version 4.2.
9208 * Fixed some files in include that had gotten unlinked from the main
9209 copy.
9210 * Some RS/6000 fixes (missing casts).  (Thanks to Toralf Foerster.)
9211 * Fixed several problems in GC_debug_realloc, affecting mostly the
9212 FIND_LEAK case.
9213 * GC_exclude_static_roots contained a buggy unsigned comparison to
9214 terminate a loop (thanks to Wilson Ho).
9215 * CORD_str failed if the substring occurred at the last possible position.
9216 (Only affects cord users.)
9217 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
9218 os_dep.c code for dealing with various Linux versions.
9219 * Added workaround for Irix pthreads sigaction bug and possible signal
9220 misdirection problems.
9221
9222
9223 == [4.13alpha3] 1998-12-08 ==
9224
9225 * Fixed MSWIN32 recognition test, which interfered with cygwin.
9226 * Removed unnecessary gc_watcom.asm from distribution.  Removed
9227 some obsolete README.win32 text.
9228 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
9229 for code for retrieving the fault address in a signal handler).
9230 Changed Linux signal handler context argument to be a pointer.
9231 * Took care of some new warnings generated by the 7.3 SGI compiler.
9232 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
9233 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
9234
9235
9236 == [4.13alpha2] 1998-08-08 ==
9237
9238 * Fixed more Linux threads problems.
9239 * Changed default GC_free_space_divisor to 3 with new large block allocation
9240 (thanks to Matthew Flatt for some measurements that suggest the old
9241 value sometimes favors space too much over time).
9242 * More CYGWIN32 fixes.
9243 * Integrated Tyson Dowd's Linux-M68K port.
9244 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
9245 * Integrated Christoffe Raffali's Linux-SPARC changes.
9246 * Allowed for one more GC fixup iteration after a full GC in incremental
9247 mode.  Some quick measurements suggested that this significantly
9248 reduces pause times even with smaller GC_RATE values.
9249 * Moved some more GC data structures into GC_arrays.  This decreases
9250 pause times and GC overhead, but makes debugging slightly less convenient.
9251 * Fixed namespace pollution problem ("excl_table").
9252 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
9253 that slightly.
9254 * Added some win32 threads fixes.
9255 * Integrated Ivan Demakov and David Stes' Watcom fixes.
9256 * Various other minor fixes contributed by many people.
9257 * Renamed config.h to gcconfig.h, since config.h tends to be used for
9258 many other things.
9259 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
9260 * Fixed up some of the dynamic library Makefile targets for consistency
9261 across platforms.
9262 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
9263 on Solaris.
9264 * Added code to test.c to test thread creation a bit more.
9265 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
9266 * Fixed Solaris 2.7 stack base finding problem.  (This may actually
9267 have been done in an earlier alpha release.)
9268
9269
9270 == [4.13alpha1] 1998-02-17 ==
9271
9272 * Changed RS6000 STACKBOTTOM.
9273 * Integrated Patrick Beard's Mac changes.
9274 * Alpha1 didn't compile on Irix m.n, m < 6.
9275 * Replaced Makefile.dj with a new one from Gary Leavens.
9276 * Added Andrew Stitcher's changes to support SCO OpenServer.
9277 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
9278 pointers.
9279 * Added code to debug allocator to keep track of return address
9280 in GC_malloc caller, thus giving a bit more context.
9281 * Changed default behavior of large block allocator to more
9282 aggressively avoid fragmentation.  This is likely to slow down the
9283 collector when it succeeds at reducing space cost.
9284 * Integrated Fergus Henderson's CYGWIN32 changes.  They are untested,
9285 but needed for newer versions.
9286 * USE_MMAP had some serious bugs.  This caused the collector to fail
9287 consistently on Solaris with -DSMALL_CONFIG.
9288 * Added Linux threads support (thanks to Fergus Henderson).
9289
9290
9291 == [4.12] 1997-08-26 ==
9292
9293 * Fixed ElfW definition in dyn_load.c.
9294 This prevented the dynamic library support from compiling on some
9295 older ELF Linux systems.
9296 * Fixed UTS4 port (which I apparently mangled during the integration).
9297 (Thanks to Alistair Crooks.)
9298 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
9299 Fixed in gc_priv.h.
9300 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
9301 The current state of things should suffice for at least some
9302 applications.
9303 * Changed the out of memory retry count handling.  (This matters only
9304 if GC_max_retries > 0, which is no longer the default.)
9305 * If a /proc read failed repeatedly, GC_written_pages was not updated
9306 correctly (thanks to Peter Chubb for diagnosing this).
9307 * Under unlikely circumstances, the allocator could infinite loop in
9308 an out of memory situation (thanks to Kenjiro Taura for
9309 identifying the problem and supplying a fix).
9310 * Fixed a syntactic error in the DJGPP code.  Also fixed a test program
9311 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
9312 * Atomic uncollectible objects were not treated correctly by the
9313 incremental collector.  This resulted in weird log statistics and
9314 occasional performance problems (thanks to Peter Chubb for pointing this out).
9315 * Fixed some problems resulting from compilers that don't define
9316 __STDC__.  In this case void * and char * were used inconsistently
9317 in some cases.  (Void * should not have been used at all.  If
9318 you have an ANSI superset compiler that does not define __STDC__,
9319 please compile with -D__STDC__=0.  Thanks to Manuel Serrano and others
9320 for pointing out the problem.)
9321 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
9322 Also fixed some other IRIX_THREADS problems which may or may not have
9323 had observable symptoms.
9324 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
9325 Philippe Queinnec).
9326 * SEGV fault handlers sometimes did not get reset correctly (thanks
9327 to David Pickens).
9328 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
9329 This probably needs more work to become functional.
9330 * Fixed struct sigcontext_struct in os_dep.c for compilation under
9331 Linux 2.1.X (thanks to Fergus Henderson).
9332 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
9333 (by Kristian Kristensen).  These may still not be right, but it is
9334 it is likely to work more often than what was there before.  They may
9335 even be exactly right.
9336 * Added a #include <string.h> to test_cpp.cc.  This appears to help
9337 with HP/UX and gcc (thanks to Assar Westerlund).
9338 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
9339 kernels.  This was a problem related to page unaligned heap segments.
9340 Changed the code to page align heap sections on all platforms.
9341 (I had mistakenly identified this as a kernel problem earlier.
9342 It was not.)
9343 * Version 4.11 did not make allocated storage executable, except on
9344 one or two platforms, due to a bug in a #if test (thanks to David Grove
9345 for pointing this out).
9346 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
9347 * Added GC_exclude_static_roots.
9348 * Fixed the object size mapping algorithm.  This shouldn't matter,
9349 but the old code was ugly.
9350 * Heap checking code could die if one of the allocated objects was
9351 larger than its base address.  (Unsigned underflow problem.  Thanks
9352 to Clay Spence for isolating the problem.)
9353 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
9354 to Fred Stearns).
9355 * Added Fergus Henderson's patches for improved robustness with large
9356 heaps and lots of blacklisting.
9357 * Added Peter Chubb's changes to support Solaris Pthreads, to support
9358 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
9359 through /proc, to add malloc_typed_ignore_off_page, and a few other
9360 minor features and bug fixes.
9361 * The Solaris 2 port should not use sbrk.  I received confirmation from
9362 Sun that the use of sbrk and malloc in the same program is not
9363 supported.  The collector now defines USE_MMAP by default on Solaris.
9364 * Replaced the djgpp makefile with Gary Leavens' version.
9365 * Fixed MSWIN32 detection test.
9366 * Added Fergus Henderson's patches to allow putting the collector into
9367 a DLL under GNU win32.
9368 * Added Ivan V. Demakov's port to Watcom C on X86.
9369 * Added Ian Piumarta's Linux/PowerPC port.
9370 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
9371 Brian Burton).  This is of course unsafe, and may be controversial.
9372 On the other hand, it seems to be needed often enough that it's worth
9373 adding as a standard facility.
9374 * Add Lars Farm's suggestions on building the collector for MacOS.
9375
9376
9377 == [4.12alpha2] ==
9378
9379 (Changes not specified.)
9380
9381
9382 == [4.11] 1996-12-03 ==
9383
9384 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
9385 environment.  It appeared to not handle a call while a collection was in
9386 progress, and was otherwise too conservative.
9387 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
9388 code.
9389 * Added Patrick Beard's Mac fixes, with substantial completely untested
9390 modifications.
9391 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
9392 fault addresses (as on an UltraSPARC running Solaris 2.5).  Note that this
9393 was not a problem in the default configuration, which uses PROC_VDB.
9394 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
9395 Fergus Henderson for tracking this down and supplying a patch).
9396 * The write command for "de" was completely broken for large files.
9397 I used the easiest portable fix, which involved changing the semantics
9398 so that f.new is written instead of overwriting f.  That's safer anyway.
9399 * Added README.solaris2 with a discussion of the possible problems of
9400 mixing the collector's sbrk allocation with malloc/realloc.
9401 * Changed the data segment starting address for SGI machines.  The
9402 old code failed under IRIX6.
9403 * Required double word alignment for MIPS.
9404 * Various minor fixes to remove warnings.
9405 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
9406 In particular, the collector could try to fork a thread with the
9407 world stopped as part of GC_thr_init.  It also failed to deal with
9408 the case in which the original thread terminated before the whole
9409 process did.
9410 * Added -DNO_EXECUTE_PERMISSION.  This has a major performance impact
9411 on the incremental collector under Irix, and perhaps under other
9412 operating systems.
9413 * Added some code to support allocating the heap with mmap.  This may
9414 be preferable under some circumstances.
9415 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
9416 * Integrated James Clark's win32 threads support, and made a number
9417 of changes to it (many of which suggested by Pontus Rydin).  This is still
9418 not 100% solid.
9419 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
9420 370-class machine.
9421 * Fixed a serious bug in explicitly typed allocation.  Objects requiring
9422 large descriptors where handled in a way that usually resulted in
9423 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
9424 for helping to track this down).
9425 * Added partial support for GNU win32 development (thanks to
9426 Fergus Henderson).
9427 * Added optional support for Java-style finalization semantics (thanks to
9428 Patrick Bridges).  This is recommended only for Java implementations.
9429 * GC_malloc_uncollectable faulted instead of returning 0 when out of
9430 memory (thanks to Daniel R. Grayson for noticing).
9431 * Calls to GC_base before the collector was initialized failed on a
9432 DEC Alpha (thanks to Matthew Flatt).
9433 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
9434 (thanks to Jeremy Fitzhardinge).
9435 * GC_debug_realloc failed for uncollectible objects (thanks to
9436 Jeremy Fitzhardinge).
9437 * Explicitly typed allocation could crash if it ran out of memory (thanks to
9438 Jeremy Fitzhardinge).
9439 * Added minimal support for a DEC Alpha running Linux.
9440 * Fixed a problem with allocation of objects whose size overflowed
9441 ptrdiff_t.  (This now fails unconditionally, as it should.)
9442 * Added the beginning of Irix pthread support.
9443 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
9444 * Added SGI-style STL allocator support (gc_alloc.h).
9445 * Fixed a serious bug in README.solaris2.
9446 Multi-threaded programs must include
9447 gc.h with SOLARIS_THREADS defined.
9448 * Changed GC_free so it actually deallocates uncollectible objects (thanks
9449 to Peter Chubb for pointing out the problem).
9450 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
9451 * Changed the Borland cc configuration so that the assembler is not
9452 required.
9453 * Fixed a bug in the C++ test that caused it to fail in 64-bit
9454 environments.
9455
9456
9457 == [4.10t3] 1996-11-18 ==
9458
9459 Some changes related to threads support.
9460
9461
9462 == [4.10] 1996-02-19 ==
9463
9464 * Fixed a typo around a call to GC_collect_or_expand in alloc.c.  It broke
9465 handling of out of memory.  (Thanks to Patrick C. Beard for noticing.)
9466
9467
9468 == [4.9] 1996-02-12 ==
9469
9470 * More README.debugging fixes.
9471 * Objects ready for finalization, but not finalized in the same GC
9472 cycle, could be prematurely collected.  This occasionally happened
9473 in test_cpp.
9474 * Too little memory was obtained from the system for very large
9475 objects.  That could cause a heap explosion if these objects were
9476 not contiguous (e.g. under PCR), and too much of them was blacklisted.
9477 * Due to an improper initialization, the collector was too hesitant to
9478 allocate blacklisted objects immediately after system startup.
9479 * Moved GC_arrays from the data into the bss segment by not explicitly
9480 initializing it to zero.  This significantly
9481 reduces the size of executables, and probably avoids some disk accesses
9482 on program startup.  It's conceivable that it might break a port that I
9483 didn't test.
9484 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
9485 occurred a while ago.
9486
9487
9488 == [4.8] 1995-11-20 ==
9489
9490 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
9491 gcc to fail on other platforms.
9492
9493
9494 == [4.7] 1995-11-18 ==
9495
9496 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
9497 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
9498 * Fixed a serious bug for machines with non-word-aligned pointers.
9499 (Thanks to Patrick C. Beard for pointing out the problem.  The collector
9500 should fail almost any conceivable test immediately on such machines.)
9501
9502
9503 == [4.6] 1995-11-09 ==
9504
9505 * Added Linux ELF support (thanks to Arrigo Triulzi).
9506 * GC_base crashed if it was called before any other GC_ routines.
9507 This could happen if a gc_cleanup object was allocated outside the heap
9508 before any heap allocation.
9509 * The heap expansion heuristic was not stable if all objects had finalization
9510 enabled.  Fixed finalize.c to count memory in finalization queue and
9511 avoid explicit deallocation.  Changed alloc.c to also consider this count.
9512 (This is still not recommended.  It's expensive if nothing else.  Thanks
9513 to John Ellis for pointing this out.)
9514 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
9515 this out).
9516 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
9517 pointing this out).  The current workaround is ugly, but expected to be
9518 temporary.
9519 * Fixed a formatting problem for SPARC stack traces.
9520 * Fixed some '=='s in os_dep.c that should have been assignments.
9521 Fortunately these were in code that should never be executed anyway (thanks
9522 to Fergus Henderson).
9523 * Fixed the heap block allocator to only drop blacklisted blocks in small
9524 chunks.  Made BL_LIMIT self adjusting.  (Both of these were in response
9525 to heap growth observed by Paul Graham.)
9526 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
9527 Patrick C. Beard).
9528 * Significantly updated README.debugging.
9529 * Fixed some problems with longjmps out of signal handlers, especially under
9530 Solaris.  Added a workaround for the fact that siglongjmp doesn't appear to
9531 do the right thing with -lthread under Solaris.
9532 * Added MSDOS/djgpp port (thanks to Mitch Harris).
9533 * Added "make reserved_namespace" and "make user_namespace".  The
9534 first renames ALL "GC_xxx" identifiers as "_GC_xxx".  The second is the
9535 inverse transformation.  Note that doing this is guaranteed to break all
9536 clients written for the other names.
9537 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
9538 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1).  This is
9539 a serious bug on machines with pointer alignment of less than a word.
9540 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
9541 end of the object correctly.  Caused failures of the C++ test on a DEC Alpha
9542 with g++.
9543 * gc_inl.h still had problems.  Partially fixed.  Added warnings at the
9544 beginning to hopefully specify the remaining dangers.
9545 * Added DATAEND definition to config.h.
9546 * Fixed some of the .h file organization.  Fixed "make floppy".
9547
9548
9549 == [4.5] 1995-06-14 ==
9550
9551 * Fixed many minor and one major README bugs (thanks to Franklin Chen
9552 for pointing out many of them).
9553 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
9554 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
9555 help from Bruno Haible).
9556 * Altered SPARC recognition tests in gc.h and config.h (mostly as
9557 suggested by Fergus Henderson).
9558 * Added basic incremental GC support for win32, as implemented by
9559 Windows NT and Windows 95.  GC_enable_incremental is a no-op
9560 under win32s, which doesn't implement enough of the VM interface.
9561 * Added -DLARGE_CONFIG.
9562 * Fixed GC_..._ignore_off_page to also function without
9563 -DALL_INTERIOR_POINTERS.
9564 * (Hopefully) fixed RS/6000 port.  (Only the test was broken.)
9565 * Fixed a performance bug in the non-incremental collector running
9566 on machines supporting incremental collection with MPROTECT_VDB
9567 (e.g. SunOS 4, DEC AXP).  This turned into a correctness bug under
9568 win32s with win32 incremental collection.  (Not all memory protection
9569 was disabled.)
9570 * Fixed some ppcr related bit rot.
9571 * Caused dynamic libraries to be unregistered before re-registering.
9572 The old way turned out to be a performance bug on some machines.
9573 * GC_root_size was not properly maintained under MSWIN32.
9574 * Added -DNO_DEBUGGING and GC_dump.
9575 * Fixed a couple of bugs arising with SOLARIS_THREADS +
9576 REDIRECT_MALLOC.
9577 * Added NetBSD/M68K port (thanks to Peter Seebach).
9578 * Fixed a serious realloc bug.  For certain object sizes, the collector
9579 wouldn't scan the expanded part of the object.  (Thanks to Clay Spence
9580 for noticing the problem, and helping me to track it down.)
9581
9582
9583 == [4.4] 1995-02-18 ==
9584
9585 * ASM_CLEAR_CODE was erroneously defined for HP
9586 PA machines, resulting in a compile error.
9587 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
9588 * Gc_cleanup objects didn't work if they were created on
9589 the stack.  Fixed.
9590 * One copy of Gc_cpp.h in the distribution was out of
9591 synch, and failed to document some known compiler
9592 problems with explicit destructor invocation.  Partially
9593 fixed.  There are probably other compilers on which
9594 gc_cleanup is miscompiled.
9595 * Fixed Makefile to pass C compiler flags to C++ compiler.
9596 * Added Mac fixes.
9597 * Fixed os_dep.c to work around what appears to be
9598 a new and different VirtualQuery bug under newer
9599 versions of win32S.
9600 * GC_non_gc_bytes was not correctly maintained by
9601 GC_free.  Fixed (thanks to James Clark).
9602 * Added GC_set_max_heap_size.
9603 * Changed allocation code to ignore blacklisting if it is preventing
9604 use of a very large block of memory.  This has the advantage
9605 that naive code allocating very large objects is much more
9606 likely to work.  The downside is you might no
9607 longer find out that such code should really use
9608 GC_malloc_ignore_off_page.
9609 * Changed GC_printf under win32 to close and reopen the file
9610 between calls.  FAT file systems otherwise make the log file
9611 useless for debugging.
9612 * Added GC_try_to_collect and GC_get_bytes_since_gc.  These
9613 allow starting an abortable collection during idle times.
9614 This facility does not require special OS support.  (Thanks to
9615 Michael Spertus of Geodesic Systems for suggesting this.  It was
9616 actually an easy addition.  Kumar Srikantan previously added a similar
9617 facility to a now ancient version of the collector.  At the time
9618 this was much harder, and the result was less convincing.)
9619 * Added some support for the Borland development environment (thanks
9620 to John Ellis and Michael Spertus).
9621 * Removed a misfeature from checksums.c that caused unexpected
9622 heap growth (thanks to Scott Schwartz).
9623 * Changed finalize.c to call WARN if it encounters a finalization cycle.
9624 WARN is defined in gc_priv.h to write a message, usually to stdout.
9625 In many environments, this may be inappropriate.
9626 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
9627 naming convention.
9628 * Added GC_set_warn_proc to intercept warnings.
9629 * Fixed Amiga port (thanks to Michel Schinz).
9630 * Fixed a bug in mark.c that could result in an access to unmapped
9631 memory from GC_mark_from_mark_stack on machines with unaligned
9632 pointers.
9633 * Fixed a win32 specific performance bug that could result in scanning of
9634 objects allocated with the system malloc.
9635 * Added REDIRECT_MALLOC.
9636
9637
9638 == [4.3] 1994-12-23 ==
9639
9640 * Fixed SPARC alignment problem with GC_DEBUG.
9641 * Fixed Solaris threads /proc workaround.  The real
9642 problem was an interaction with mprotect.
9643 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
9644 * Slightly improved allocator space utilization by
9645 fixing the GC_size_map mechanism.
9646 * Integrated some Sony News and MIPS RISCos 4.51
9647 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
9648 Inc., Japan).
9649 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
9650 * Added GC_same_obj and friends.  Changed GC_base
9651 to return 0 for pointers past the end of large objects.
9652 Improved GC_base performance with ALL_INTERIOR_POINTERS
9653 on machines with a slow integer mod operation.
9654 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
9655 for preprocessor.
9656 * changed the default on most UNIX machines to be that
9657 signals are not disabled during critical GC operations.
9658 This is still ANSI-conforming, though somewhat dangerous
9659 in the presence of signal handlers. But the performance
9660 cost of the alternative is sometimes problematic.
9661 Can be changed back with a minor Makefile edit.
9662 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
9663 following my own naming convention.  Added the function
9664 CORD_to_const_char_star.
9665 * Fixed a gross bug in GC_finalize.  Symptom: occasional
9666 address faults in that function (thanks to Anselm Baird-Smith).
9667 * Added port to ICL DRS6000 running DRS/NX.  Restructured
9668 things a bit to factor out common code, and remove obsolete
9669 code.  Collector should now run under SUNOS5 with either
9670 mprotect or /proc dirty bits.  (Thanks to Douglas Steel.)
9671 * More bug fixes and workarounds for Solaris 2.X.  (These were
9672 mostly related to putting the collector in a dynamic library,
9673 which didn't really work before.  Also SOLARIS_THREADS
9674 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
9675 * Fixed a serious performance bug on the DEC Alpha.  The text
9676 segment was getting registered as part of the root set.
9677 (Amazingly, the result was still fast enough that the bug
9678 was not conspicuous.) The fix works on OSF/1, version 1.3.
9679 Hopefully it also works on other versions of OSF/1 ...
9680 * Fixed a bug in GC_clear_roots.
9681 * Fixed a bug in GC_generic_malloc_words_small that broke
9682 gc_inl.h (reported by Antoine de Maricourt).
9683 * Fixed some problems with cord/de under Linux.
9684 * Fixed some cord problems, notably with CORD_riter4.
9685 * Added DG/UX port (thanks to Ben A. Mesander).
9686 * Added finalization registration routines with weaker ordering
9687 constraints.  (This is necessary for C++ finalization with
9688 multiple inheritance, since the compiler often adds self-cycles.)
9689 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
9690 * Completely rewritten the documentation in the interface gc_c++.h
9691 (later renamed gc_cpp.h) making it both clearer and more precise (done by
9692 John Ellis).
9693 * The definition of accessibility now ignores pointers from a finalizable
9694 object (an object with a clean-up function) to itself (done by John Ellis).
9695 This allows objects with virtual base classes to be finalizable by the
9696 collector.  Compilers typically implement virtual base classes using
9697 pointers from an object to itself, which under the old definition of
9698 accessibility prevented objects with virtual base classes from ever
9699 being collected or finalized.
9700 * gc_cleanup now includes gc as a virtual base.  This was enabled by
9701 the change in the definition of accessibility (by John Ellis).
9702 * Added support for operator new[] (by John Ellis).  Since most compilers
9703 don't yet support operator new[], it is conditionalized on
9704 -DOPERATOR_NEW_ARRAY.  The code is untested, but its trivial and looks
9705 correct.
9706 * The test program test_gc_c++ (later renamed test_cpp.cc)
9707 tries to test for the C++-specific functionality not tested by the
9708 other programs.
9709 * Added unistd.h include to misc.c.  (Needed for ppcr.)
9710 * Added PowerMac port (thanks to Patrick C. Beard).
9711 * Fixed "srcdir"-related Makefile problems.  Changed things so
9712 that all externally visible include files always appear in the
9713 include subdirectory of the source.  Made gc.h directly
9714 includable from C++ code (thanks to Per Bothner).
9715 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
9716 * Renamed C++ related files so they could live in a FAT
9717 file system (thanks to Charles Fiterman).
9718 * Changed Windows NT Makefile to include C++ support in
9719 gc.lib.  Added C++ test as Makefile target.
9720
9721
9722 == [4.2] 1994-08-03 ==
9723
9724 * Multiple bug fixes/workarounds in the Solaris threads version.
9725 (It occasionally failed to locate some register contents for
9726 marking.  It also turns out that thr_suspend and friends are
9727 unreliable in Solaris 2.3.  Dirty bit reads appear
9728 to be unreliable under some weird
9729 circumstances.  My stack marking code
9730 contained a serious performance bug.  The new code is
9731 extremely defensive, and has not failed in several CPU
9732 hours of testing.  But no guarantees ...)
9733 * Added MacOS support.  (Thanks to Patrick C. Beard.
9734 David Chase suggested several improvements.)
9735 * Fixed several syntactic bugs in gc_c++.h and friends.  (These
9736 didn't bother g++, but did bother most other compilers.)
9737 Fixed gc_c++.h finalization interface.
9738 * 64 bit alignment for allocated objects was not guaranteed in a
9739 few cases in which it should have been.
9740 * Added GC_malloc_atomic_ignore_off_page.
9741 * Added GC_collect_a_little.
9742 * Added some prototypes to gc.h.
9743 * Some other minor bug fixes (notably in Makefile).
9744 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
9745 * Fixed AmigaDOS port (thanks to Michel Schinz).
9746 * Fixed the DATASTART definition under Solaris.  There
9747 was a 1 in 16K chance of the collector missing the first
9748 64K of static data (and thus crashing).
9749 * Fixed some blatant anachronisms in the README file.
9750 * Fixed PCR-Makefile for upcoming PPCR release.
9751
9752
9753 == [4.1] 1994-05-20 ==
9754
9755 * Changed finalization implementation to guarantee that
9756 finalization procedures are called outside of the allocation
9757 lock, making direct use of the interface a little less dangerous.
9758 MAY BREAK EXISTING CLIENTS that assume finalizers
9759 are protected by a lock.  Since there seem to be few multi-threaded
9760 clients that use finalization, this is hopefully not much of
9761 a problem.
9762 * Fixed a gross bug in CORD_prev.
9763 * Fixed a bug in blacklst.c that could result in unbounded
9764 heap growth during startup on machines that do not clear
9765 memory obtained from the OS (e.g. win32S).
9766 * Ported de editor to win32/win32S.  (This is now the only
9767 version with a mouse-sensitive UI.  Thanks to Rob Haack for the
9768 implementation based on the generic Windows application template.)
9769 * Added GC_malloc_ignore_off_page to allocate large arrays
9770 in the presence of ALL_INTERIOR_POINTERS.
9771 * Changed GC_call_with_alloc_lock to not disable signals in
9772 the single-threaded case.
9773 * Reduced retry count in GC_collect_or_expand for garbage
9774 collecting when out of memory.
9775 * Made uncollectible allocations bypass black-listing, as they
9776 should.
9777 * Fixed a bug in typed_test in test.c that could cause (legitimate)
9778 GC crashes.
9779 * Fixed some potential synchronization problems in finalize.c
9780 * Fixed a real locking problem in typd_mlc.c.
9781 * Worked around an AIX 3.2 compiler feature that results in
9782 out of bounds memory references.
9783 * Partially worked around an IRIX5.2 beta problem (which may
9784 or may not persist to the final release).
9785 * Fixed a bug in the heap integrity checking code that could
9786 result in explicitly deallocated objects being identified as
9787 smashed.  Fixed a bug in the dbg_mlc stack saving code
9788 that caused old argument pointers to be considered live.
9789 * Fixed a bug in CORD_ncmp (and hence CORD_str).
9790 * Repaired the OS2 port, which had suffered from bit rot
9791 in 4.0.  Worked around what appears to be CSet/2 V1.0
9792 optimizer bug.
9793 * Fixed a Makefile bug for target "c++".
9794
9795
9796 == [4.0] 1994-04-07 ==
9797
9798 * Added support for Solaris threads (which was possible
9799 only by reimplementing some fraction of Solaris threads,
9800 since Sun doesn't currently make the thread debugging
9801 interface available).
9802 * Added non-threads win32 and win32S support.
9803 * (Grudgingly, with suitable muttering of obscenities) renamed
9804 files so that the collector distribution could live on a FAT
9805 file system.  Files that are guaranteed to be useless on
9806 a PC still have long names.  Gc_inline.h and gc_private.h
9807 still exist, but now just include  gc_inl.h and gc_priv.h.
9808 * Fixed a really obscure bug in finalization that could cause
9809 undetected mark stack overflows.  (I would be surprised if
9810 any real code ever tickled this one.)
9811 * Changed finalization code to dynamically resize the hash
9812 tables it maintains.  (This probably does not matter for well-
9813 -written code.  It no doubt does for C++ code that overuses
9814 destructors.)
9815 * Added typed allocation primitives.  Rewrote the marker to
9816 accommodate them with more reasonable efficiency.  This
9817 change should also speed up marking for GC_malloc allocated
9818 objects a little.  See gc_typed.h for new primitives.  (Thanks to
9819 Zhong Shao performed much of the experimentation that led to the
9820 current typed allocation facility.)
9821 * Improved debugging facilities slightly.  Allocation time
9822 stack traces are now kept by default on SPARC/SUNOS4.  (Thanks to
9823 Scott Schwartz.)
9824 * Added better support for small heap applications.
9825 * Significantly extended cord package.  Fixed a bug in the
9826 implementation of lazily read files.  Printf and friends now
9827 have cord variants.  Cord traversals are a bit faster.
9828 * Made ALL_INTERIOR_POINTERS recognition the default.
9829 * Fixed de so that it can run in constant space, independent
9830 of file size.  Added simple string searching to cords and de.
9831 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
9832 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
9833 Tim Bingham at DEC).
9834 * Changed argument to GC_expand_hp to be expressed
9835 in units of bytes instead of heap blocks.  (Necessary
9836 since the heap block size now varies depending on
9837 configuration.  The old version was never very clean.)
9838 * Added GC_get_heap_size().  The previous "equivalent"
9839 was broken.
9840 * Restructured the Makefile a bit.
9841 * Added FreeBSD port (provided by Jeffrey Hsu).
9842
9843
9844 == [3.7] 1994-03-15 ==
9845
9846 * Added a workaround for an HP/UX compiler bug.
9847 * Fixed another stack clearing performance bug.  Reworked
9848 that code once more.
9849
9850
9851 == [3.6] 1994-01-14 ==
9852
9853 * fixed a bug in the mark stack growth code that was introduced
9854 in 3.4.
9855 * fixed Makefile to work around DEC AXP compiler tail recursion
9856 bug.
9857
9858
9859 == [3.5] ==
9860
9861 * Minor collections now mark from roots only once, if that
9862 doesn't cause an excessive pause.
9863 * The stack clearing heuristic was refined to prevent anomalies
9864 with very heavily recursive programs and sparse stacks.
9865 * Fixed a bug that prevented mark stack growth in some cases.
9866 GC_objects_are_marked should be set to TRUE after a call
9867 to GC_push_roots and as part of GC_push_marked, since
9868 both can now set mark bits.  I think this is only a performance
9869 bug, but I wouldn't bet on it.  It's certainly very hard to argue
9870 that the old version was correct.
9871 * Fixed an incremental collection bug that prevented it from
9872 working at all when HBLKSIZE != getpagesize()
9873 * Changed dynamic_loading.c to include gc_priv.h before testing
9874 DYNAMIC_LOADING.  SunOS dynamic library scanning
9875 must have been broken in 3.4.
9876 * Object size rounding now adapts to program behavior.
9877 * Added a workaround (provided by Manuel Serrano and
9878 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
9879 that I had incorrectly assumed to have been squished.
9880 The collector was broken if the text segment size was within
9881 32 bytes of a multiple of 8K bytes, and if the beginning of
9882 the data segment contained interesting roots.  The workaround
9883 assumes a demand-loadable executable.  The original may have
9884 have "worked" in some other cases.
9885 * Added dynamic library support under IRIX5.
9886 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
9887 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
9888
9889
9890 == [3.4] ==
9891
9892 * Fixed a performance bug in GC_realloc.
9893 * Updated the amiga port.
9894 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
9895 * Added cord library.
9896 * Added trivial performance enhancement for
9897 ALL_INTERIOR_POINTERS (do not scan last word).
9898
9899
9900 == [3.3] 1993-10-02 ==
9901
9902 * PCR-specific bugs (thanks to Neil Sharman).
9903 * Missing locking in GC_free, redundant FASTUNLOCK
9904 in GC_malloc_stubborn, and 2 bugs in
9905 GC_unregister_disappearing_link (pointed out by Neil Sharman).
9906 * Common symbols allocated by the SunOS4.X dynamic loader
9907 were not included in the root set.
9908 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
9909 * Merged Amiga port from Jesper Peterson (untested).
9910 * Merged NeXT port from Thomas Funke (significantly
9911 modified and untested).  (Also thanks to Brian D. Carlstrom for
9912 the supplied the NeXT ports.)
9913
9914
9915 == [3.2] ==
9916
9917 Fixed a serious and not entirely repeatable bug in
9918 the incremental collector.  It appeared only when dirty bit info
9919 on the roots was available, which is normally only under Solaris.
9920 It also added GC_general_register_disappearing_link, and some
9921 testing code.  Interface.c disappeared.
9922
9923
9924 == [3.1] ==
9925
9926 * A workaround for a SunOS 4.X SPARC C compiler
9927 misfeature that caused problems when the collector was turned into
9928 a dynamic library.
9929 * A fix for a bug in GC_base that could result in a memory fault.
9930 * A fix for a performance bug (and several other misfeatures) pointed
9931 out by Dave Detlefs and Alan Dosser.
9932 * Use of dirty bit information for static data under Solaris 2.X.
9933 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
9934 * Incremental collection on more platforms.
9935 * A more refined heap expansion policy.  Less space usage by default.
9936 * Various minor enhancements to reduce space usage, and to reduce
9937 the amount of memory scanned by the collector.
9938 * Uncollectible allocation without per object overhead.
9939 * More conscientious handling of out-of-memory conditions.
9940 * Fixed a bug in debugging stubborn allocation.
9941 * Fixed a bug that resulted in occasional erroneous reporting of smashed
9942 objects with debugging allocation.
9943 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
9944
9945
9946 == [3.0] ==
9947
9948 Added generational/incremental collection and stubborn objects.
9949
9950
9951 == [2.6] 1993-04-27 ==
9952
9953 (Changes not specified.)
9954
9955
9956 == [2.5] ==
9957
9958 * Removed an explicit call to exit(1)
9959 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
9960 arguments are always supplied.  The OS/2 C compiler gets confused if
9961 the number of actuals and the number of formals differ.  (ANSI C
9962 doesn't require this to work.  The ANSI sanctioned way of doing things
9963 causes too many compatibility problems.)
9964
9965
9966 == [2.4] 1993-01-26 ==
9967
9968 Added GC_free_space_divisor as a tuning knob, added
9969 support for OS/2 and linux, and fixed the following bugs:
9970 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
9971 fail to be considered for marking.
9972 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
9973 bss sections of the dynamic library.  This could result in a bad memory
9974 reference if the actual length was a multiple of a page.  (Observed on
9975 Sun 3.  Can probably also happen on a Sun 4.)
9976 (Thanks to Robert Brazile for pointing out that the Sun 3 version
9977 was broken.  Dynamic library handling is still broken on Sun 3s
9978 under 4.1.1U1, but apparently not 4.1.1.  If you have such a machine,
9979 use -Bstatic.)
9980
9981
9982 == [2.3] ==
9983
9984 * Added ALL_INTERIOR_POINTERS.
9985 * Missing declaration of etext in the A/UX version.
9986 * Some PCR root-finding problems.
9987 * Blacklisting was not 100% effective, because the plausible future
9988 heap bounds were being miscalculated.
9989 * GC_realloc didn't handle out-of-memory correctly.
9990 * GC_base could return a nonzero value for addresses inside free blocks.
9991 * test.c wasn't really thread safe, and could erroneously report failure
9992 in a multi-threaded environment.  (The locking primitives need to be
9993 replaced for other threads packages.)
9994 * GC_CONS was thoroughly broken.
9995 * On a SPARC with dynamic linking, signals stayed disabled while the
9996 client code was running (thanks to Manuel Serrano).
9997
9998
9999 == [2.2] ==
10000
10001 * GC_realloc could fail to extend the size of the object for certain large
10002 object sizes.
10003 * A blatant subscript range error in GC_printf, which unfortunately
10004 wasn't exercised on machines with sufficient stack alignment constraints.
10005 * GC_register_displacement did the wrong thing if it was called after
10006 any allocation had taken place.
10007 * The leak finding code would eventually break after 2048 byte
10008 byte objects leaked.
10009 * interface.c didn't compile.
10010 * The heap size remained much too small for large stacks.
10011 * The stack clearing code behaved badly for large stacks, and perhaps
10012 on HP/PA machines.
10013
10014
10015 == [2.1] ==
10016
10017 * The first stable version since 1.9.
10018 * Added support for PPCR.
10019
10020
10021 == [2.0] ==
10022
10023 * Introduced a consistent naming convention for collector
10024 routines and added support for registering dynamic library data segments
10025 in the standard mark_roots.c (original code supporting the SunOS dynamic
10026 loader provided by Bill Janssen).  Most of the data structures were revamped.
10027 The treatment of interior pointers was completely changed.  Finalization
10028 was added.  Support for locking was added.  Object kinds were added.
10029 We added a black listing facility to avoid allocating at addresses known
10030 to occur as integers somewhere in the address space.  Much of this
10031 was accomplished by adapting ideas and code from the PCR collector.
10032 The test program was changed and expanded.
10033
10034
10035 == [1.9] 1992-01-29 ==
10036
10037 * fixed a major bug in gc_realloc.
10038
10039
10040 == [1.8] ==
10041
10042 * added ULTRIX support in gc_private.h.  (Robert Brazile originally supplied
10043 the ULTRIX code.  Alan Dosser and Regis Cridlig subsequently provided updates
10044 and information on variation between ULTRIX systems.)
10045
10046
10047 == [1.5] ==
10048
10049 * ensure 8 byte alignment for objects allocated on a sparc based machine.
10050
10051
10052 == [1.4] ==
10053
10054 * Does not use compile time determined values
10055 for the stack base.  This no longer works on Sun 3s, since Sun 3/80s use
10056 a different stack base.  We now use a straightforward heuristic on all
10057 machines on which it is known to work (incl. Sun 3s) and compile-time
10058 determined values for the rest.  There should really be library calls
10059 to determine such values.
10060
10061
10062 == [1.3] ==
10063
10064 * Fixed spurious
10065 assembly language assignments to TMP_SP.  Only the assignment in the PC/RT
10066 code is necessary.  On other machines, with certain compiler options,
10067 the assignments can lead to an unsaved register being overwritten.
10068 Known to cause problems under SunOS 3.5 WITHOUT the -O option.  (With
10069 -O the compiler recognizes it as dead code.  It probably shouldn't,
10070 but that's another story.)
10071 The SPARC-specific code was originally contributed by Mark Weiser.
10072 The Encore Multimax modifications were supplied by Kevin Kenny.
10073 The adaptation to the IBM PC/RT is largely
10074 due to Vernon Lee, on machines made available to Rice by IBM.
10075 Much of the HP specific code and a number of good suggestions for improving
10076 the generic code are due to Walter Underwood.
10077 Parag Patel supplied the A/UX code.
10078 Manuel Serrano supplied linux and Sony News specific code.