]> granicus.if.org Git - gc/blob - ChangeLog
Update ChangeLog file (v7.6 changes)
[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, staticrootstest, test_cpp, tracetest, 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 cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
16 * Build gc as a shared multi-threaded library by default (CMake)
17 * Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
18 * Build shared libraries by default (WCC_MAKEFILE)
19 * Check real-symbols are already initialized in pthread_join/detach
20 * Comments reformatting in mark.c to properly delimit sentences
21 * Compile de test GUI app with resources (CMake)
22 * Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
23 * Compile msvc_dbg.c by CMake script (MS VC)
24 * Define STATIC macro to static by default
25 * Do not build tests by default (Makefile.direct and other Makefiles)
26 * Do not build the tests by default (CMake)
27 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
28 * Eliminate 'hash_val value is never used' cppcheck false positive
29 * Eliminate 'stop variable is always 0' compiler warning in print_callers
30 * Eliminate 'struct member os_callback is never used' cppcheck warning
31 * Enable CMake-based build for Borland and Watcom compilers
32 * Enable compilation without C runtime (Win32)
33 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
34 * Enable true incremental collection even if parallel marker is on
35 * Fix HOST determination in CMake script
36 * Generate cordtest and de executable files in GC base folder
37 * Get rid of some non-ELF ifdefs (code refactoring)
38 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
39 * New API function to get size of object debug header
40 * New API standalone functions to acquire and release the allocator lock
41 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
42 * New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
43 * Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
44 * Print pid of child processes if verbose logging (gctest)
45 * Refine flags field comment in pthread_support.h
46 * Reformat gc.man (wrap long lines)
47 * Reformatting and code refactoring of CMake script
48 * Remove 'current users' section from overview.md
49 * Remove 'distributed ports', 'scalable versions' sections from overview.md
50 * Remove Borland-specific Makefile and gc.mak script
51 * Remove Linux-specific commands for building cord/de from Makefile.direct
52 * Remove Win32 main_thread static variable if threads discovery is disabled
53 * Remove dash characters comprising prefix of some verbose logs (gctest)
54 * Remove dependency on user32.dll import library from static libgc (Win32)
55 * Remove documentation specific to particular old BDWGC releases
56 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
57 * Remove goto statement in print_callers (code refactoring)
58 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
59 * Remove unused STACK_GRAN macro definitions (code refactoring)
60 * Remove unused sparc_sunos4_mach_dep.s file
61 * Rename cord/cord test executable to de (CMake)
62 * Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
63 * Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
64 * Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
65 * Rename nothreads option to disable_threads in NT_MAKEFILE
66 * Replace "msecs" with "ms" in all comments and messages
67 * Replace 'stack base' with 'stack bottom' in the documentation
68 * Replace _M_AMD64 macro with _M_X64 (code refactoring)
69 * Report time with a nanosecond precision where available
70 * Simplify logged message in scratch_recycle
71 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
72 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
73 * Support header files installation (CMake)
74 * Support most configure options in CMake script
75 * Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
76 * Turn off C++ API by default, export it in gccpp library (CMake)
77 * Update README.cmake regarding Unix, C++ and tests
78 * Update libgc.so version info to differentiate against v8.0.x
79 * Update the ASCII diagrams describing the tree structure for pointer lookups
80 * Update the documentation to match the current GC implementation
81 * Upgrade cmake_minimum_required(version) to 3.1
82 * Use KB/MB/GB abbreviations uniformly across entire documentation
83 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
84 * Use better precision Windows timers
85 * Workaround '*_stubborn function is never used' cppcheck warnings
86 * Workaround 'GC_get_thr_restart_signal is never used' cppcheck warning
87 * Workaround '__data_start<_etext is always false' cppcheck false positive
88 * Workaround 'argument dummy to GC_noop1 is always 1' cppcheck false positive
89 * Workaround 'checking if unsigned expression < 0' cppcheck warnings
90 * Workaround 'condition (pred&1)==0 is always false' cppcheck false positive
91 * Workaround 'duplicate expression for condition and assignment' cppcheck FP
92 * Workaround 'identical inner return condition always true' cppcheck warning
93 * Workaround 'if condition is the same as the previous one' cppcheck warnings
94 * Workaround 'me assigned value never used' cppcheck FP in register_my_thread
95 * Workaround 'name var reassign before old value use' cppcheck false positive
96 * Workaround 'nl-result_buf is out of bounds' cppcheck false positive
97 * Workaround 'uninitialized variable: info' cppcheck false positive (OS X)
98 * Workaround 'var reassigned before old value use' cppcheck false positive
99
100
101 == [8.0.6] (not released yet) ==
102
103 * Add support of OpenBSD/aarch64
104 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
105 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
106 * Do not use Manual VDB mode if C malloc is redirected
107 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
108 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
109 * Eliminate 'possible loss of data' BCC and MS VC warnings
110 * Eliminate 'unused function' compiler warnings (GC_add_map_entry, GC_lock)
111 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
112 * Enable sbrk-to-mmap fallback on major supported Unix-like platforms
113 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
114 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
115 * Fix 'condition pred!=NULL is always true' compiler warning
116 * Fix 'external linkage required for var because of dllimport' error on MinGW
117 * Fix 'ulong undefined' compilation error on AIX
118 * Fix 'wrong finalization data' gctest failure on Windows
119 * Fix MPROTECT_VDB definition for single-threaded GC builds
120 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
121 * Fix build for OS X (CMake)
122 * Fix building of shared library with C++ support on MinGW
123 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
124 * Fix configure message about 'AIX gcc optimization fix'
125 * Fix cordtest build in SMakefile.amiga
126 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
127 * Fix gc_allocator.h compilation by Clang
128 * Fix incorrect markup formatting in documentation
129 * Fix mmap(PROT_NONE) failure on AIX
130 * Fix printf format specifier in simple_example.md
131 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
132 * Fix subexpression widening in memhash() of disclaim_weakmap_test
133 * Fix test_cpp failure caused by arbitrary link order (Win32)
134 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
135 * Fix various typos mostly in documentation files
136 * Fix word size, data start and alignment for OpenBSD/mips64(el)
137 * Refine GC_INIT documentation about its multiple invocation
138 * Refine GC_parallel documentation in gc.h
139 * Refine do_blocking() documentation in gc.h
140 * Remove a misleading comment about Solaris in gc.h
141 * Remove gcmt-lib generation by CMake
142 * Support MSYS builds by CMake and configure
143 * Update documentation about the incremental collector support
144 * Workaround 'expression is only useful for its side effects' WCC warning
145 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
146
147
148 == [8.0.4] 2019-03-02 ==
149
150 * Avoid a full GC when growing finalizer tables if in incremental mode
151 * Avoid potential race in hb_sz access between realloc and reclaim_block
152 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
153 * Avoid unexpected heap growth in gctest caused by GC_disable
154 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
155 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
156 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
157 * Fix 'unexpected mark stack overflow' abort in push_all_stack
158 * Fix 'wrong __data_start/_end pair' error on Android
159 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
160 * Fix GetThreadContext stale register values use if WoW64 (Win32)
161 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
162 * Fix thread_info() count argument value (OS X)
163 * Support de_win.c compilation by Makefile.direct (cord/de)
164
165
166 == [8.0.2] 2018-12-23 ==
167
168 * Abort with appropriate message if executable pages cannot be allocated
169 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
170 * Add paths to filenames mentioned in the copyright section in README
171 * Add test using disclaim notifiers to implement a weak map
172 * Adjust #error messages format
173 * Allow to force executable pages allocation in gctest
174 * Avoid potential 'macro redefinition' errors for config.h macros
175 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
176 * Check result of pthread_mutex_unlock in specific.c
177 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
178 * Default to non-executable memory allocation across all make scripts
179 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
180 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
181 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
182 * Do not use spin locks if AO test-and-set is emulated (pthreads)
183 * Document HANDLE_FORK macro optional usage in Makefile.direct
184 * Document assertion in the setters that used to return old value
185 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
186 * Eliminate 'casting signed to bigger unsigned int' CSA warning
187 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
188 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
189 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
190 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
191 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
192 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
193 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
194 * Eliminate redundant check in backwards_height
195 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
196 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
197 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
198 * Fix 'too wide non-owner permissions are set for resource' code defect
199 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
200 * Fix GC_register_disclaim_proc for leak-finding mode
201 * Fix a deadlock in write_fault_handler if AO_or is emulated
202 * Fix comment typo in CMakeLists.txt
203 * Fix concurrent bitmap update in GC_dirty
204 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
205 * Fix executable memory allocation in GC_unix_get_mem
206 * Fix hbp overflow in GC_install_counts
207 * Fix linkage with a system libatomic_ops shared library
208 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
209 * Fix marking of finalizer closure object
210 * Fix marks and hb_n_marks consistency when disclaim returns true
211 * Fix memory allocation on GCF (Linux/x64)
212 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
213 * Fix test_cpp assertion violation in find-leak mode
214 * Fix tests linkage with internal atomic_ops.o
215 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
216 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
217 * New macro to suppress printing of leaked objects
218 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
219 * Prefix internal durango_get_mem symbol with 'GC_'
220 * Prevent double inclusion of javaxfc.h and private/specific.h
221 * Print relevant message in tests not appropriate for leak detection mode
222 * Reduce scope of local variables in GC_remove_all_threads_but_me
223 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
224 * Refine documentation in gc_disclaim.h
225 * Remove extra USE_MMAP definition for Interix
226 * Remove redundant header double-inclusion checks in the private headers
227 * Remove strlen calls with a constant string argument in msvc_dbg
228 * Specify register_disclaim_proc and finalized_malloc argument as non-null
229 * Support UWP/arm64 target
230 * Test marking of finalizer closure object in disclaim_test
231 * Turn off leak detection mode explicitly in cord/de
232 * Turn off parallel marker, thread-local allocation if used AO ops emulated
233 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
234 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
235 * Update NO_EXECUTE_PERMISSION documentation
236 * Update documentation about arm64 ABI in gcconfig.h
237 * Use AO_or in async_set_pht_entry_from_index if available
238 * Use GC_WORD_MAX macro across all C source files
239 * Use macro to operate on a flag residing in GC_stop_count
240 * Use standalone private macro to guard against ptr_t redefinition
241 * Workaround '#error' cppcheck messages in backgraph and private headers
242 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
243 * Workaround 'GC_dump function is never used' cppcheck warning
244 * Workaround 'local address assignment to a global variable' CSA warning
245 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
246 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
247 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
248 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
249 * Workaround 'potential non-terminated string' false positive in cordbscs
250 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
251 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
252
253
254 == [8.0.0] 2018-09-05 ==
255
256 * Accept Android platform by both CMake and configure
257 * Access finalize_now atomically to avoid TSan warning without no-sanitize
258 * Acknowledge thread restart from suspend_handler (NetBSD)
259 * Add a sanity check that load_acquire and store_release are available
260 * Add AO primitives implementation to GC based on C11 atomic intrinsic
261 * Add assertion for suspend_ack_sem in start_world
262 * Add assertion to allocobj that live unmarked object cannot be reclaimed
263 * Add assertions about held lock when accessing all_bottom_indices
264 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
265 * Add assertions to finalize and threads support for MANUAL_VDB needs
266 * Add basic calculation of the total full-collection time
267 * Add check that gc_cpp operator delete is called (test_cpp)
268 * Add debug logging to new_thread about GC_threads hash table collisions
269 * Add GC prefix to _MSVC_DBG_H macro
270 * Add initial RISC-V support
271 * Add Makefile target to run all tests without test-driver
272 * Add test_atomic_ops to perform minimal testing of used atomic primitives
273 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
274 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
275 * Allocate non-executable memory by default (CMake)
276 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
277 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
278 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
279 * Allow disabling of dynamic loading in CMake script and configure
280 * Allow disabling of main static data registration in CMake and configure
281 * Allow disabling of threads discovery in CMake script and configure
282 * Allow gc_assertions enabling in CMake script
283 * Allow gc_debug, redirect_malloc, large_config options in CMake script
284 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
285 * Allow mmap enabling in CMake script and configure
286 * Allow passing -D DEFAULT_VDB to CFLAGS
287 * Allow subthreadcreate_test to be compiled with zero NTHREADS
288 * Allow to turn on spin locking even if thread-local allocations are used
289 * Always include gc_atomic_ops.h unless threads are disabled
290 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
291 * Avoid duplication of code handling pthreads case in configure
292 * Avoid potential data race during apply_to_each_object(reset_back_edge)
293 * Avoid potential data race during GC_dump execution
294 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
295 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
296 * Avoid potential race in print_static_roots called by dyld_image_add/remove
297 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
298 * Avoid potential race when accessing size_map table
299 * Avoid potential race when storing oh_back_ptr during parallel marking
300 * Avoid SIGSEGV during GC_INIT on some Android devices
301 * Build only shared libraries by default (configure)
302 * Change pointer arguments of push_all[_eager]/conditional API to void* type
303 * Change type of hb_sz field (of hblkhdr) from size_t to word
304 * Check consistency of descr, adjust, clear arguments of GC_new_kind
305 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
306 * Check thread_local is initialized before accessing thread_key
307 * Collapse multiple BCOPY_EXISTS macro definitions
308 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
309 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
310 * Compile checksums.c only if --enable-checksums is given (configure)
311 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
312 * Convert .html files to Markdown format
313 * Convert code of .c files to valid C++ code
314 * Decide between memory unmapping and mprotect-based dirty bits at runtime
315 * Declare t local variable in the block where the variable is used
316 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
317 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
318 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
319 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
320 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
321 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
322 * Define macro to specify the environment file name extension (Win32/WinCE)
323 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
324 * Detect sigsetjmp() availability by configure
325 * Determine whether to use compiler TLS for kFreeBSD at compile time
326 * Do not call BCOPY and BZERO if size is zero
327 * Do not call sem_getvalue in stop_world if one thread exists
328 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
329 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
330 * Do not declare dl_iterate_phdr as weak for kFreeBSD
331 * Do not include windows.h when compiling gc_cpp.cc
332 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
333 * Do not merge dynamic root with the existing static one in add_roots_inner
334 * Do not print n_rescuing_pages value if incremental collections disabled
335 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
336 * Do not rebuild_root_index unless remove_root_at_pos is called
337 * Do not specify version info for test libraries (Automake)
338 * Do not use alternate thread library on Solaris
339 * Do not use asm in GC_pause
340 * Do not use PKG_CHECK_MODULES in configure
341 * Do not use system clock consistently if NO_CLOCK
342 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
343 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
344 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
345 * Eliminate 'comparison is always false' code defect in get_maps
346 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
347 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
348 * Enable alternative finalization interface (DISCLAIM) in all makefiles
349 * Enable compilation for Cygwin with MPROTECT_VDB
350 * Enable handle-fork and memory unmapping by default
351 * Enable mprotect-based incremental GC for Win64 (GCC)
352 * Expose API to control rate and max prior attempts of collect_a_little
353 * Expose API to control the minimum bytes allocated before a GC occurs
354 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
355 * Fix 'doc' files installation folder
356 * Fix build of cord tests as C++ files (Makefile.direct)
357 * Fix comment typos in backgraph.c, de.c, gcconfig.h
358 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
359 * Fix start_world not resuming all threads on Darwin
360 * Fix test_cpp failure in case GC_DEBUG is defined
361 * Group common defines for POSIX platforms in configure and CMake scripts
362 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
363 * Handle pthread restart signals loss if retry_signals
364 * Hide value stored to thread-specific entries for a test purpose
365 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
366 * Implement memory unmapping for Sony PS/3
367 * Imply configure --single-obj-compilation if --disable-static
368 * Include malloc.c in extra/gc.c after include gc_inline.h
369 * Increase MAX_HEAP_SECTS (10 times) for large-config
370 * Initial single-threaded support of Interix subsystem
371 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
372 * Initial support of TIZEN platform
373 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
374 * Make extend_size_map() static (code refactoring)
375 * Make subthreadcreate test compilable even without libatomic_ops
376 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
377 * Move de_win compiled resource files to cord/tests
378 * Move pcr_interface.c, real_malloc.c to 'extra' folder
379 * New API function (GC_dump_named) to produce named dumps
380 * New API function (GC_is_incremental_mode)
381 * New API function (get_expl_freed_bytes_since_gc)
382 * New API function (get_size_map_at) to get content of size_map table
383 * New API to stop and start the GC world externally
384 * New API to turn on manual VDB at runtime
385 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
386 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
387 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
388 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
389 * Print time passed since GC initialization in GC_dump
390 * Public API (GC_deinit) to allow Win32 critical sections deletion
391 * Reduce probability of collision in threads hashtable for 64-bit targets
392 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
393 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
394 * Reformat code and comments in gc_allocator.h
395 * Remove 'dist' target from Makefile.direct
396 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
397 * Remove Android-specific code in gcconfig.h for M68K
398 * Remove C++ WeakPointer and CleanUp API which lacks implementation
399 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
400 * Remove done_init static variable from fnlz_mlc.c
401 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
402 * Remove duplicated sample code in leak.md
403 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
404 * Remove GC code fragment (which already merged) from README.Mac
405 * Remove GC_GNU_THREADS macro (HURD)
406 * Remove GENERAL_MALLOC internal macro
407 * Remove HIGH_BIT macro duplicating SIGNB
408 * Remove lint-specific code
409 * Remove Makefile KandRtest target (that supported K&R C compiler)
410 * Remove MIN_WORDS macro from gc_priv.h
411 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
412 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
413 * Remove notes that K&R C compiler is unsupported
414 * Remove PUSH_CONTENTS_HDR multi-line macro
415 * Remove redundant check that clear_fl_marks argument is non-null
416 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
417 * Remove stubborn objects allocation code completely, remove stubborn.c
418 * Remove unnecessary argument casts in add_roots_inner calls
419 * Remove unnecessary type casts in n_set_marks
420 * Remove unused USE_GENERIC macro definition and description
421 * Remove version info in 'de' cord test application
422 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
423 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
424 * Replace some FIXME items with TODO ones
425 * Run command passed to if_not_there directly from Makefile.direct
426 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
427 * Skip grungy_pages update when mark state invalid to speedup read_dirty
428 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
429 * Support configure --disable-thread-local-alloc option (similar for CMake)
430 * Support enable_checksums option in CMake script
431 * Support Haiku multi-threaded build by CMake
432 * Support threads for DragonFly in configure
433 * Turn on 'atomic uncollectable' functionality by default (CMake)
434 * Turn on GC assertions in NT_MAKEFILE for debug builds
435 * Turn on gcj, disclaim and java finalization by default (CMake)
436 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
437 * Turn on incremental mode in cordtest and cord/de
438 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
439 * Turn on parallel marker by default for all multi-threaded builds
440 * Update GC compilation and usage notes for Win32
441 * Update shared libraries version info to differentiate against v7.6
442 * Update top_index entry pointer only when the entry is constructed fully
443 * Use __builtin_expect in SIZET_SAT_ADD macro
444 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
445 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
446 * Use __thread keyword for Android NDK r12b+ Clang (arm)
447 * Use atomic allocation for leafs in reverse_test (gctest)
448 * Use atomic load/store for the concurrently accessed variables in GC_lock
449 * Use C11 static_assert if available
450 * Use compiler atomic intrinsics by default if available (configure)
451 * Use EXPECT FALSE for mark_from code documented as executed rarely
452 * Use heap-allocated memory for local mark stack of non-marker thread
453 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
454 * Use include gc.h with the angle brackets in the man page synopsis
455 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
456 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
457 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
458 * Use same macro (NTHREADS) across all tests to specify number of threads
459 * Use sigsetjmp() in setjmp_t tool if available
460 * Use thread-local allocations for all multi-threaded builds
461 * Use THREAD_EQUAL consistently to compare pthread_t values
462 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
463 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
464 * Workaround Thread Sanitizer (TSan) false positive warnings
465
466
467 == [7.6.14] (not released yet) ==
468
469 * Add support of OpenBSD/aarch64
470 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
471 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
472 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
473 * Eliminate 'possible loss of data' BCC and MS VC warnings
474 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
475 * Eliminate 'unused function GC_add_map_entry' compiler warning
476 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
477 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
478 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
479 * Fix 'ulong undefined' compilation error on AIX
480 * Fix MPROTECT_VDB definition for single-threaded GC builds
481 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
482 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
483 * Fix configure message about 'AIX gcc optimization fix'
484 * Fix cordtest build in SMakefile.amiga
485 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
486 * Fix gc_allocator.h compilation by Clang
487 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
488 * Fix printf format specifier in simple_example.html
489 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
490 * Fix test_cpp failure caused by arbitrary link order (Win32)
491 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
492 * Fix various typos mostly in documentation files
493 * Fix word size, data start and alignment for OpenBSD/mips64(el)
494 * Prevent GetThreadContext failure (Windows)
495 * Prevent WARN of incompatible incremental GC if default or manual VDB
496 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
497 * Refactoring of WoW64 workaround (Win32)
498 * Remove a misleading comment about Solaris in gc.h
499 * Workaround 'expression is only useful for its side effects' WCC warning
500 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
501
502
503 == [7.6.12] 2019-03-01 ==
504
505 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
506 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
507 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
508 * Fix 'unexpected mark stack overflow' abort in push_all_stack
509 * Fix 'wrong __data_start/_end pair' error on Android
510 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
511 * Fix GetThreadContext stale register values use if WoW64 (Win32)
512 * Fix executable memory allocation in GC_unix_get_mem
513 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
514 * Fix thread_info() count argument value (OS X)
515 * Update NO_EXECUTE_PERMISSION documentation
516
517
518 == [7.6.10] 2018-12-13 ==
519
520 * Add paths to filenames mentioned in the copyright section in README
521 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
522 * Eliminate 'casting signed to bigger unsigned int' CSA warning
523 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
524 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
525 * Fix 'too wide non-owner permissions are set for resource' code defect
526 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
527 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
528 * Fix GC_register_disclaim_proc for leak-finding mode
529 * Fix a deadlock in write_fault_handler if AO_or is emulated
530 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
531 * Fix concurrent bitmap update in GC_dirty
532 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
533 * Fix hbp overflow in GC_install_counts
534 * Fix linkage with a system libatomic_ops shared library
535 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
536 * Fix marking of finalizer closure object
537 * Fix marks and hb_n_marks consistency when disclaim returns true
538 * Fix memory allocation on GCF (Linux/x64)
539 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
540 * Fix start_world not resuming all threads on Darwin
541 * Fix test_cpp assertion violation in find-leak mode
542 * Fix tests linkage with internal atomic_ops.o
543 * Fix unneeded end_stubborn_change in disclaim_test
544 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
545 * New macro to suppress printing of leaked objects
546 * Prevent double inclusion of javaxfc.h and private/specific.h
547 * Reduce scope of local variables in GC_remove_all_threads_but_me
548 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
549 * Refine documentation in gc_disclaim.h
550 * Test marking of finalizer closure object in disclaim_test
551 * Update documentation about arm64 ABI in gcconfig.h
552 * Use AO_or in async_set_pht_entry_from_index if available
553 * Use include gc.h with the angle brackets in the man page synopsis
554
555
556 == [7.6.8] 2018-08-12 ==
557
558 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
559 * Add NetBSD/aarch64 and initial RISC-V support
560 * Adjust formatting of configure help messages and config.h comments
561 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
562 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
563 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
564 * Do not call GC_dirty_inner unless GC_incremental
565 * Do not use NULL in gc_inline.h
566 * Eliminate 'cast between incompatible function types' compiler warning
567 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
568 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
569 * Eliminate 'declaration of var hides global declaration' compiler warning
570 * Eliminate 'language extension used' Clang warning in gc.h
571 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
572 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
573 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
574 * Eliminate 'switch statement contains no case label' compiler warning
575 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
576 * Eliminate duplicate clear_mark_bit call when removing disappearing link
577 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
578 * Fix 'collecting from unknown thread' abort in leak-finding mode
579 * Fix 'pointer arithmetic with NULL' code defect in print_callers
580 * Fix Borland version in documentation to match that in BCC_MAKEFILE
581 * Fix comment about inv_sz computation in setup_header
582 * Fix comments style in configure.ac and Makefile.am
583 * Fix compilation by digimars.mak (DMC)
584 * Fix compilation by WCC makefile
585 * Fix compilation of darwin_stop_world for iOS 8+
586 * Fix cords for MANUAL_VDB
587 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
588 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
589 * Fix gctest in leak-finding mode
590 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
591 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
592 * Fix mark stack overflow checking in push_selected
593 * Fix missing GC_dirty calls for GC-allocated objects used internally
594 * Fix missing GC_dirty invocation from debug_end_stubborn_change
595 * Fix MSWIN32 macro redefinition (WCC)
596 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
597 * Fix new and delete operators definition for DigitalMars compiler
598 * Fix NT_MAKEFILE for VS 2017
599 * Fix potential null dereference in GC_CONS
600 * Fix register_dynamic_libraries on Windows 10
601 * Fix result computation in n_set_marks
602 * Fix return type in GC_set_warn_proc API documentation
603 * Fix tests for GC compiled with MANUAL_VDB
604 * Fix the build for Emscripten
605 * Fix typo in comment for CORD_ec_flush_buf prototype
606 * Fix typos in ChangeLog and generic_malloc
607 * Fix UNTESTED for multi-threaded API functions in gctest
608 * Fix VirtualQuery call in case of malloc failure (Win32)
609 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
610 * Keep pointer to the start of previous entry in remove_specific_after_fork
611 * Move de_win compiled resource files to cord/tests
612 * Never return null by C++ GC allocators and gc_cpp operator new
613 * Perform thread_suspend in loop as it may be interrupted (Darwin)
614 * Really abort if failed to read /proc for library registration (Linux)
615 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
616 * Remove duplicate local variable in reclaim_block
617 * Remove information how to send bugs from README.cords file
618 * Remove libatomic_ops license information
619 * Remove unused USE_GENERIC macro definition and description
620 * Suppress 'functions containing switch are not expanded inline' bcc warning
621 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
622 * Turn on incremental collection in gctest also if MANUAL_VDB
623 * Update copyright information in alloc.c, gc.c/h and the documentation
624 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
625 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
626 * Workaround 'class C does not have a copy constructor' cppcheck warning
627 * Workaround 'function nested_sp is never used' cppcheck style warning
628 * Workaround 'opposite expression on both sides of &' cppcheck style warning
629 * Workaround 'template-id not supported in this context' compiler error (WCC)
630
631
632 == [7.6.6] 2018-04-20 ==
633
634 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
635 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
636 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
637 * Explicitly unblock GC signals on GC initialization
638 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
639 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
640 * Fix arguments delimiter in pcr_interface.c (PCR)
641 * Fix assertion violation in DllMain of win32_threads
642 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
643 * Fix data race during apply_to_each_object(reset_back_edge)
644 * Fix dbg_mlc.c/o file name in documentation
645 * Fix gctest with musl libc on s390x
646 * Fix include gc_gcj.h in thread_local_alloc.c
647 * Fix man section number (3)
648 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
649 * Fix missing new-line in ABORT_ARG<n> definition
650 * Fix missing SIGBUS handler setup for kFreeBSD
651 * Fix null dereference in print_callers on backtrace_symbols failure
652 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
653 * Fix the collector hang when it is configured with --enable-gc-debug
654 * Fix thread_suspend fail for threads registered from key destructor (OS X)
655 * Fix type of local variables receiving result of PHT_HASH
656 * Fix typo in AIX macro name
657 * Fix typo in comment in specific.h
658 * Fix unbounded heap growth in case of intensive disappearing links usage
659 * Remove API symbols renaming in WCC_MAKEFILE
660 * Support Haiku/amd64 and Haiku/x86 hosts
661 * Support threads for DragonFly in configure
662 * Workaround 'address of auto-variable returned' cppcheck error
663 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
664
665
666 == [7.6.4] 2018-01-26 ==
667
668 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
669 * Change compiler invocation example in gc.man to use dynamic libgc
670 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
671 * Do not declare dl_iterate_phdr as weak for DragonFly
672 * Fix 'cords' parallel build in Makefile.direct
673 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
674 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
675 * Fix GC allocation mutex in child after a fork
676 * Fix global operator delete definition for C++14 in gc_cpp
677 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
678 * Fix libgc version which was changed in linkage breaking way
679 * Fix missing EOLn output in threadlibs tool
680 * Fix threadlibs tool to output '-lpthread' for DragonFly
681 * Prevent DATASTART redefinition for NaCl
682 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
683
684
685 == [7.6.2] 2017-12-23 ==
686
687 * Add assertion that no hb_n_marks underflow occurs
688 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
689 * Add minimal testing of GC_set_bit (gctest)
690 * Add more cases to huge_test to cover sizes close to word-type maximum
691 * Add testing of new[]/delete[] (test_cpp)
692 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
693 * Adjust code indentation of calloc_explicitly_typed
694 * Align local_mark_stack in help_marker explicitly
695 * Allow custom TRACE_ENTRIES value
696 * Allow gctest and thread_leak_test with zero NTHREADS
697 * Avoid data race in finalized_count (gctest)
698 * Code refactoring of divide-by-HBLKSIZE occurrences
699 * Code refactoring of huge_test
700 * Code refactoring of tests/subthread_create regarding AO add primitive
701 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
702 * Delete preprocessor output on make clean (Makefile.direct)
703 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
704 * Do not disable parallel mark for WRAP_MARK_SOME
705 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
706 * Do not install documentation if configure --disable-docs (new option)
707 * Do not use tkill (Android)
708 * Document base and size of objects allocated by finalized_malloc
709 * Document configure 'syntax error' issue in README
710 * Eliminate 'address of local variable returned' static analyzer warning
711 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
712 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
713 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
714 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
715 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
716 * Eliminate 'class member var with name also defined in parent' warning
717 * Eliminate 'comparison is always false' static analyzer warning in finalize
718 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
719 * Eliminate 'condition is always true' cppcheck style warning
720 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
721 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
722 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
723 * Eliminate 'function result not used' code defect in GC_mark_local
724 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
725 * Eliminate 'GC_record_fault is never used' cppcheck style warning
726 * Eliminate 'integer shift by a negative amount' code defect in finalize
727 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
728 * Eliminate 'memory leak' code defect for scratch-allocated memory
729 * Eliminate 'memory leak' code defect in remove_specific
730 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
731 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
732 * Eliminate 'possible integer underflow' code defect (cord-de)
733 * Eliminate 'potential overflow' static analyzer warning in test
734 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
735 * Eliminate 'scope of variable can be reduced' cppcheck warnings
736 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
737 * Eliminate 'this statement may fall through' GCC warnings
738 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
739 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
740 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
741 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
742 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
743 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
744 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
745 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
746 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
747 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
748 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
749 * Eliminate 'write to memory that was const-qualified' code analyzer warning
750 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
751 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
752 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
753 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
754 * Eliminate CSA warning of staticroot that can be a local variable (tests)
755 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
756 * Eliminate redundant local variable in register_finalizer
757 * Eliminate TSan (Thread Sanitizer) warnings in gctest
758 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
759 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
760 * Eliminate unsigned fl_builder_count underflow in mark_thread
761 * Enable GC_is_tmp_root for all platforms
762 * Execute more single-threaded GC tests by CMake
763 * Expand tabs to spaces in de_win.rc (tests)
764 * Export GC_dump_finalization/regions()
765 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
766 * Export GC_print_free_list()
767 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
768 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
769 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
770 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
771 * Fix 'syntax error' reported by cppcheck for mach_dep
772 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
773 * Fix 'variable assigned a value that is never used' cppcheck style warnings
774 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
775 * Fix assertion violation about disabled cancel in try_to_collect_inner
776 * Fix atomic_ops build in Makefile.direct for Solaris
777 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
778 * Fix compilation error in get_main_stack_base (Emscripten)
779 * Fix compilation for winpthreads if HANDLE_FORK
780 * Fix compilation if configured with --enable-werror on OS X
781 * Fix cord/de build in Makefile.direct (Linux)
782 * Fix data race in a list referenced by A.aa (gctest)
783 * Fix data race in collectable_count (gctest)
784 * Fix data race in do_local_mark when comparing active_count to helper_count
785 * Fix data race in GC_suspend/resume_thread
786 * Fix data race in last_stop_count access (suspend_handler_inner)
787 * Fix data race in make_descriptor when setting explicit_typing_initialized
788 * Fix data race in mark_thread when updating mark_no
789 * Fix data race when getting object size in explicitly-typed allocators
790 * Fix deadlock in GC_suspend_thread
791 * Fix gctest failure for Darwin if CPPCHECK is defined
792 * Fix lack of barriers to synchronize memory for suspend_handler
793 * Fix marking of disclaim-reachable objects in the incremental mode
794 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
795 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
796 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
797 * Fix page calculation in checksums
798 * Fix parallel build in Makefile.direct
799 * Fix test_cpp and c++ parallel build in Makefile.direct
800 * Fix typo in comment of GC_mark_some
801 * Fix typos in cdescr.html and README.sgi
802 * Make GC_INIT optional for clients even if thread-local allocations enabled
803 * Match uclinux pattern in configure
804 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
805 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
806 * New API function (GC_is_init_called) to check if BDWGC is initialized
807 * New target (check-cpp) in Makefile.direct
808 * Prevent abort in register_data_segments for Symbian and Emscripten
809 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
810 * Print realloc_count value in gctest
811 * Put invariant name in quotes to make mark_state comments clearer
812 * Refine configure messages when checking for compiler option support
813 * Remove extraneous semicolons after AC_MSG_WARN (configure)
814 * Remove page_was_dirty and remove_protection duplicate definitions
815 * Remove unnecessary type casts of printf arguments to unsigned long
816 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
817 * Rename 'test' to 'check' target in Makefile.direct
818 * Replace deprecated rewind to fseek in cordxtra
819 * Report gcc/clang pedantic warnings (configure)
820 * Skip thread suspend/resume API testing for Tru64 (OSF1)
821 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
822 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
823 * Suppress 'tainted string passed to vulnerable operation' false defects
824 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
825 * Test GC initialization from non-main thread on FreeBSD and NetBSD
826 * Test GCJ object creation with length-based descriptor (gctest)
827 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
828 * Update README regarding make cords with Makefile.direct
829 * Update README to use autogen.sh on build from the source repository
830 * Update shared libraries version info to differentiate against v7.4
831 * Use mprotect instead of mmap in GC_unmap() on Cygwin
832 * Use same style of include gc.h in documentation
833 * Workaround '!GC_page_size is always false' cppcheck style warning
834 * Workaround '#error' cppcheck error messages
835 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
836 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
837 * Workaround 'bad address arithmetic' static analysis tool false positive
838 * Workaround 'checking if unsigned value is negative' cppcheck warning
839 * Workaround 'checking unsigned value is negative' code defect in mark_from
840 * Workaround 'comparison of identical expressions' false code defects
841 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
842 * Workaround 'condition is always false' cppcheck warning in get_next_stack
843 * Workaround 'condition is always true' cppcheck style warnings in GC_init
844 * Workaround 'function is never used' cppcheck style warnings
845 * Workaround 'insecure libc pseudo-random number generator used' code defect
846 * Workaround 'int shift by negative amount' false code defect in finalize
847 * Workaround 'local variable size too big' static analyzer warning
848 * Workaround 'memory leak: result' cppcheck false error (POSIX)
849 * Workaround 'null pointer dereference' false positive in push_next_marked
850 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
851 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
852 * Workaround 'obsolete function alloca() called' cppcheck warnings
853 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
854 * Workaround 'pointer used before comparison to null' code defect (pthread)
855 * Workaround 'possible null pointer dereference' cppcheck warnings
856 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
857 * Workaround 'redundant assignment of *result to itself' cppcheck warning
858 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
859 * Workaround 'same expression on both sides of ==' cppcheck style warning
860 * Workaround 'same expression on both sides of OR' cppcheck style warning
861 * Workaround 'struct member is never used' cppcheck style warnings
862 * Workaround 'tainted int used as loop bound' static analysis tool warning
863 * Workaround 'Uninitialized variable' cppcheck errors
864 * Workaround 'unused variable' cppcheck style warnings
865 * Workaround 'va_list used before va_start' cppcheck error in cord
866 * Workaround 'value of macro unknown' cppcheck info messages
867 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
868 * Workaround 'value of SIGBUS unknown' cppcheck info messages
869 * Workaround 'value of WINAPI unknown' cppcheck info messages
870 * Workaround 'variable hides enumerator with same name' cppcheck warnings
871 * Workaround 'variable reassigned before old value used' cppcheck warnings
872 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
873 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
874
875 Also, includes 7.4.6 changes
876
877
878 == [7.6.0] 2016-08-02 ==
879
880 * ABORT_ARGn log details at INFO level (Android)
881 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
882 * Add API function to calculate total memory in use by all GC blocks
883 * Add API function to set/modify GC log file descriptor (Unix)
884 * Add alloc_size attribute to GC_generic_malloc
885 * Add alt-stack registration support
886 * Add assertion for GC_new_kind boolean arguments
887 * Add assertion on lock status to GC_alloc_large and its callers
888 * Add build scripts for VC 9 (Win32/64)
889 * Add build system plumbing for building with -Werror
890 * Add incremental GC support for Darwin/arm64
891 * Add profiling callback events to indicate start/end of reclaim phase
892 * Add support for enumerating the reachable objects in the heap
893 * Add toggle-ref support (following Mono GC API)
894 * Added instructions to README.md for building from git
895 * Adjust code indentation of malloc/calloc/str[n]dup
896 * Allow fork() automatic handling on Android with API level 21+
897 * Allow specific TLS attributes for GC_thread_key
898 * Allow thread local allocations from within pthread TLS destructors
899 * Allow to force GC_dump_regularly set on at compilation
900 * Altera NIOS2 support
901 * Change 'cord' no-argument functions declaration style to ANSI C
902 * Check DATASTART is less than DATAEND even assertions off
903 * Check for execinfo.h by configure
904 * Code refactoring of GC_push_finalizer/thread/typed_structures
905 * Code refactoring regarding 'data start' definition for FreeBSD
906 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
907 * Consistently use int[] type for '_end' symbol (code refactoring)
908 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
909 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
910 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
911 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
912 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
913 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
914 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
915 * Document GC_register_my_thread returned value
916 * Dump the block information in CSV format
917 * Eliminate redundant *flh check for null in GC_allocobj
918 * Enable atomic-uncollectable in operator new in gc_cpp.h
919 * Enable build with musl libc
920 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
921 * Enable huge_test for Win64 (and LLP64 target)
922 * Enable thread-local storage for Android Clang
923 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
924 * Export GC_push_all_eager, GC_push_finalizer_structures
925 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
926 * Fix assertion in GC_mark_from for non-heap regions
927 * Fix compilation for Android clang/arm with bfd linker
928 * Fix integer shift undefined behavior in GC_init_explicit_typing
929 * Fix missing new-line and redundant trailing dot in WARN messages
930 * Fix STACKBOTTOM for Solaris 11/x86
931 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
932 * Fix unchecked fork() result in gctest (Unix, Cygwin)
933 * Fix user-defined signals drop by marker threads
934 * Fix various typos in comments and documentation
935 * FreeBSD/arm support improvement
936 * GC_make_descriptor code refactoring (eliminate two local variables)
937 * GC_malloc[_atomic] global and thread-local generalization with kind
938 * GC_malloc_[atomic_]uncollectable generalization
939 * GC_scratch_alloc code refactoring (and WARN message improvement)
940 * Group all compact fields of GC_arrays to fit in single page
941 * Handle load_segs overflow in register_dynlib_callback gracefully
942 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
943 * Implement event callbacks for profiling (following Mono GC API)
944 * Implement the finalization extension API
945 * Implement thread suspend/resume API (Linux threads only)
946 * Improve documentation for disappearing links in gc.h
947 * Make heap growth more conservative after GC_gcollect_and_unmap call
948 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
949 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
950 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
951 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
952 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
953 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
954 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
955 * Re-implement GC_finalized_malloc using GC_malloc_kind
956 * Refactoring of android_thread_kill/pthread_kill calls
957 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
958 * Refactoring of thread-local *_freelists (use single array of free lists)
959 * Refine description in README how to build from source repository
960 * Refine GC_free_space_divisor comment regarding its initial value
961 * Reformat code of gc_cpp.cc/h
962 * Remove 'opp' local variable in GC_malloc_X
963 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
964 * Remove code commented out by 'ifdef UNDEFINED'
965 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
966 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
967 * Remove redundant casts in GC_generic_or_special_malloc and similar
968 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
969 * Remove unused GC_gcjdebugobjfreelist
970 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
971 * Replace non-API occurrences of GC_word to word (code refactoring)
972 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
973 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
974 * Standalone profiling callback for threads suspend/resume
975 * Support (add machine description for) TILE-Gx and TILEPro targets
976 * Support build for Android 64-bit (arm64, mips64, x86_64)
977 * Support FreeBSD/aarch64, FreeBSD/mips
978 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
979 * Support MinGW build in scripts
980 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
981 * Use magic header on objects to improve disclaim_test
982 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
983 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
984 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
985
986 Also, includes 7.4.4 changes
987
988
989 == [7.4.20] (not released yet) ==
990
991 * Do not hold GC_fault_handler_lock when in Sleep (Windows)
992 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
993 * Eliminate 'unused function GC_add_map_entry' compiler warning
994 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
995 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
996 * Fix configure message about 'AIX gcc optimization fix'
997 * Fix cordtest build in SMakefile.amiga
998 * Prevent GetThreadContext failure (Windows)
999 * Refactoring of WoW64 workaround (Win32)
1000
1001 Also, includes 7.2o changes
1002
1003
1004 == [7.4.18] 2019-03-01 ==
1005
1006 * Fix 'wrong __data_start/_end pair' error on Android
1007 * Fix thread_info() count argument value (OS X)
1008
1009 Also, includes 7.2n changes
1010
1011
1012 == [7.4.16] 2018-12-13 ==
1013
1014 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1015 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1016 * Fix GC_register_disclaim_proc for leak-finding mode
1017 * Fix concurrent bitmap update in GC_dirty
1018 * Fix marking of finalizer closure object
1019 * Fix marks and hb_n_marks consistency when disclaim returns true
1020 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1021 * Refine documentation in gc_disclaim.h
1022
1023 Also, includes 7.2m changes
1024
1025
1026 == [7.4.14] 2018-08-11 ==
1027
1028 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1029 * Do not call GC_dirty_inner unless GC_incremental
1030 * Eliminate 'cast between incompatible function types' compiler warning
1031 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1032 * Eliminate 'language extension used' Clang warning in gc.h
1033 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1034 * Eliminate 'switch statement contains no case label' compiler warning
1035 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1036 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1037 * Fix 'collecting from unknown thread' abort in leak-finding mode
1038 * Fix compilation by digimars.mak (DMC) and by WCC makefile
1039 * Fix cords for MANUAL_VDB
1040 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1041 * Fix gctest in leak-finding mode
1042 * Fix missing GC_dirty calls for GC-allocated objects used internally
1043 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1044 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1045 * Fix typos in ChangeLog and generic_malloc
1046 * Keep pointer to the start of previous entry in remove_specific_after_fork
1047 * New API function (GC_is_init_called) to check if BDWGC is initialized
1048 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1049 * Remove duplicate local variable in reclaim_block
1050 * Remove libatomic_ops license information from README
1051 * Workaround 'dynamic exception specifications deprecated in C++11' warning
1052
1053 Also, includes 7.2l changes
1054
1055
1056 == [7.4.12] 2018-04-19 ==
1057
1058 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1059 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1060 * Fix gctest with musl libc on s390x
1061 * Fix missing new-line in ABORT_ARG<n> definition
1062 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1063 * Fix type of local variables receiving result of PHT_HASH
1064 * Remove API symbols renaming in WCC_MAKEFILE
1065
1066 Also, includes 7.2k changes
1067
1068
1069 == [7.4.10] 2018-01-22 ==
1070
1071 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1072 Also, includes 7.2j changes
1073
1074
1075 == [7.4.8] 2017-12-22 ==
1076
1077 * Eliminate 'this statement may fall through' GCC warnings
1078 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1079 * Fix data race in make_descriptor when setting explicit_typing_initialized
1080 * Fix marking of disclaim-reachable objects in the incremental mode
1081 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1082 Also, includes 7.2i changes
1083
1084
1085 == [7.4.6] 2017-10-26 ==
1086
1087 * Add configure --enable-gcov option (enable code coverage analysis)
1088 * Add configure check whether to define NO_GETCONTEXT
1089 * Adjust GC_memalign comment
1090 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
1091 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
1092 * Avoid busy waiting in mark_thread while GC_parallel is false
1093 * Better document minimum value of size argument for typed allocations
1094 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
1095 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
1096 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
1097 * Do not produce .tar.bz2 distribution file (configure)
1098 * Do not require libatomic_ops for single-threaded builds (configure)
1099 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1100 * Document GWW_VDB in gcdescr.html
1101 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
1102 * Eliminate 'conditional expression is always true' code defect in GC_init
1103 * Eliminate 'FP divide-by-zero' static analyzer warning
1104 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
1105 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
1106 * Eliminate 'ISO C forbids object to function pointer conversion' warning
1107 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
1108 * Eliminate 'null dereference' code defect warning in register_finalizer
1109 * Eliminate 'possible loss of data' compiler warnings (MS VC)
1110 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
1111 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
1112 * Eliminate 'value stored is never read' warning of Clang static analyzer
1113 * Eliminate duplicate log messages in GC_mark_from
1114 * Eliminate most of collisions in GC_threads on Linux/x64
1115 * Ensure GC initialized when atfork_prepare is called by client
1116 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1117 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
1118 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
1119 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
1120 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
1121 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
1122 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
1123 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
1124 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
1125 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
1126 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
1127 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
1128 * Fix (adjust) GC_scratch_alloc actual argument type
1129 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
1130 * Fix finalize.c compilation in 'strict ANSI' mode
1131 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
1132 * Fix gc.h compliance to strict ANSI (pthreads)
1133 * Fix GC_bytes_allocd incrementation in case of allocation failure
1134 * Fix GC_jmp_buf multiple definition
1135 * Fix GC_noop6 definition to avoid its calls to be optimized away
1136 * Fix gctest failure if PARALLEL_MARK (musl)
1137 * Fix gctest thread stack overflow (musl-gcc)
1138 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
1139 * Fix lack of 2 trailing zeros in _MSC_VER numbers
1140 * Fix local variable declarations in disclaim_bench
1141 * Fix missing #error pragma
1142 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
1143 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
1144 * Fix missing new-line and redundant trailing dot in WARN messages
1145 * Fix missing new-line at format strings end in subthread_create test
1146 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
1147 * Fix potential overflow in decrement when computing GC_markers_m1
1148 * Fix printf format specifiers in extra files (cppcheck warnings)
1149 * Fix pthread_start compilation if single-obj-compilation (Linux)
1150 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
1151 * Fix static assertion violation in LONG_MULT for 64-bit targets
1152 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1153 * Fix thread id leaks in subthread_create and threadkey_test
1154 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
1155 * Fix tools/setjmp_t to prevent nested_sp inlining
1156 * Fix typo in CHECK_GCLIB_VERSION name (test)
1157 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
1158 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1159 * Improve detection of internal libatomic_ops (configure)
1160 * Move libraries version info to the beginning of Makefile.am
1161 * Prevent abort in register_data_segments for Symbian
1162 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1163 * Refine Makefile.direct comment about multi-threaded GC build
1164 * Refine README about library source downloading
1165 * Refine should_invoke_finalizers documentation
1166 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
1167 * Remove non-existent configure option in simple_example.html
1168 * Replace C++ style comments to C ones, remove commented out code (extra)
1169 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
1170 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
1171 * Suppress 'tainted string passed to vulnerable operation' false defects
1172 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
1173 * Update bdwgc mailing list online archive link in documentation
1174 * Update shared libraries version info to differentiate against v7.2
1175 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
1176 * Workaround 'index out of bounds' UBSan false warning in push_marked
1177 * Workaround 'mmap() resource handle leak' static analyzer warning
1178 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1179 * Workaround 'resource leak' error reported by cppcheck (tools, test)
1180 Also, includes 7.2h changes
1181
1182
1183 == [7.4.4] 2016-05-25 ==
1184
1185 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
1186 * Also enable the TSX workaround for i386 (Linux)
1187 * Avoid unstructured procfs on Solaris
1188 * Change cord/de main() declaration style from K-R to ANSI C
1189 * Change no-argument functions declaration style to ANSI C (cord)
1190 * Do not include sigcontext.h and asm/sigcontext.h
1191 * Eliminate 'divide by zero' compiler warning in cordtest
1192 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
1193 * Eliminate warnings detected by Cppcheck in cord de[_win]
1194 * Fix 'comparison of non-null parameter is always false' warning (Clang)
1195 * Fix 'CORD_iter5 unused result' code defect in cordxtra
1196 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
1197 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
1198 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
1199 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
1200 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
1201 * Fix 'statement unreachable' compiler warning in GC_mark_from
1202 * Fix 'statement unreachable' compiler warning in memalign
1203 * Fix 'unused label' compiler warning in cord/de
1204 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
1205 * Fix 'variable unused' warning in GC_save_callers
1206 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
1207 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1208 * Fix Cygwin64 build
1209 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
1210 * Fix Makefile.direct for Cygwin
1211 * Fix __alloc_size__ availability detection (Clang)
1212 * Fix abort message in GC_move_long_link
1213 * Fix and code refactoring of lock elision workaround (Linux/x64)
1214 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
1215 * Fix data race in GC_init_explicit_typing
1216 * Fix gc.mak regarding msvc_dbg and test (MSVC)
1217 * Fix missing error handling of pthread_attr_init/getstacksize
1218 * Fix missing error handling of pthreads_mutex_init and cond_wait
1219 * Fix missing numeric casts in cord
1220 * Fix potential left shift overflows in finalize.c (64-bit targets)
1221 * Fix pthreads-win32 name in comments and documentation
1222 * Fix setup_mark_lock missing prototype
1223 * Fix unchecked fcntl() result
1224 * Fix unchecked pointer dereference in check_ints (gctest)
1225 * Fix unchecked pthread_join() result in threadkey_test
1226 * Fix unchecked sigdelset() result in pthread_support
1227 * Fix undefined PTRFREE/NORMAL in gc_inline.h
1228 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
1229 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
1230 * Remove (deprecate) TODO file
1231 * Remove code duplication in GC_realloc
1232 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
1233 * Remove references to missing linux_threads.c from documentation
1234 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
1235 * Support Android API level 21
1236 * Update compiler options in gc.mak (Win32)
1237 * Use mmap instead of sbrk (Hurd)
1238 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
1239 * Workaround 'identical expr on both sides of bitwise op' warning
1240 * Workaround Linux NTPL lock elision bug
1241 * Workaround false warning about unreachable code path
1242 * Workaround invalid '_end' symbol on Android clang 3.5+
1243 Also, includes 7.2g changes
1244
1245
1246 == [7.4.2] 2014-06-03 ==
1247
1248 * Add config option to use STGRTMIN-based signals for thread suspend/resume
1249 * Allow parallel mark to be enabled on powerpc-linux systems
1250 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
1251 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
1252 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
1253 * Fix (enable) Cygwin-64 build
1254 * Fix GC_finalized_malloc failure on disclaim_test
1255 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
1256 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
1257 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
1258 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
1259 * Fix find stackbottom on BlueGene P/Q systems
1260 * Fix machdep .lo files path in configure (SPARC, IA-64)
1261 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
1262 * Fix typos in names in AUTHORS and ChangeLog files
1263 * Remove barrett_diagram file duplicated by tree.html
1264 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
1265 * Restore contribution information for ancient releases in ChangeLog
1266 Also, includes 7.2f changes
1267
1268
1269 == [7.4.0] 2013-11-17 ==
1270
1271 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
1272 * Add AArch64 (64-bit ARM) target support
1273 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
1274 * Add GC_get_prof_stats[_unsafe]() to GC public API
1275 * Add GC_push_all/conditional() to GC public API
1276 * Add assertion on number_of_objs to GC_extend_size_map
1277 * Add assertion to GC_enable() ensuring no counter underflow
1278 * Add assertion to LOCK definition that lock is not already held
1279 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
1280 * Add double-lock assertion to GC_acquire_mark_lock
1281 * Add manual POSIX fork handling support (Android)
1282 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
1283 * Add public GC_set/get_abort_func to replace default GC_on_abort
1284 * Add public GC_start_mark_threads() to allow parallel marker in fork child
1285 * Add public setter and getter for GC_push_other_roots
1286 * Add support of Android logger
1287 * Add tests for GC_register/move/unregister_long_link
1288 * Add thread suspend/resume signals public setters (POSIX threads)
1289 * Added long weakref support
1290 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
1291 * Adjust README.md title and references to doc .html files in it
1292 * Adjust build scripts to enable additional test library in staticrootstest
1293 * Adjust logged messages in start_mark_threads and GC_thr_init
1294 * Adjust printf format specifiers in GC_print_trace
1295 * Allow not to rely on __data_start value (Linux)
1296 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
1297 * Allow to compile GC_inner_start_routine aside from extra/gc.c
1298 * Allow to omit libc atexit() call
1299 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
1300 * Better document GC_warn_proc in gc.h
1301 * Call GC_on_abort (with NULL argument) on exit(1)
1302 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
1303 * Change policy regarding version numbers ("micro" part instead of "alpha")
1304 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
1305 * Check GC_base result in GC_print_all_smashed_proc
1306 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
1307 * Check traceable_allocator.allocate result before dereference in test_cpp
1308 * Code refactoring of GC_x_printf (move shared code to macro)
1309 * Convert readme to markdown
1310 * Default to use libc_stack_end in single-threaded GC on glibc targets
1311 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
1312 * Define functions in darwin_semaphore.h as inline instead of static
1313 * Define old_bus_handler static variable only if used (Unix)
1314 * Detect dladdr() presence by configure
1315 * Disable find-leak GC_gcollect on GC abnormal EXIT
1316 * Do not define _setjmp/_longjmp macros in mach_dep.c
1317 * Do not duplicate android_log_write output to GC log file (Android)
1318 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
1319 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
1320 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
1321 * Elaborate comment on dependencies in autogen.sh
1322 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
1323 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
1324 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
1325 * Eliminate 'unused result' compiler warning in main() of test_cpp
1326 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
1327 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
1328 * Eliminate Clang warning for GC_pthread_exit attribute
1329 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
1330 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
1331 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
1332 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
1333 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
1334 * Eliminate warning and simplify expression in GC_init_explicit_typing
1335 * Enable 'force GC at every GC_malloc' debug-related functionality
1336 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
1337 * Enable prefetch operations by default (GCC 3.0+)
1338 * Enable staticrootstest for the case of GC shared library build
1339 * Enable thread-local allocation support for Clang on Cygwin
1340 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
1341 * Fix ABORT definition for mingw32ce (WinCE)
1342 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
1343 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
1344 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
1345 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
1346 * Fix GC_remove_all_threads_but_me for Android (fork support)
1347 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
1348 * Fix dyn_load.c compilation for Android 4.3
1349 * Fix make disclaim_test to link with new GNU ld linking rules
1350 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
1351 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
1352 * Improve debug-only messages of add/remove_roots and init_linux_data_start
1353 * Improve fork test logging in gctest
1354 * Improve logged messages about heap size and usage
1355 * Improve logging for Android differentiating messages by log level
1356 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
1357 * Improve staticrootstest checks (tests)
1358 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
1359 * Include proper header file in 'tools' for configuration macros
1360 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
1361 * Log error messages to stderr instead of stdout in tests
1362 * Make GC_generic_malloc_ignore_off_page() public
1363 * Make GC_mark_lock_holder variable static
1364 * Make GC_print_trace always thread-safe and remove 'lock' argument
1365 * Mark GC_started_thread_while_stopped() as GC_INNER
1366 * Minimize code duplication in GC_mark_and_push
1367 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
1368 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
1369 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
1370 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
1371 * Port BDWGC to Android/x86
1372 * Postpone the suspend signal in GC_dirty_init only if used to stop world
1373 * Prepend '#' symbol to GC number in logged messages
1374 * Prevent POSIX fork if mprotect_thread is started (Darwin)
1375 * Prevent abort on GC_err/warn_printf write failure
1376 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1377 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
1378 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
1379 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
1380 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
1381 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
1382 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
1383 * Remove DebugBreak on WriteFile failure (Win32)
1384 * Remove GC_BUILD definition from build scripts
1385 * Remove abort on open log failure from GC_write (Win32)
1386 * Remove configure.ac outdated revision number
1387 * Remove nested EXPECT in GC_core_finalized_malloc
1388 * Remove nested always-false ifdef for HPUX and FREEBSD
1389 * Remove redundant GC_err_printf before abort
1390 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
1391 * Rename subthread_create to subthreadcreate_test (Makefile)
1392 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
1393 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
1394 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
1395 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
1396 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
1397 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
1398 * Replace sprintf with defensive snprintf
1399 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
1400 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
1401 * Specify GC_malloc result is unused in some tests
1402 * Specify GC_pthread_join result is unused in threadkey_test
1403 * Specify LT_INIT in configure.ac
1404 * Start of port to QNX
1405 * Support rthreads introduced in OpenBSD 5.2+
1406 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
1407 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
1408 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
1409 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
1410 * Turn on world-stop delay logging at debug level by default for Android
1411 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
1412 * Use GC_log_printf for logging instead of GC_[err_]printf
1413 * Use compiler TLS for Android NDK gcc/arm
1414 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
1415 * Use pthread API to operate thread-local data on Linux if no compiler TLS
1416 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
1417 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
1418 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
1419
1420
1421 == [7.3alpha2] 2012-05-11 ==
1422
1423 * Add 'const' qualifier to pointer argument of some API functions
1424 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
1425 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
1426 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
1427 * Add SHORT_DBG_HDRS macro template to configure
1428 * Add Symbian port to mainline (porting done by Djamel Magri)
1429 * Add TODO file
1430 * Add assertion ensuring proper alignment of 'pushed' GC symbols
1431 * Add assertion in GC_getspecific on qtid
1432 * Add assertion to GC_incremental_protection_needs, refine documentation
1433 * Add assertion to check GC_large_free_bytes by GC_finish_collection
1434 * Add configure option to compile all library .c files into single gc.o
1435 * Add cordtest to make check
1436 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
1437 * Add finalization.html to 'doc' folder
1438 * Add javaxfc.h to the installation set of GC header files (configure)
1439 * Add on-heap-resize event notification to API
1440 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
1441 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
1442 * Allow GC_exclude_static_roots() region start to be unaligned
1443 * Allow Win32 DllMain chaining on the client side
1444 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
1445 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
1446 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
1447 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
1448 * Cast pointers to word (instead of unsigned long) in specific.h
1449 * Changed the order in autogen.sh so ltmain exists in time for automake
1450 * Declare privately and use handy GC_base_C() for constant object pointers
1451 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
1452 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
1453 * Do not compile backgraph.c unless configure '--enable-gc-debug'
1454 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
1455 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
1456 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
1457 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1458 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
1459 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
1460 * Extend thread-related debug messages
1461 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
1462 * Fix DATASTART (and other minor improvements) for NaCl target
1463 * Fix GC_setspecific to prevent garbage collection inside
1464 * Fix compiler warning in cordtest
1465 * Fix minor warnings reported by GCC with '-pedantic' option
1466 * Fix static data roots registration on Android (if GC is shared)
1467 * Implement GC_get_stack_base for Darwin for single-threaded mode
1468 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
1469 * Improve GC_collect_or_expand algorithm for many finalizers registered case
1470 * In tests, print a message in case a test is a no-op
1471 * Instruct configure to hide internal libgc.so symbols if supported by GCC
1472 * Log amount of unmapped memory (if enabled) on marking-for-collection
1473 * Make __data_start a weak symbol to allow loading modules on mips
1474 * Move "cord" library tests to "cord/tests" folder
1475 * Move asm machine-dependent files to "src" folder
1476 * Move build tools sources to "tools" folder
1477 * Move cord_pos.h to public headers folder
1478 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
1479 * Optimize some functions by moving pthread_self calls out of LOCK section
1480 * Place only major per-release changes description to ChangeLog (this file)
1481 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
1482 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
1483 * Remove all auto-generated files from the repo
1484 * Remove binary icon file for de_win
1485 * Remove cordtest from "cord" library
1486 * Remove duplicate MacOS_Test_config.h file
1487 * Remove gc_amiga_redirects.h (included internally) from public headers
1488 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
1489 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
1490 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
1491 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
1492 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
1493 * Replace GC_ms_entry declaration with opaque definition for public API
1494 * Replace long GC_markers global variable with int GC_markers_m1
1495 * Replace pointer relational comparisons with non-pointer ones
1496 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
1497 * Require autoconf 2.61 instead of v2.64
1498 * Simplify autogen.sh (use autoreconf)
1499 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
1500 * Support GC_ATTR_MALLOC for MS VisualStudio
1501 * Tag auxiliary malloc-like API functions with 'malloc' attribute
1502 * Tag deprecated variables in GC API
1503 * Tag must-be-non-null arguments of GC API functions
1504 * Turn on "extra" GCC warnings
1505 * Turn on unused-parameter checking for GCC
1506 * Update AUTHORS file
1507 * Use EXPECT for checking various 'initialized' boolean variables
1508 * Use USE_COMPILER_TLS on Cygwin
1509 * Use pthread_key for thread-local storage on FreeBSD
1510 * Use union of AO_t and word to favor strict-aliasing compiler optimization
1511 Also, includes 7.2 changes
1512
1513
1514 == [7.2o] (not released yet) ==
1515
1516 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1517 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1518 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1519 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
1520 * Fix configure message about 'AIX gcc optimization fix'
1521 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1522 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
1523 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1524 * Fix printf format specifier in simple_example.html
1525 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1526 * Fix various typos mostly in documentation files
1527 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1528 * Prevent WARN of incompatible incremental GC if default or manual VDB
1529 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1530 * Remove a misleading comment about Solaris in gc.h
1531
1532
1533 == [7.2n] 2019-03-01 ==
1534
1535 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1536 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1537 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1538 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1539 * Fix executable memory allocation in GC_unix_get_mem
1540 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1541
1542
1543 == [7.2m] 2018-12-11 ==
1544
1545 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1546 * Fix hbp overflow in GC_install_counts
1547 * Fix start_world not resuming all threads on Darwin
1548 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1549
1550
1551 == [7.2l] 2018-08-10 ==
1552
1553 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1554 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1555 * Fix comment about inv_sz computation in setup_header
1556 * Fix comments style in configure.ac and Makefile.am
1557 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1558 * Fix global operator delete definition for C++14 in gc_cpp
1559 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1560 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1561 * Fix mark stack overflow checking in push_selected
1562 * Fix MSWIN32 macro redefinition (WCC)
1563 * Fix potential null dereference in GC_CONS
1564 * Fix register_dynamic_libraries on Windows 10
1565 * Fix result computation in n_set_marks
1566 * Fix return type in GC_set_warn_proc API documentation
1567 * Fix typo in comment for CORD_ec_flush_buf prototype
1568 * Fix typos in ChangeLog
1569 * Fix VirtualQuery call in case of malloc failure (Win32)
1570 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1571 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1572 * Workaround 'template-id not supported in this context' compiler error (WCC)
1573
1574
1575 == [7.2k] 2018-04-19 ==
1576
1577 * Fix arguments delimiter in pcr_interface.c (PCR)
1578 * Fix assertion violation in DllMain of win32_threads
1579 * Fix data race during apply_to_each_object(reset_back_edge)
1580 * Fix dbg_mlc.c/o file name in documentation
1581 * Fix include gc_gcj.h in thread_local_alloc.c
1582 * Fix man section number (3)
1583 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1584 * Fix missing SIGBUS handler setup for kFreeBSD
1585 * Fix null dereference in print_callers on backtrace_symbols failure
1586 * Fix the collector hang when it is configured with --enable-gc-debug
1587 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1588 * Fix typo in AIX macro name
1589 * Fix typo in comment in specific.h
1590
1591
1592 == [7.2j] 2018-01-21 ==
1593
1594 * Fix GC allocation mutex in child after a fork
1595 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1596 * Fix libgc version which was changed in linkage breaking way
1597 * Fix missing EOLn output in threadlibs tool
1598
1599
1600 == [7.2i] 2017-12-21 ==
1601
1602 * Avoid data race in finalized_count (gctest)
1603 * Fix assertion violation about disabled cancel in try_to_collect_inner
1604 * Fix data race in a list referenced by A.aa (gctest)
1605 * Fix data race in do_local_mark when comparing active_count to helper_count
1606 * Fix data race in GC_init_explicit_typing
1607 * Fix data race in last_stop_count access (suspend_handler_inner)
1608 * Fix data race in mark_thread when updating mark_no
1609 * Fix data race when getting object size in explicitly-typed allocators
1610 * Fix lack of barriers to synchronize memory for suspend_handler
1611 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
1612 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
1613
1614
1615 == [7.2h] 2017-10-12 ==
1616
1617 * Add gctest as a test (CMake)
1618 * Change no-argument functions declaration style to ANSI C (extra files)
1619 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
1620 * Ensure oom_fn callback executed on out-of-memory in calloc
1621 * Fix '~' operator application to unsigned values shorter than word
1622 * Fix 'context local variable might be clobbered by setjmp' compiler warning
1623 * Fix 'doc' files installation folder
1624 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
1625 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
1626 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
1627 * Fix assertion in GC_mark_from for non-heap regions
1628 * Fix assertion in GC_steal_mark_stack for non-heap regions
1629 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
1630 * Fix assertion violation in GC_wait_builder called from start_mark_threads
1631 * Fix assertion violation in mark_local checking GC_mark_stack_top
1632 * Fix assertion violation in return_single_freelist in child process
1633 * Fix bm_huge initialization for 64-bit targets (gctest)
1634 * Fix broken external links in documentation
1635 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
1636 * Fix calloc_explicitly_typed in case of lb*n overflow
1637 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1638 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
1639 * Fix configure --disable-munmap handling
1640 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
1641 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
1642 * Fix double lock in pthread_detach (Cygwin, winpthreads)
1643 * Fix double multiplication of lb by n in calloc_explicitly_typed
1644 * Fix enable_parallel_mark condition in CMake script
1645 * Fix external libatomic_ops pkg-config-based detection
1646 * Fix gc_allocator.h file name in new_gc_alloc.h comment
1647 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
1648 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
1649 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
1650 * Fix GC_incremental declaration/definition type mismatch
1651 * Fix GC_mark_stack_top assertion violation properly in mark_local
1652 * Fix GC_remove_specific invocation from remove_all_threads_but_me
1653 * Fix GC_requested_heapsize increment in GC_init
1654 * Fix GC_setspecific to prevent garbage collection inside
1655 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
1656 * Fix GCJ support in CMake build script
1657 * Fix gctest crash if configure --enable-handle-fork on Darwin
1658 * Fix get_maps on proc maps file asynchronous growth
1659 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
1660 * Fix header filename in gcconfig.h comment
1661 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
1662 * Fix integer shift undefined behavior in GC_init_explicit_typing
1663 * Fix leak_test crash in print_callers if free() is redirected
1664 * Fix Makefile.direct recursive invocation
1665 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
1666 * Fix missing win32_threads.c compilation for Cygwin (CMake)
1667 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
1668 * Fix name typos in GC_FAST_MALLOC_GRANS comment
1669 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
1670 * Fix OSF1 host pattern in CMakeLists.txt
1671 * Fix PCR-Makefile by removing compilation of a missing file
1672 * Fix potential data race in GC_SysVGetDataStart (SPARC)
1673 * Fix potential integer overflow in GC_find_limit_* functions
1674 * Fix printf arguments type in print_callers
1675 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
1676 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
1677 * Fix pthread_join when thread is registered in thread key destructor
1678 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
1679 * Fix removal of dead threads in a child process
1680 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
1681 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
1682 * Fix Solaris/sparc detection in case of strict C compliance is enforced
1683 * Fix STACKBOTTOM for Solaris 11/x86
1684 * Fix storage class of local variable in register_dynamic_libraries (Irix)
1685 * Fix tools/setjmp_t hang (OS X)
1686 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
1687 * Fix undefined HEAP_START in register_dynamic_libraries
1688 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
1689 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
1690 * Fix various typos in comments, documentation and printed messages
1691 * Handle load_segs overflow in register_dynlib_callback gracefully
1692 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1693 * Replace (fix) 'objs' acronym in comments with 'objects' word
1694 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
1695 * Update documentation about bugs reporting and new releases notification
1696 * Update Download information in GC overview document
1697 * Update shared libraries version info (v7.2)
1698 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
1699 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
1700
1701
1702 == [7.2g] 2016-05-23 ==
1703
1704 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
1705 * Fix 'implicit declaration of function' compiler warnings in cord/de
1706 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
1707 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
1708 * Fix GC initialization in cord de_win for Cygwin
1709 * Fix GC_get_stack_base if called before GC_init (Win32)
1710 * Fix OSX issue with pthread_attr_setstacksize failure
1711 * Fix Unicode Win32 API calls in cord de_win
1712 * Fix USE_COMPILER_TLS macro duplicate description in README
1713 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
1714 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
1715 * Fix filename printing in cordtest
1716 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
1717 * Fix missing GC_get_stack_base for Amiga
1718 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
1719 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
1720 * Fix null-pointer dereferences on out-of-memory in cord and tests
1721 * Fix potential multiplication overflow in check_heap_stats (gctest)
1722 * Fix race (and potential deadlock) at marker threads initialization
1723 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
1724 * Fix typo (items numbering) in GC_finalize_all documentation
1725 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
1726 * Fix typos in gc_priv.h, in README for ews4800
1727 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
1728 * Fix various spelling errors
1729 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
1730 * Regenerate configure files using official libtool release (v2.4.2)
1731 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
1732 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
1733 * windows-untested: Fix paths to msvc_dbg.c/h
1734
1735
1736 == [7.2f] 2014-06-03 ==
1737
1738 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
1739 * Fix 'source file in a subdirectory' Automake warnings
1740 * Fix ABORT message in GC_restart_handler
1741 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
1742 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
1743 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
1744 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
1745 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
1746 * Fix PARALLEL_MARK for Windows 7+
1747 * Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
1748 * Fix crash when using GC_malloc_many() as first allocation call
1749 * Fix mark stack excessive growth during parallel mark
1750 * Fix or remove broken URLs in documentation
1751 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
1752 * Fix typo in GC_collect_or_expand comment
1753 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
1754 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
1755 * Update emails/links due to project site and ML transition
1756
1757
1758 == [7.2e] 2013-11-10 ==
1759
1760 * Add weak attribute to avoid __data_start undefined messages (s390x)
1761 * Add weak stubs for pthread_cancel API
1762 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
1763 * Append _test suffix to 'initsecondarythread' binary file names
1764 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1765 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
1766 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
1767 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
1768 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
1769 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
1770 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
1771 * Fix GC_marker_Id elements initialization (WinCE)
1772 * Fix GC_print_trace missing unlock
1773 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
1774 * Fix GC_win32_free_heap compilation error for Cygwin
1775 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
1776 * Fix Win32 GC_write preventing potential infinite recursion at abort
1777 * Fix assertion violation in GC_mark_from prefetch loop
1778 * Fix collection of objects referenced only from GC_mark_stack_X variables
1779 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
1780 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
1781 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
1782 * Fix missing tabs in SMakefile.amiga file
1783 * Fix null-pointer dereference in CORD_substr_closure
1784 * Fix old_segv/bus_act variables initialization for FreeBSD
1785 * Fix potential double fclose in test_extras (cordtest)
1786 * Fix pthread_attr_t resource leak in pthread_create
1787 * Fix race in GC_print_all_errors regarding GC_leaked
1788 * Fix sizeof in GC_push_thread_structures
1789 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
1790 * Fix tests makefile to link with new GNU ld linking rules
1791 * Fix typos in comments and documentation
1792 * Fix unportable '==' test operators in configure
1793 * Fix vsprintf_args cleanup in CORD_vsprintf
1794 * Merge FreeBSD New ports collection for boehm-gc v7.2d
1795 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
1796 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
1797 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
1798
1799
1800 == [7.2d] 2012-08-09 ==
1801
1802 * Fix GC_call_with_stack_base to prevent its tail-call optimization
1803 * Fix all address-of-dummy operations by using GC_approx_sp() instead
1804 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
1805 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
1806 * Fix thread-related tests for pthreads-w32
1807 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
1808
1809
1810 == [7.2c] 2012-06-11 ==
1811
1812 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
1813 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
1814 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
1815 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
1816 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
1817
1818
1819 == [7.2b] 2012-05-23 ==
1820
1821 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
1822
1823
1824 == [7.2] 2012-05-11 ==
1825
1826 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
1827 * Add GC_WIN32_PTHREADS target in configure
1828 * Add GC_is_disabled new function to GC API
1829 * Add info that getcontext() resets FPE mask no longer on Linux/x86_64
1830 * Add public GC_set_handle_fork to control forked child handling support
1831 * Add realloc_test.c test
1832 * Add support for Hexagon target
1833 * Add thread-safe GC_get_heap_usage_safe to GC API
1834 * Change GC_check_fl_marks prototype and implementation
1835 * Check pthread_create/join result in test
1836 * Define GC_DLL (in configure) if building only dynamic libraries
1837 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
1838 * Disable incremental mode on Darwin if fork handling requested
1839 * Enable parallel marker in configure for Solaris
1840 * Fix "comparison of signed and unsigned values" compiler warnings
1841 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
1842 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
1843 * Fix GC_READ_ENV_FILE code for Cygwin
1844 * Fix GC_add_roots_inner for Mac OS X (align segment start)
1845 * Fix GC_check_fl_marks regarding concurrent access
1846 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
1847 * Fix GC_find_limit_with_bound to always reset fault handler on return
1848 * Fix GC_init static assertion for clang/x64 (Darwin)
1849 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
1850 * Fix GC_push_all/selected boundaries check
1851 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
1852 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
1853 * Fix GC_restart_handler to preserve errno if needed
1854 * Fix GC_root_size update in GC_add_roots_inner (Win32)
1855 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
1856 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
1857 * Fix calloc, GC_generic_malloc to check for allocation size overflows
1858 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
1859 * Fix configure --enable-cplusplus make install
1860 * Fix configure to disable GCC aliasing optimization unless forced to
1861 * Fix duplicate definitions in gcconfig.h for NetBSD
1862 * Fix fork() support on Cygwin and Darwin targets
1863 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
1864 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
1865 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
1866 * Fix gcconfig.h to handle mips64-linux target
1867 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
1868 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
1869 * Fix tests to check GC_malloc result for NULL (out-of-memory)
1870 * Fix thread model in configure for MinGW ("win32" instead of "posix")
1871 * Fix various warnings reported by LINT-like tools
1872 * Fix visibility of some GC internal symbols used by GNU GCJ currently
1873 * Port some thread tests to Win32
1874 * Refine API GC setters and getter comments regarding locking
1875 * Refine GC_stackbottom description in gc.h
1876 * Remove duplicate calls in GC_register_dynamic_libraries
1877 * Remove locking in API GC_get_bytes_since_gc and friends
1878 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
1879 * Remove some local variables that are unused
1880 * Support multi-threading for RTEMS target
1881 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
1882 * Use pkg-config to pick up libatomic_ops, etc
1883 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
1884
1885
1886 == [7.2alpha6] 2011-06-14 ==
1887
1888 * configure_atomic_ops.sh: Remove.
1889 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
1890 * Makefile.am (EXTRA_DIST): Add autogen.sh.
1891
1892 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
1893 filename passed.
1894 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
1895 extension.
1896 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
1897 * NT_MAKEFILE (.cpp.obj): Likewise.
1898
1899 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
1900 GC_traverse_back_graph): Move prototype to gc_priv.h.
1901 * checksums.c (GC_page_was_ever_dirty): Likewise.
1902 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
1903 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
1904 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
1905 GC_get_next_stack): Likewise.
1906 * finalize.c (GC_reset_finalizer_nested,
1907 GC_check_finalizer_nested): Likewise.
1908 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
1909 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
1910 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
1911 * misc.c (GC_register_main_static_data, GC_init_win32,
1912 GC_setpagesize, GC_init_linux_data_start,
1913 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
1914 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
1915 GC_bl_init_no_interiors): Likewise.
1916 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
1917 Likewise.
1918 * reclaim.c (GC_check_leaked): Likewise.
1919 * win32_threads.c (GC_gww_dirty_init): Likewise.
1920 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
1921 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
1922 * pthread_support.c (GC_FindTopOfStack): Likewise.
1923 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
1924 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
1925 * mark_rts.c (GC_roots_present): Change return type to void
1926 pointer (to match the prototype); return NULL instead of FALSE.
1927 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
1928 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
1929 * os_dep.c (GC_write_fault_handler): Make STATIC.
1930 * os_dep.c (GC_set_write_fault_handler): New function (only if
1931 GC_WIN32_THREADS).
1932 * pthread_start.c (GC_start_rtn_prepare_thread,
1933 GC_thread_exit_proc): Move prototype to pthread_support.h.
1934 * pthread_support.c (GC_nacl_initialize_gc_thread,
1935 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
1936 Likewise.
1937 * pthread_support.c (GC_stop_init): Move prototype to
1938 pthread_stop_world.h.
1939 * win32_threads.c (GC_write_fault_handler): Remove prototype.
1940 * win32_threads.c (GC_register_my_thread_inner): Call
1941 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
1942 (only if MPROTECT_VDB).
1943 * doc/README.win32: Add information about DMC.
1944 * include/private/gc_priv.h (GC_set_write_fault_handler): New
1945 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
1946
1947 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
1948
1949 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
1950 instead of FINISHED macro.
1951 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
1952 Win32 (same as for USE_MMAP).
1953
1954 * tests/test.c (check_heap_stats): Adjust printf format specifier
1955 for max_heap_sz; cast max_heap_sz accordingly.
1956
1957 * doc/README.solaris2: Add note.
1958
1959 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
1960 Solaris/x86 2.10+.
1961
1962 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
1963 defined; explicitly define for some targets.
1964
1965 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
1966 * stubborn.c (GC_dirty): Likewise.
1967 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
1968 PROC_VDB): Undefine if MANUAL_VDB.
1969 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
1970 MANUAL_VDB.
1971 * os_dep.c (async_set_pht_entry_from_index): Define for
1972 MANUAL_VDB.
1973 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
1974 success; if ioctl() failed then just print warning instead of
1975 aborting.
1976
1977 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
1978 for line number printing.
1979
1980 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
1981 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
1982 and "np" local variables to npages and pagesize, respectively;
1983 remove "current_addr" local variable.
1984
1985 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
1986 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
1987 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
1988 GC_get_main_stack_base implementation is defined.
1989 * os_dep.c (GC_get_main_stack_base): Define that based on
1990 GC_get_stack_base() in a single place (only if
1991 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
1992 result.
1993
1994 * mark.c (GC_push_selected): Remove "push_fn" argument (use
1995 GC_push_all directly); update the documentation.
1996 * mark.c (GC_push_conditional): Simplify the code (for better
1997 readability).
1998
1999 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
2000 boolean local variables.
2001 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
2002 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
2003 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
2004 place.
2005 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
2006 PHT_HASH(h) only once (store result to a local variable).
2007
2008 * doc/README.solaris2: Update.
2009
2010 * include/private/gcconfig.h (end, InitStackBottom): Declare
2011 extern variable for RTEMS.
2012 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
2013 Update (for RTEMS).
2014 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
2015 name (for RTEMS).
2016 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
2017 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
2018
2019 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
2020 single-threaded environment.
2021
2022 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
2023 * tests/test.c (NUMBER_ROUND_UP): New macro.
2024 * tests/test.c (check_heap_stats): Round up total expected heap
2025 size to the nearest 4 MiB bound.
2026 * tests/test.c (check_heap_stats): Print the current and expected
2027 heap sizes in case of failure.
2028
2029 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
2030 only if GC_print_stats; print errors using GC_err_printf.
2031 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
2032 a single one.
2033
2034 * pthread_support.c (pthread_join): Add assertion (check thread is
2035 finished).
2036 * pthread_support.c (GC_register_my_thread): Don't detach the
2037 thread if invoked from the thread destructor.
2038 * win32_threads.c (GC_register_my_thread): Likewise.
2039 * win32_threads.c (GC_unregister_my_thread): Don't delete the
2040 thread (just set FINISHED) if the thread is not detached (only if
2041 GC_PTHREADS); add assertion (check the thread is not finished).
2042 * tests/threadkey_test.c (main): Join some created threads.
2043
2044 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
2045 variable to "t".
2046 * win32_threads.c (GC_delete_gc_thread): Likewise.
2047 * pthread_support.c (pthread_join, pthread_detach,
2048 pthread_cancel): Rename "thread_gc_id" local variable to "t".
2049 * win32_threads.c (GC_pthread_detach): Likewise.
2050 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
2051 variable.
2052 * win32_threads.c (GC_pthread_join): Rename "joinee" local
2053 variable to "t".
2054
2055 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
2056 DEBUG_THREADS.
2057 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
2058 if GC_EXPLICIT_SIGNALS_UNBLOCK).
2059 * pthread_support.c (GC_unblock_gc_signals): New prototype.
2060 * pthread_support.c (GC_register_my_thread_inner,
2061 GC_register_my_thread): Call GC_unblock_gc_signals (only if
2062 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
2063 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
2064 macro.
2065
2066 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
2067 "sig" local variables; rename my_thread local variable to "self".
2068
2069 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
2070 more than 30 in parallel by default).
2071
2072 * tests/threadkey_test.c (key_once, main): Work around for Solaris
2073 PTHREAD_ONCE_INIT.
2074 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
2075
2076 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
2077 variable.
2078 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
2079 GC_remove_specific invocation; add a comment.
2080 * include/private/thread_local_alloc.h (GC_remove_specific):
2081 Revert back.
2082 * specific.c (slow_getspecific): Cast qtid to AO_t.
2083 * include/private/specific.h (key_create, setspecific,
2084 remove_specific): Remove "extern" keyword.
2085 * include/private/specific.h (getspecific): Change type of "qtid"
2086 local variable to unsigned long.
2087
2088 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
2089 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
2090 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
2091 Remove redundant test of the macro.
2092
2093 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
2094 * os_dep.c (GC_set_and_save_fault_handler): Recognize
2095 SIGACTION_FLAGS_NODEFER_HACK macro.
2096 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
2097 macro.
2098 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
2099 code.
2100 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
2101 sys/siginfo.h on Linux.
2102 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
2103 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
2104 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
2105 macro recognized (for HP/UX).
2106
2107 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
2108 GWW_VDB).
2109 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
2110 resetting (for PROC_VDB).
2111
2112 * tests/threadkey_test.c: New file.
2113 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
2114 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
2115 New variable.
2116
2117 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
2118 GC_remove_specific.
2119 * include/private/thread_local_alloc.h (GC_remove_specific):
2120 Remove (since it is empty for all targets).
2121 * pthread_support.c (GC_record_stack_base): New inline function.
2122 * win32_threads.c (GC_record_stack_base): Likewise.
2123 * pthread_support.c (GC_register_my_thread_inner): Invoke
2124 GC_record_stack_base.
2125 * win32_threads.c (GC_register_my_thread_inner): Likewise.
2126 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
2127 then call GC_record_stack_base, clear FINISHED, initialize
2128 thread-local list and return success.
2129 * win32_threads.c (GC_register_my_thread): Likewise.
2130 * include/gc.h (GC_register_my_thread): Update documentation.
2131 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
2132
2133 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
2134 adjacent "#ifdef".
2135 * thread_local_alloc.c (GC_malloc_atomic): Call
2136 GC_core_malloc_atomic (instead of GC_core_malloc).
2137
2138 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
2139 type to GC_thread.
2140 * pthread_start.c (GC_inner_start_routine): Pass the current
2141 thread descriptor to pthread_cleanup_push (same as in
2142 win32_threads.c).
2143 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
2144 variable to "self".
2145 * win32_threads.c (GC_push_all_stacks): Likewise.
2146 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
2147 "my_thread" local variable to "self".
2148 * pthread_support.c (GC_unregister_my_thread_inner): New static
2149 function.
2150 * pthread_support.c (GC_unregister_my_thread,
2151 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
2152 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
2153 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
2154 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
2155 "id" local variable to "thread_id".
2156
2157 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
2158 only once.
2159 * win32_threads.c (GC_pthread_start_inner): Likewise.
2160 * pthread_support.c (GC_unregister_my_thread): Add debug output.
2161 * win32_threads.c (GC_unregister_my_thread): Likewise.
2162 * pthread_support.c (GC_register_my_thread,
2163 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
2164 to "self".
2165
2166 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
2167 unconditionally (do not test GC_I_HIDE_POINTERS); update the
2168 comment.
2169 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
2170 GC_HIDE/REVEAL_POINTER, respectively.
2171 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
2172 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
2173
2174 * include/gc.h (GC_register_my_thread): Refine the comment.
2175
2176 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
2177 parentheses.
2178 * include/gc_typed.h (GC_get_bit, GC_set_bit,
2179 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
2180
2181 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
2182
2183 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
2184 getcontext(2) on m68k because it is not implemented there.
2185
2186 * alloc.c (GC_clear_a_few_frames): Use BZERO().
2187 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
2188 * reclaim.c (GC_start_reclaim): Likewise.
2189 * blacklst.c (total_stack_black_listed): Remove "len" local
2190 variable.
2191 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
2192 statement with "do-while" one.
2193 * dyn_load.c (GC_register_dynamic_libraries,
2194 GC_register_dynlib_callback): Remove redundant parentheses.
2195
2196 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
2197 "unused result" compiler warning for fread().
2198
2199 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
2200 is set to true.
2201
2202 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
2203 return -1 if the object has (or had) debugging info but was
2204 marked deallocated.
2205 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
2206 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
2207 remove "ohdr" local variable.
2208 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
2209 probably been deallocated.
2210 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
2211 in the leak-finding mode if GC_findleak_delay_free.
2212 * dbg_mlc.c (GC_check_leaked): New function (only unless
2213 SHORT_DBG_HDRS).
2214 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
2215 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
2216 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
2217 on 64-bit architectures.
2218 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
2219 parentheses.
2220 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
2221 GC_has_other_debug_info change).
2222 * include/private/gc_priv.h (GC_findleak_delay_free): New global
2223 variable declaration (unless SHORT_DBG_HDRS).
2224 * misc.c (GC_findleak_delay_free): New global variable; recognize
2225 GC_FINDLEAK_DELAY_FREE.
2226 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
2227 variable (unless SHORT_DBG_HDRS).
2228 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
2229 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
2230 if marked as deallocated.
2231
2232 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
2233 comment.
2234 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
2235 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
2236 * dbg_mlc.c (GC_smashed): Refine documentation.
2237 * mark.c (GC_push_selected): Change dirty_fn return type to
2238 GC_bool.
2239 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
2240 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
2241 local  variable.
2242 * reclaim.c (GC_reclaim_block): Pass true constant to
2243 GC_reclaim_small_nonempty_block (instead of report_if_found).
2244 * doc/README.autoconf: Update; fix a typo.
2245 * include/private/gcconfig.h (GC_WORD_C): New macro.
2246
2247 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
2248 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
2249 comment.
2250 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
2251 argument.
2252 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
2253 message to GC_print_smashed_obj.
2254 * dbg_mlc.c (GC_debug_free): Call GC_size once.
2255 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
2256 allocation succeeded; remove unnecessary check for object is
2257 smashed (since this is done in GC_debug_free); remove "clobbered"
2258 local variable.
2259
2260 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
2261 Rename "integer" argument to "linenum"; change the type of the
2262 argument to int.
2263 * gcj_mlc.c (GC_store_debug_info): Likewise.
2264 * dbg_mlc.c (GET_OH_LINENUM): New macro.
2265 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
2266 GET_OH_LINENUM; adjust print format specifier.
2267 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
2268 GC_debug_malloc_atomic_ignore_off_page,
2269 GC_debug_generic_malloc_inner,
2270 GC_debug_generic_malloc_inner_ignore_off_page,
2271 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
2272 GC_debug_malloc_uncollectable,
2273 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
2274 "i".
2275 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
2276
2277 * os_dep.c (GC_linux_stack_base): Rename to
2278 GC_linux_main_stack_base.
2279 * os_dep.c (GC_freebsd_stack_base): Rename to
2280 GC_freebsd_main_stack_base; adjust error message.
2281 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
2282 as an argument for sem_init().
2283 * pthread_support.c (pthread_create): Likewise.
2284 * pthread_support.c (pthread_create): Abort in case sem_init()
2285 fails.
2286 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
2287 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
2288 from main() if it should be done from the primordial thread only.
2289
2290 * alloc.c: Don't include sys/types.h for ArmCC.
2291 * dyn_load.c: Likewise.
2292 * os_dep.c: Likewise.
2293 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
2294 ArmCC.
2295 * mark.c (GC_noop): Define specially for ArmCC.
2296 * include/private/gc_priv.h (GC_noop): Likewise.
2297 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
2298 * misc.c: Don't include unistd.h for ArmCC.
2299 * os_dep.c (pages_executable): Rename to GC_pages_executable;
2300 make STATIC.
2301 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
2302 * ptr_chck.c (GC_is_visible): Explicitly cast
2303 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
2304 a compiler warning).
2305 * include/private/gcconfig.h: Recognize __arm.
2306 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
2307 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
2308 "bytes" argument.
2309
2310 * pthread_support.c (GC_get_nprocs): Don't define for Android.
2311 * pthread_support.c (GC_dummy_thread_local): Don't test
2312 GC_LINUX_THREADS.
2313 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
2314 Define for Android.
2315
2316 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
2317 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
2318 NO_GETCONTEXT.
2319 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
2320 call for Android.
2321
2322 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2323 Define before including windows.h.
2324 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2325 Likewise.
2326 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
2327 NOSERVICE): Likewise.
2328 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
2329 arithmetics; add a comment.
2330
2331 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
2332 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
2333 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
2334 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
2335 "mark_byte" local variable.
2336 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
2337 about that AO_or() is not used by GC unless USE_MARK_BITS
2338 explicitly set.
2339 * include/private/gc_priv.h (OR_WORD): Likewise.
2340 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
2341 add parentheses.
2342 * include/private/gc_priv.h (ONES): Define before use by
2343 MAKE_COOLER.
2344 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
2345 * include/private/gc_priv.h (OR_WORD): Don't define if
2346 USE_MARK_BYTES.
2347 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
2348 definition; simplify expression.
2349
2350 * os_dep.c (GC_get_maps): Always close the file.
2351 * pthread_support.c (GC_get_nprocs): Likewise.
2352 * os_dep.c (READ): Define similarly across the file (without
2353 parameters).
2354 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
2355 and "len" local variables (since read() may return -1).
2356 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
2357 double underscore; add "volatile" for asm.
2358 * include/private/gc_pmark.h (LONG_MULT): Add missing
2359 parentheses.
2360 * include/private/gc_priv.h (OR_WORD): Likewise.
2361 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
2362 and ';' symbol.
2363
2364 * os_dep.c (GC_get_stack_base): Implement for Android (same as
2365 for Linux).
2366 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
2367 failed to open "stat" file (not to issue a warning twice); update
2368 the comment.
2369 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
2370 get the number of CPUs.
2371
2372 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
2373 recent patches regarding this macro as the macro should be set
2374 (to 1) before including any other system header.
2375
2376 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
2377 GC_MAXIMUM_HEAP_SIZE): Update.
2378
2379 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
2380 heap size specifier; return 0 if not a valid one.
2381 * include/gc_cpp.h: Explicitly define inline one-argument delete
2382 operator for Cygwin (as a workaround).
2383 * tests/test_cpp.cc (main): Suppress compiler warnings about
2384 "assigned value is unused".
2385
2386 * misc.c (GC_parse_mem_size_arg): New function.
2387 * misc.c (GC_init): Use GC_parse_mem_size_arg().
2388 * pthread_stop_world.c (tkill): Declare for Android.
2389
2390 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
2391 first (except for NaCl) and then define the macro to 1 if not yet.
2392
2393 * tests/tests.am (TESTS, check_PROGRAMS): Add
2394 'initsecondarythread'.
2395 * tests/tests.am (initsecondarythread_SOURCES,
2396 initsecondarythread_LDADD): New variable.
2397
2398 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
2399 "const" to its string argument.
2400 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
2401 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
2402 smashed or previously deallocated found.
2403 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
2404 one.
2405 * reclaim.c (GC_reclaim_check): Likewise.
2406 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
2407 * os_dep.c (GC_get_stack_base): Don't initialize
2408 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
2409 calling GC_INIT() from a non-primordial thread is possible now).
2410 * reclaim.c (GC_add_leaked): Turn into an inline one.
2411 * reclaim.c (GC_reclaim_small_nonempty_block):
2412 Change report_if_found type from int/word to boolean.
2413 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
2414 * include/private/gc_priv.h (set_mark_bit_from_hdr,
2415 clear_mark_bit_from_hdr): Place closing parenthesis properly.
2416
2417 * os_dep.c (GC_get_main_stack_base): Try to use
2418 pthread_attr_getstack first for Linux if THREADS.
2419 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
2420 alignment.
2421
2422 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
2423 typo.
2424 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
2425 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
2426 case of NULL argument).
2427 * dbg_mlc.c (GC_free): In case of NULL argument, just return
2428 (without any warning printed); eliminate "uncollectable" local
2429 variable.
2430
2431 * configure.ac (THREADDLLIBS): Use alternate thread library on
2432 Solaris 8.
2433 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
2434 Solaris.
2435 * configure.ac: Don't use libdl on mips-sgi-irix6.
2436
2437 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
2438 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
2439 __builtin_unwind_init() for RTEMS; use setjmp() without the
2440 leading underscore (for RTEMS).
2441 * tests/test.c (BIG): Use smaller value for RTEMS.
2442 * tests/test.c (main): Customize for RTEMS.
2443
2444 * configure.host: Remove doubled words in comments.
2445 * os_dep.c: Likewise.
2446 * doc/README: Likewise.
2447 * extra/setjmp_t.c: Likewise.
2448 * tests/huge_test.c: Likewise.
2449 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
2450 K&R-style function definition with the ANSI C one.
2451 * extra/setjmp_t.c (nested_sp): Implement in the same way as
2452 GC_approx_sp.
2453
2454 * dyn_load.c (GC_dyld_sections): Add more sections.
2455 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
2456 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
2457 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
2458 logging; add support for on-demand sections.
2459
2460 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
2461 GC_ASSERTIONS.
2462 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
2463 declare (as external) unless GC_ASSERTIONS.
2464 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
2465 Cygwin; add FIXME.
2466 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
2467 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
2468 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
2469 an expression.
2470 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
2471 (which existed previously as SUSPENDED and still exists in GCJ).
2472 * include/private/pthread_support.h (DISABLED_GC): Change the
2473 value (as it is already used by SUSPENDED_EXT).
2474
2475 * tests/test.c (reverse_test):  Modify count (BIG) for
2476 ppc64-darwin.
2477
2478 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
2479 macro and environment variable; abort if any error has been
2480 printed provided the environment variable (or macro) is set.
2481 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
2482 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
2483
2484 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
2485 for RTEMS.
2486 * include/private/gcconfig.h (RTEMS): Add support for.
2487 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
2488
2489 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
2490 it is used internally in some places).
2491
2492 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
2493 declaration.
2494 * dbg_mlc.c (GC_debug_malloc_replacement,
2495 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
2496 * malloc.c (GC_debug_malloc_replacement): Likewise.
2497 * mallocx.c (GC_debug_realloc_replacement): Likewise.
2498 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
2499 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
2500 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
2501 includes of string.h.
2502 * mallocx.c: Include string.h (for GC_strdup).
2503 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
2504 to dbg_mlc.c.
2505 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
2506 redundant trailing ';'.
2507 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
2508 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
2509 properly.
2510 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
2511 malloc.c, mallocx.c.
2512
2513 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
2514 definition from misc.c.
2515 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
2516 public.
2517 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
2518 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
2519 macro.
2520 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
2521 * reclaim.c (MAX_LEAKED): Likewise.
2522 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
2523 access to the global array.
2524 * reclaim.c (GC_add_leaked): Likewise.
2525 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
2526 (new macro) is defined.
2527 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
2528 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
2529 GC_dump_regularly and GC_print_back_height variables with
2530 FALSE/TRUE.
2531 * reclaim.c (GC_print_all_errors): Refine the comment.
2532
2533 * tests/test.c (reverse_test_inner): Undo one of the previous
2534 patches which shifts "c" and "d" pointers only if
2535 ALL_INTERIOR_POINTERS (since interior pointers are always
2536 recognized in stacks).
2537
2538 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
2539 where GC_log is defined (Unix only).
2540 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
2541 variable and the similar macro; redirect GC_stdout and GC_stderr
2542 to GC_log if "GC_LOG_FILE" environment variable is set unless
2543 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
2544 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
2545 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
2546
2547 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
2548 only).
2549 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
2550 accordingly.
2551 * misc.c (GC_printf): Check GC_quiet before va_start().
2552
2553 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
2554 inside "if (GC_print_stats)" branch.
2555 * alloc.c (GC_collect_or_expand): Likewise.
2556 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2557 * headers.c (GC_scratch_alloc): Likewise.
2558 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
2559 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
2560 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
2561 GC_printf for DEBUG_THREADS output.
2562 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
2563 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
2564 * pthread_start.c (GC_inner_start_routine): Likewise.
2565 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
2566 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
2567 GC_start_world): Likewise.
2568 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
2569 GC_start_rtn_prepare_thread, pthread_create): Likewise.
2570 * checksums.c (GC_update_check_page): Use GC_printf() instead of
2571 GC_err_printf() for error printing.
2572 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
2573 instead of GC_printf for logging purposes.
2574 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
2575 external variable outside from GC_register_dynamic_libraries.
2576 * dyn_load.c (GC_register_dynamic_libraries): Don't use
2577 sys_errlist value if errno equals to sys_nerr.
2578 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
2579 instead of GC_printf for DL_VERBOSE output.
2580 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
2581 GC_init_dyld): Use GC_log_printf instead of GC_printf for
2582 DARWIN_DEBUG output.
2583 * os_dep.c (catch_exception_raise): Use GC_log_printf
2584 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
2585 * reclaim.c (GC_print_free_list): Move "n" increment out of
2586 GC_printf() call.
2587
2588 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
2589 DEBUG_WIN32_THREADS): Remove.
2590 * win32_threads.c (GC_register_my_thread_inner,
2591 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
2592 inside "if (GC_print_stats)" branch.
2593 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
2594 GC_PTHREADS).
2595 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
2596 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
2597 macro.
2598 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
2599 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
2600 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
2601 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
2602 GC_printf for DEBUG_THREADS output.
2603 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
2604 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
2605 GC_pthread_start_inner, GC_thread_exit_proc): Cast
2606 GetCurrentThreadId result to long; don't cast value of pthread_t
2607 type to int; adjust printf format specifiers.
2608 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
2609 information.
2610
2611 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
2612 check_uncollectable_ints, print_int_list, check_marks_int_list,
2613 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
2614 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
2615 test, main): Remove unnecessary casts of GC_printf calls to void.
2616
2617 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
2618 BDWGC) printed message (adjust letters case, terminating dot and
2619 new line symbols).
2620 * alloc.c (GC_check_fl_marks): Likewise.
2621 * backgraph.c (new_back_edges): Likewise.
2622 * checksums.c (GC_check_dirty): Likewise.
2623 * darwin_stop_world.c (GC_push_all_stacks,
2624 GC_suspend_thread_list): Likewise.
2625 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
2626 store_old): Likewise.
2627 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2628 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
2629 GC_push_selected, GC_push_next_marked_dirty): Likewise.
2630 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
2631 * os_dep.c (GC_remap, GC_default_push_other_roots,
2632 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
2633 catch_exception_raise_state, catch_exception_raise_state_identity,
2634 GC_mprotect_thread_notify, GC_mprotect_thread,
2635 catch_exception_raise): Likewise.
2636 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
2637 GC_stop_world, GC_stop_init): Likewise.
2638 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
2639 GC_start_routine): Likewise.
2640 * win32_threads.c (GC_register_my_thread_inner,
2641 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
2642 GC_pthread_start_inner): Likewise.
2643 * alloc.c (GC_expand_hp_inner): Realign the code.
2644 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
2645 Likewise.
2646 * misc.c (GC_init): Likewise.
2647 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
2648 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
2649 * tests/test.c (run_one_test): Likewise.
2650 * misc.c (GC_err_puts): Document.
2651 * misc.c (GC_err_write): Remove.
2652 * os_dep.c (dump_maps): Likewise.
2653 * include/private/gc_priv.h (GC_err_write): Likewise.
2654 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
2655 dump_maps() and GC_err_write().
2656 * os_dep.c (GC_read_dirty): Remove redundant brackets.
2657
2658 * tests/test.c (reverse_test_inner): Test interior pointer
2659 recognition only if ALL_INTERIOR_POINTERS.
2660 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
2661 with GC_get_all_interior_pointers(); simplify the expression.
2662 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
2663 GC_bytes_allocd_before_gc with GC_get_total_bytes().
2664 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
2665
2666 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
2667 warning if the argument is NULL and GC is in leaks detection mode.
2668 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
2669 function definition.
2670 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
2671 * mallocx.c (GC_posix_memalign): Likewise.
2672 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
2673 * mallocx.c: Include errno.h unless WinCE (otherwise include
2674 windows.h for Win32 error constants).
2675 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
2676 windows.h inclusion.
2677 * misc.c (GC_init): Register at-exit callback if GC_find_leak
2678 (even if GC_FIND_LEAK macro is unset).
2679 * pthread_stop_world.c (NACL_STORE_REGS,
2680 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
2681 Use BCOPY() instead of memcpy().
2682 * pthread_support.c (GC_init_real_syms): Likewise.
2683 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
2684 Document new macro.
2685 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
2686 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
2687 New API function prototype.
2688 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
2689 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
2690 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
2691 * include/leak_detector.h (realloc, strdup): Likewise.
2692 * include/gc.h (GC_STRNDUP): New API macro.
2693 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
2694 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
2695 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
2696 prototype (only if GC_REQUIRE_WCSDUP).
2697 * include/gc.h (GC_WCSDUP): New API macro (only if
2698 GC_REQUIRE_WCSDUP).
2699 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
2700 GC_DONT_INCLUDE_STDLIB).
2701 * include/leak_detector.h (malloc, calloc, free, realloc):
2702 Undefine symbol before its redefinition.
2703 * include/leak_detector.h (strndup, memalign, posix_memalign):
2704 Redefine to the corresponding GC function.
2705 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
2706 if GC_REQUIRE_WCSDUP).
2707 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
2708 the macro if already defined.
2709
2710 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
2711 when doing code static analysis (to inform the tool that the
2712 function is a no-return one).
2713 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
2714 of the length of "stat" file; use signed int type for "i",
2715 "buf_offset" and "len" local variables (since read() may
2716 return -1).
2717
2718 * blacklst.c (GC_bl_init_no_interiors): New function (the code
2719 moved from GC_bl_init).
2720 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
2721 GC_all_interior_pointers mode; remove unnecessarily parameter cast
2722 for GC_scratch_alloc call.
2723 * include/private/gc_priv.h (GC_bl_init): Move the function
2724 declaration to misc.c file.
2725 * misc.c (GC_bl_init_no_interiors): Add a prototype.
2726 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
2727 and 1; allow altering GC_set_all_interior_pointers value even
2728 after GC initialization.
2729 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
2730 GC_modws_valid_offsets if GC_all_interior_pointers is off.
2731 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
2732 GC_all_interior_pointers mode.
2733
2734 * alloc.c (GC_finish_collection): Remove redundant brackets;
2735 adjust code indentation.
2736 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
2737 (to improve code readability).
2738 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
2739 conditional expression); initialize "nblocks" just before the loop
2740 beginning.
2741 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
2742 initialized.
2743 * include/private/gc_priv.h (GC_initialize_offsets): Move the
2744 function declaration to misc.c file.
2745 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
2746 static variable since the function is called only once.
2747 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
2748 adjust printf format specifier (and cast the value passed to).
2749
2750 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
2751 documentation.
2752 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
2753 if LARGE_CONFIG is defined.
2754 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
2755
2756 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
2757 "#elif".
2758 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
2759 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
2760 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
2761 overflow even if not LARGE_CONFIG.
2762 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
2763 SMALL_CONFIG.
2764 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
2765 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
2766 GC_FULL_FREQUENCY): Refine the documentation.
2767
2768 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
2769 GC_word).
2770 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
2771 as word.
2772
2773 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
2774 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
2775 LINT-like tool to instruct it that the function is invoked only
2776 with valid parameters (otherwise a SEGV is ok); recognize LINT2
2777 new macro.
2778 * misc.c (GC_abort): Instruct a LINT-like tool that the function
2779 never returns in fact.
2780 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
2781 close the file immediately after read; use STRTOULL() instead of
2782 decoding the address number manually.
2783 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
2784 LINT-like tool.
2785 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
2786 LINT-like tool that the value is restricted to zero and one only
2787 (required since the variable is global and its value is used as a
2788 part of array index expression is some places).
2789
2790 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
2791 NULL.
2792 * dbg_mlc.c (GC_debug_register_finalizer,
2793 GC_debug_register_finalizer_no_order,
2794 GC_debug_register_finalizer_unreachable,
2795 GC_debug_register_finalizer_ignore_self): Handle out of memory
2796 case properly (similar to GC_register_finalizer_inner).
2797 * headers.c (GC_install_header): Handle the case when alloc_hdr()
2798 returns NULL.
2799 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
2800 * pthread_support.c (GC_mark_thread): Place a dummy return
2801 statement (which uses "id" argument) before the actual use of "id"
2802 as an array index (to suppress a warning produced by some static
2803 code analysis tools).
2804 * win32_threads.c (GC_mark_thread): Likewise.
2805 * pthread_support.c (GC_thr_init): Abort (with the appropriate
2806 message) if out of memory.
2807
2808 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
2809 comment.
2810 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
2811 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
2812 EXPECT (the 2nd argument).
2813 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
2814 Likewise.
2815 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
2816 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
2817 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
2818 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
2819 * include/private/specific.h (getspecific): Likewise.
2820 * pthread_support.c (LOCK_STATS): Add a comment.
2821
2822 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2823 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
2824 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
2825 definition to gc_config_macros.
2826
2827 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
2828 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
2829 GC_PTHREAD_EXIT_ATTRIBUTE).
2830 * include/gc_pthread_redirects.h (GC_pthread_cancel,
2831 pthread_cancel): Likewise.
2832 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
2833 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
2834 code.
2835 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
2836 Define as empty for NaCl.
2837 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
2838 defined.
2839
2840 * dyn_load.c (GC_init_dyld): Do not invoke
2841 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
2842 not required to register the main data segment in that case).
2843 * include/gc.h (GC_no_dls): Adjust the comment.
2844
2845 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
2846 GC_NO_DLOPEN.
2847 * gc_dlopen.c: Likewise.
2848 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
2849 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
2850 gc_pthread_redirects.h).
2851 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
2852 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
2853 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
2854 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
2855 pthread_sigmask): Likewise.
2856 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
2857 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
2858 * pthread_support.c (pthread_create, GC_pthread_create_t,
2859 GC_pthread_create): Rename GC_PTHREAD_CONST to
2860 GC_PTHREAD_CREATE_CONST.
2861 * win32_threads.c (GC_pthread_create): Likewise.
2862 * include/gc_pthread_redirects.h: Likewise.
2863 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2864 GC_NO_PTHREAD_SIGMASK): New macro defined.
2865 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
2866 empty for NaCl.
2867 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
2868 not define for Android (as CANCEL_SAFE is not defined).
2869
2870 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
2871 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
2872 definition to gc_config_macros.h file.
2873 * include/gc_config_macros.h: Check the file is included from gc.h
2874 file.
2875 * include/gc_version.h: Likewise.
2876
2877 * gc_dlopen.c: Empty unit for NaCl.
2878 * os_dep.c: Include fcntl.h for NaCl.
2879 * os_dep.c (GC_get_main_stack_base): Ignore
2880 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
2881 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
2882 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
2883 * pthread_start.c (GC_inner_start_routine): Don't invoke
2884 pthread_cleanup_push/pop for NaCl.
2885 * pthread_stop_world.c (GC_nacl_num_gc_threads,
2886 GC_nacl_thread_idx, GC_nacl_park_threads_now,
2887 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
2888 GC_nacl_thread_parked, GC_nacl_thread_used,
2889 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
2890 variable (fo NaCl only).
2891 * pthread_stop_world.c (GC_remove_allowed_signals,
2892 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
2893 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
2894 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
2895 GC_restart_handler): Don't define for NaCl.
2896 * pthread_support.c (GC_get_nprocs): Likewise.
2897 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
2898 * include/private/gcconfig.h (LINUX): Likewise.
2899 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
2900 for NaCl.
2901 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
2902 GC_start_world): Implement for NaCl.
2903 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
2904 local variable for OpenBSD (and NaCl).
2905 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
2906 NaCl.
2907 * pthread_stop_world.c (nacl_pre_syscall_hook,
2908 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
2909 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
2910 function (for NaCl only).
2911 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
2912 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
2913 redirect for NaCl.
2914 * include/gc_pthread_redirects.h (pthread_cancel,
2915 pthread_sigmask): Likewise.
2916 * pthread_support.c (GC_nacl_initialize_gc_thread,
2917 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
2918 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
2919 and shutdown thread for NaCl.
2920 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
2921 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
2922 for NaCl.
2923 * include/gc.h: Don't include features.h for NaCl.
2924 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
2925 * include/gc_pthread_redirects.h (GC_pthread_create): Use
2926 GC_PTHREAD_CONST instead of const.
2927 * win32_threads.c (GC_pthread_create): Likewise.
2928 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
2929 pthread_create): Likewise.
2930 * include/private/gcconfig.h (NACL): Recognize NaCl.
2931 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
2932 * include/private/pthread_stop_world.h (thread_stop_info): Add
2933 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
2934 NaCl only).
2935 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
2936 Declare internal variable (for NaCl only).
2937
2938 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
2939 macro.
2940
2941 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
2942 keywords with double underscore.
2943 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2944 catch_exception_raise_state_identity): Add GC_API_OSCALL to
2945 function definition.
2946 * os_dep.c (catch_exception_raise_state,
2947 catch_exception_raise_state_identity): Move definition to be
2948 before GC_ports.
2949 * os_dep.c (catch_exception_raise): Declare to have the symbol
2950 defined before GC_ports.
2951 * os_dep.c (GC_ports): Store references to catch_exception_raise,
2952 catch_exception_raise_state, catch_exception_raise_state_identity
2953 (to prevent stripping these symbols as dead).
2954 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2955 catch_exception_raise_state_identity): Mark these symbols as
2956 "referenced dynamically" via an assembler directive (unless
2957 NO_DESC_CATCH_EXCEPTION_RAISE).
2958 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
2959 similar to GC_API but as if GC_DLL is always defined).
2960
2961 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
2962 Win32.
2963 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
2964 FreeBSD.
2965 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
2966 SEGV_ACCERR for older FreeBSD releases).
2967
2968 * dyn_load.c (GC_register_map_entries,
2969 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
2970 DATASTART only once if DATASTART_IS_FUNC.
2971 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
2972 Calculate DATAEND only once if DATAEND_IS_FUNC.
2973 * dyn_load.c: Add comment to some endif; realign some code.
2974 * dyn_load.c (GC_init_dyld): Don't use
2975 _dyld_bind_fully_image_containing_address if
2976 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
2977 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
2978 Declare if used by DATASTART/DATAEND, respectively.
2979 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
2980 Define if DATASTART/DATAEND is a function, respectively.
2981 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
2982 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
2983 unistd.h.
2984
2985 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
2986 Reorder to remove redundant ifdef for Win32.
2987 * os_dep.c: Add comment to some endif.
2988 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
2989 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
2990 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
2991 for some reason).
2992 * os_dep.c (GC_get_main_stack_base): Allow
2993 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
2994 assertion for the returned result.
2995 * os_dep.c (GC_get_stack_base): Define for Darwin if
2996 multi-threaded.
2997 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
2998 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
2999 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
3000 refine the documentation.
3001
3002 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
3003 well.
3004 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3005 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
3006 * include/gc.h (GC_INIT): Document.
3007 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
3008 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
3009 define these macros also for ARM).
3010 * tests/test.c (check_heap_stats): Print main thread stack bottom
3011 as well (only if verbose mode is on).
3012
3013 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
3014 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
3015 and X86_64).
3016
3017 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
3018 "volatile" keyword with double underscore.
3019 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
3020 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
3021 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
3022 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
3023 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
3024 for Linux/amd64 (since its GLibc getcontext currently has the bug).
3025
3026 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
3027 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
3028 macro.
3029 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
3030 alter the default value of GC_use_entire_heap.
3031 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
3032 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
3033
3034 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
3035 MPROTECT_VDB undefining.
3036
3037 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
3038 the comment.
3039
3040 * include/private/gc_priv.h (_GC_arrays): Move the conditional
3041 macro definitions (shortcuts for GC_arrays members) into the
3042 structure body.
3043
3044 * darwin_stop_world.c (GC_mach_handler_thread,
3045 GC_use_mach_handler_thread,
3046 GC_darwin_register_mach_handler_thread): Define only if
3047 MPROTECT_VDB.
3048 * darwin_stop_world.c (GC_suspend_thread_list): Use
3049 GC_mach_handler_thread and GC_use_mach_handler_thread only if
3050 MPROTECT_VDB.
3051 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3052 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
3053 * misc.c (GC_init): Fix comment for GWW_VDB.
3054 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
3055 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
3056 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
3057 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
3058 * pthread_support.c (GC_thr_init): Define "dummy" local variable
3059 only unless GC_DARWIN_THREADS.
3060 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
3061 even in the single-threaded mode; define for iPhone/iPad.
3062 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
3063 around "undef".
3064 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
3065 Cygwin.
3066 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
3067 Darwin/arm (instead of HEURISTIC1).
3068
3069 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
3070 (for ECOS and NOSYS).
3071 * os_dep.c (GC_get_main_stack_base): Likewise.
3072 * os_dep.c (GC_get_main_stack_base): Check
3073 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
3074 remove "dummy" variable (use result one instead).
3075 * doc/README.macros (SN_TARGET_PS3): Document.
3076 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
3077 for Android.
3078 * include/private/pthread_support.h: Fix comment for "endif".
3079
3080 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
3081 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
3082 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
3083 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
3084 * os_dep.c (GC_default_push_other_roots,
3085 GC_push_thread_structures): Define for SN_TARGET_PS3.
3086 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
3087 for SN_TARGET_PS3.
3088 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
3089 (Sony PS/3 target).
3090 * include/private/gcconfig.h (THREADS): Define unconditionally if
3091 SN_TARGET_PS3.
3092 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
3093
3094 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
3095 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3096 GC_debug_malloc_atomic_ignore_off_page,
3097 GC_debug_generic_malloc_inner,
3098 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
3099 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
3100 GC_debug_malloc_atomic_uncollectable): Likewise.
3101 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3102 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
3103 comment.
3104 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
3105 * mark_rts.c (GC_roots_present): Likewise.
3106 * doc/README: Likewise.
3107 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
3108 * include/private/gc_priv.h (_GC_arrays): Likewise.
3109
3110 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
3111 just blindly linking to -lpthread, as Android includes pthread
3112 support within libc and does not provide a separate libpthread.
3113 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
3114 entry if l_addr is NULL (Android/bionic only).
3115 * pthread_stop_world.c (android_thread_kill): New internal function
3116 (Android only).
3117 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
3118 android_thread_kill (based on tkill) instead of pthread_kill on
3119 Android (since pthread_kill cannot be used safely on the platform).
3120 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
3121 gettid) for use by android_thread_kill (Android only).
3122 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
3123 structure member (Android only).
3124 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
3125 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
3126
3127 * allchblk.c (GC_freehblk): Print extended error message (done via
3128 GC_printf() before aborting with a short message) only if
3129 GC_print_stats.
3130 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3131 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
3132 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
3133 * pthread_stop_world.c (GC_start_world): Likewise.
3134 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3135 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
3136 GC_dirty_init): Remove redundant print of an error message before
3137 aborting with the same message.
3138 * os_dep.c (GC_register_data_segments): Remove format specifier
3139 from the string passed to GC_err_puts(); use ABORT instead of EXIT
3140 (if invalid executable type).
3141 * os_dep.c (GC_remap): Adjust printf format specifier (for long
3142 type).
3143 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
3144 (for SIGSEGV/BUS) only if GC_print_stats.
3145 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
3146 calls.
3147
3148 * tests/test.c (main): Print the relevant message if GWW_VDB.
3149 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
3150 on x64 if compiled by GCC.
3151
3152 * tests/staticrootstest.c: Include string.h for memset() prototype.
3153 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
3154
3155 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
3156 * configure.ac: Likewise.
3157 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3158 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
3159 GC_DISCOVER_TASK_THREADS, respectively.
3160 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3161 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3162 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
3163 (and remove FIXME).
3164 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
3165 comment; remove FIXME.
3166 * win32_threads.c (GC_NO_DLLMAIN): Rename to
3167 GC_NO_THREADS_DISCOVERY.
3168 * tests/test.c (GC_NO_DLLMAIN): Likewise.
3169 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
3170 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
3171 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
3172 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
3173 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
3174 update the comment.
3175 * win32_threads.c (GC_use_DllMain): Rename to
3176 GC_use_threads_discovery; do not set GC_win32_dll_threads if
3177 GC_DISCOVER_TASK_THREADS.
3178 * win32_threads.c (GC_started_thread_while_stopped,
3179 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
3180 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
3181 which use GC_win32_dll_threads to minimize the possibility of
3182 an "unreachable code" compiler warning when GC_win32_dll_threads
3183 is defined as a macro.
3184 * win32_threads.c (GC_unregister_my_thread): Don't call
3185 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
3186 (since can't happen); use "t" local variable only if not
3187 GC_win32_dll_threads.
3188 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
3189 * include/gc.h (GC_use_DllMain): Rename to
3190 GC_use_threads_discovery but keep old name as a macro definition.
3191 * include/gc.h (GC_use_threads_discovery): Declare also for
3192 Darwin; update the comment.
3193 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
3194 (to test the mode if possible).
3195
3196 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3197 DARWIN_QUERY_TASK_THREADS): New macro recognized.
3198 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
3199 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
3200 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
3201 * darwin_stop_world.c (GC_use_threads_discovery): New function
3202 (for setting GC_query_task_threads value).
3203 * darwin_stop_world.c (GC_mach_handler_thread,
3204 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
3205 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
3206 GC_darwin_register_mach_handler_thread): Define only if not
3207 DARWIN_SUSPEND_GC_THREADS.
3208 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
3209 the code for GC_query_task_threads case from compilation unless
3210 DARWIN_SUSPEND_GC_THREADS.
3211 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
3212 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
3213 * os_dep.c (GC_mprotect_thread): Call
3214 GC_darwin_register_mach_handler_thread only if THREADS and not
3215 DARWIN_SUSPEND_GC_THREADS.
3216 * pthread_support.c (marker_mach_threads): Don't define if
3217 DARWIN_SUSPEND_GC_THREADS.
3218 * pthread_support.c (GC_mark_thread): Don't fill in
3219 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
3220 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
3221 THREADS case.
3222
3223 * darwin_stop_world.c (GC_query_task_threads): Don't define to
3224 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
3225 the variable to false (for now).
3226 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
3227 only if not DARWIN_DONT_PARSE_STACK.
3228 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
3229 approach based on task_threads() only if GC_query_task_threads
3230 else use GC_threads table.
3231
3232 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
3233 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
3234 really clear GC_mach_threads[]).
3235 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3236 (instead of calling GC_stop_init).
3237 * include/private/pthread_support.h (GC_stop_init): Remove proto.
3238 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
3239 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
3240 GC_DARWIN_THREADS.
3241
3242 * darwin_stop_world.c (GC_stack_range_for): New static function
3243 (move the code from GC_push_all_stacks).
3244 * darwin_stop_world.c (GC_push_all_stacks): Call
3245 GC_stack_range_for(); rename kern_return local variable to
3246 kern_result.
3247 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
3248 from mach_port_t to thread_act_t.
3249 * pthread_support.c (GC_is_mach_marker): Likewise.
3250
3251 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
3252 variable initialization (always call current_task()).
3253 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
3254 Don't set thread's stop_info.stack_ptr value for Darwin.
3255 * include/private/darwin_stop_world.h (thread_stop_info): Update
3256 the comment for stack_ptr.
3257
3258 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
3259 variables to "kern_return" and "my_thread" ones, respectively;
3260 call mach_port_deallocate() unconditionally.
3261 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
3262 if DEBUG_THREADS.
3263
3264 * darwin_stop_world.c (GC_mach_thread): Move from
3265 darwin_stop_world.h.
3266 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
3267 * win32_threads.c (GC_start_world): Define "thread_id" local
3268 variable only if GC_ASSERTIONS; decide whether to resume a thread
3269 based on its "suspended" field value; assert that suspended thread
3270 stack_base is non-zero and the thread is not our one.
3271
3272 * darwin_stop_world.c (GC_thread_resume): New inline function
3273 (move code from GC_thread_resume).
3274 * darwin_stop_world.c (GC_start_world): Check result of
3275 task_threads(); call GC_thread_resume().
3276 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
3277 only if not CYGWIN32.
3278 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
3279 if not CYGWIN32.
3280
3281 * darwin_stop_world.c (FindTopOfStack): Change return type to
3282 ptr_t (from long); make GC_INNER; add GC_ prefix.
3283 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
3284 local variable (initialized from the corresponding GC_thread
3285 field unless GC_query_task_threads); add assertion that our
3286 thread is not blocked; prefix FindTopOfStack with GC_ and remove
3287 no longer needed cast to ptr_t of the result; handle thread
3288 blocked case (and remove FIXME); use GC_push_all_stack_sections
3289 unless GC_query_task_threads (and remove FIXME).
3290 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
3291 * pthread_support.c (GC_do_blocking_inner): Call
3292 GC_save_regs_in_stack (if needed) before acquiring the lock.
3293 * win32_threads.c (GC_do_blocking_inner): Likewise.
3294 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
3295 field of GC_thread (Darwin only).
3296 * include/private/pthread_support.h (GC_thread): Add topOfStack
3297 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
3298
3299 * finalize.c (GC_check_finalizer_nested): Change return type to
3300 char pointer (instead of int pointer); use explicit cast for
3301 GC_finalizer_nested assignment.
3302 * pthread_support.c (GC_check_finalizer_nested): Likewise.
3303 * win32_threads.c (GC_check_finalizer_nested): Likewise.
3304 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
3305 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
3306 "pnested" local variable to char pointer.
3307 * pthread_support.c (GC_do_blocking_inner,
3308 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
3309 field assignment.
3310 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
3311 "suspended" field assignment.
3312 * win32_threads.c (GC_Thread_Rep): Use short type for
3313 finalizer_skipped; use char type for finalizer_nested and flags
3314 fields and reorder some fields (to minimize GC_Thread_Rep
3315 structure size).
3316 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3317 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
3318 field (instead of GC_bool).
3319 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
3320 for thread_blocked field (instead of short).
3321
3322 * darwin_stop_world.c (GC_query_task_threads): New variable (or
3323 macro).
3324 * darwin_stop_world.c (GC_push_all_stacks): Use
3325 GC_query_task_threads (to choose between algorithms based on
3326 kernel task_threads and based on GC_threads table); update FIXME;
3327 remove commented out GC_push_one statements.
3328 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
3329 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
3330 stack_ptr field for all platforms.
3331 * pthread_support.c (GC_call_with_gc_active): Initialize
3332 saved_stack_ptr field for all platforms.
3333 * include/private/darwin_stop_world.h (thread_stop_info): Add
3334 stack_ptr field; change type of already_suspended from int to
3335 GC_bool.
3336
3337 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
3338 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
3339 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
3340 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
3341 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
3342 GC_stop_world): Use FALSE and TRUE for already_suspended field and
3343 "changed", "found" variables.
3344 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
3345 PARALLEL_MARK).
3346 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
3347 to GC_bool; change type of "changed", "found" to GC_bool; make
3348 "my_thread" as an argument (instead of acquiring/deallocating it
3349 locally); do not add my_thread, GC_mach_handler_thread and marker
3350 threads to GC_mach_threads table; check for overflow of
3351 GC_mach_threads table; increase GC_mach_threads_count if "found"
3352 is true and info.suspend_count is non-zero.
3353 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3354 Adjust "thread" format specifiers for GC_printf(); search thread
3355 in "old_list" starting from the previous found one.
3356 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
3357 "changed" local variable; remove "result" variable; adjust
3358 GC_printf debugging message.
3359 * darwin_stop_world.c (GC_start_world): Do not check for
3360 my_thread and GC_use_mach_handler_thread (since they are not added
3361 to GC_mach_threads table); call thread_info() only if
3362 DEBUG_THREADS or GC_ASSERTIONS.
3363 * pthread_support.c (marker_mach_threads): New static variable (if
3364 Darwin).
3365 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
3366 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
3367 table (if Darwin).
3368
3369 * alloc.c (GC_parallel): Define only if THREADS.
3370 * misc.c (GC_get_parallel): Likewise.
3371 * include/gc.h (GC_parallel, GC_get_parallel,
3372 GC_get_suspend_signal, GC_allow_register_threads,
3373 GC_register_my_thread, GC_unregister_my_thread): Define only if
3374 GC_THREADS.
3375 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
3376
3377 * configure.ac: Use `AC_C_INLINE'.
3378 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
3379 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
3380
3381 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
3382 FreeBSD).
3383 * dyn_load.c (GC_register_main_static_data): Move the definition
3384 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
3385 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
3386 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
3387 GC_register_main_static_data() result (instead of direct testing
3388 of dl_iterate_phdr (to prevent a compiler warning).
3389 * os_dep.c (CODE_OK): Test si_code also for the value of 2
3390 (FreeBSD case; required for FreeBSD v7+).
3391 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
3392 * include/private/gcconfig.h (DATASTART): Cast etext argument in
3393 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
3394 case).
3395
3396 * include/private/specific.h (quick_thread_id): Define thru
3397 GC_approx_sp(); define as a macro.
3398 * include/private/specific.h (getspecific): Use GC_INLINE instead
3399 of __inline__ (to work around Sun CC which does not recognize
3400 inline keyword surrounded with underscores).
3401
3402 * darwin_stop_world.c (FindTopOfStack): Simplify condition
3403 expressions.
3404 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
3405 of this function (DARWIN_DONT_PARSE_STACK).
3406 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
3407 thread is found (same as in pthread_stop_world.c).
3408 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
3409 scanned threads if verbose (same as in pthread_stop_world.c).
3410
3411 * darwin_stop_world.c (GC_push_all_stacks): Reset
3412 thread_state_count value before every thread_get_state call;
3413 refine the comment for thread_state_count.
3414 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
3415 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
3416 register pushing.
3417 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
3418 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
3419 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
3420 for i386.
3421
3422 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
3423 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
3424 to GC_bool.
3425 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3426 Simplify the expressions involving GC_use_mach_handler_thread.
3427 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
3428 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
3429
3430 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
3431 pthread_sigmask, dlopen): Don't define for Win32 pthreads (and
3432 don't include signal.h and dlfcn.h).
3433
3434 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
3435
3436 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
3437
3438 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
3439 VM_PROT_EXECUTE.
3440
3441 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
3442 pages_executable is on.
3443 * os_dep.c (os2_alloc): Add FIXME (for recursion).
3444 * os_dep.c (UNPROTECT): Abort with a more informative message if
3445 pages_executable is on ("mprotect" case).
3446 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
3447 pages_executable is on (Darwin case).
3448 * pthread_support.c (GC_init_real_syms): Abort with an informative
3449 message if libgc is linked after libpthread.
3450
3451 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
3452 for 64-bit targets.
3453 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
3454 macro.
3455 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
3456 since REAL(pthread_create) is used.
3457 * pthread_support.c (PTHREAD_CREATE): Remove unused.
3458
3459 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
3460 wrapped anymore).
3461 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3462 * os_dep.c (__wrap_read): Likewise.
3463
3464 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
3465 beginning of the file.
3466 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
3467 macro (defined only for Linux and Solaris).
3468 * include/gc_pthread_redirects.h (GC_pthread_cancel,
3469 GC_pthread_exit): Declare new API function (only if
3470 GC_PTHREAD_EXIT_ATTRIBUTE).
3471 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
3472 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
3473 * include/private/pthread_support.h (DISABLED_GC): New macro.
3474 * pthread_support.c (pthread_cancel, pthread_exit): Restore
3475 original definition or declare "real" function (if needed and
3476 GC_PTHREAD_EXIT_ATTRIBUTE).
3477 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
3478 Declare new types if needed.
3479 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
3480 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3481 * pthread_support.c (GC_init_real_syms): Initialize pointers to
3482 the "real" pthread_cancel and pthread_exit (only if
3483 GC_PTHREAD_EXIT_ATTRIBUTE).
3484 * pthread_support.c (GC_unregister_my_thread): Enable collections
3485 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3486 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
3487 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
3488 * pthread_support.c (GC_start_routine): Refine the comment.
3489 * extra/threadlibs.c (main): Adjust --wrap (add "read",
3490 "pthread_exit", "pthread_cancel" but remove "sleep").
3491 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3492
3493 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
3494 macro definition.
3495 * include/gc.h (GC_reachable_here): Likewise.
3496 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
3497 with double '_'.
3498
3499 * pthread_start.c: New file.
3500 * CMakeLists.txt (SRC): Add pthread_start.c.
3501 * Makefile.am (libgc_la_SOURCES): Likewise.
3502 * Makefile.direct (CSRCS): Likewise.
3503 * Makefile.direct (OBJS): Add pthread_start.obj.
3504 * extra/gc.c: Add a comment; include pthread_start.c.
3505 * pthread_support.c (start_info): Move the struct definition down
3506 closer to its usage.
3507 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
3508 GC_INNER.
3509 * pthread_support.c (GC_inner_start_routine): Move to the
3510 definition to pthread_start.c; leave only the prototype; remove
3511 STATIC.
3512 * pthread_support.c (GC_start_rtn_prepare_thread): New function
3513 (contains parts of the original GC_inner_start_routine).
3514
3515 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
3516 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
3517 documentation.
3518 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
3519 New API function declaration.
3520 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
3521 pages_executable).
3522 * os_dep.c (pages_executable): New static variable.
3523 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
3524 GC_get_pages_executable only).
3525 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
3526 Replace OPT_PROT_EXEC with pages_executable.
3527 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
3528 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
3529 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
3530 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
3531 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
3532 API function definition.
3533
3534 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
3535 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
3536 at least).
3537
3538 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
3539 32-bit CPUs (to prevent "Unexpected heap growth" failure).
3540
3541 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
3542 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
3543 pthread_sigmask): Likewise.
3544 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
3545 is added).
3546 * gc_dlopen.c (GC_dlopen): Fix return type.
3547 * pthread_support.c (GC_init_real_syms): Don't define
3548 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
3549 libpthread_name if RTLD_NEXT.
3550
3551 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
3552 * gc_dlopen.c (dlopen): Likewise.
3553 * include/gc.h (GC_enable_incremental): Refine the comment.
3554 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
3555 missing (only for Win32).
3556 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
3557 * win32_threads.c (GC_ExitThread): Likewise.
3558 * include/gc.h (GC_endthreadex): Add a comment.
3559
3560 * include/cord.h: Fix typos.
3561
3562 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
3563 "tests/CMakeLists.txt".
3564 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
3565
3566 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
3567 * include/private/gcconfig.h (AVR32): New macro (also define the
3568 supplementary macros for the target).
3569 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
3570 define for AVR32.
3571
3572 * tests/leak_test.c (main): Explicitly define as returning int
3573 (to prevent a spurious test failure on some Linux/alpha targets).
3574 * tests/thread_leak_test.c (main): Likewise.
3575 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
3576 thread (before GC_INIT) only.
3577 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
3578 accessing GC_find_leak directly.
3579 * tests/thread_leak_test.c (main): Likewise.
3580
3581 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
3582 GC_java_finalization, GC_dont_expand, GC_no_dls,
3583 GC_dont_precollect): Simplify the comment (remove the information
3584 about data races since the value is boolean).
3585
3586 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
3587 Solaris-specific implementation (based on thr_stksegment).
3588 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
3589 variable used by the Solaris-specific GC_get_stack_base().
3590
3591 * pthread_support.c (GC_mark_thread_local_free_lists,
3592 GC_check_tls): Mark (and check) only for live threads (in case of
3593 GC_destroy_thread_local() is called already but GC_delete_thread()
3594 is not yet).
3595 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
3596 Likewise.
3597
3598 * NT_MAKEFILE: Remove the comment about DLL and Win32S.
3599 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3600 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3601 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
3602 properly on VS 2005+).
3603 * NT_MAKEFILE: Update GC log file name in comments.
3604 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3605 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3606 * NT_X64_THREADS_MAKEFILE: Likewise.
3607 * doc/README.win32: Likewise.
3608 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
3609 longer supported by VS).
3610 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3611 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
3612 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3613 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3614 * NT_X64_THREADS_MAKEFILE: Likewise.
3615 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
3616 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
3617 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
3618 default stack size limit).
3619 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
3620 * win32_threads.c (GC_get_next_stack): Always define (since it is
3621 also used for Cygwin now).
3622
3623 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
3624 be just before GC_clear_marks() call.
3625 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
3626
3627 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
3628 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
3629 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
3630 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
3631 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
3632 Define.
3633 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
3634
3635 * tests/staticrootstest.c: New file.
3636 * tests/staticrootslib.c: Likewise.
3637
3638 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
3639 Cygwin as well as other win32 targets.
3640 * dyn_load.c (GC_wnt): Define to constant true.
3641 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
3642 well as other win32 targets.
3643 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
3644 Don't define for Cygwin, as on other win32.
3645 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
3646 Cygwin as for other win32 targets.
3647 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
3648 other win32.
3649 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
3650 other win32.
3651 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
3652 declare on Cygwin as on other win32.
3653 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
3654 !NO_DEBUGGING, as on other win32 targets.
3655 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
3656 Cygwin as for other win32 targets.
3657 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
3658 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
3659 other win32.
3660 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
3661 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
3662 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
3663 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
3664 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
3665 as on other win32 platforms.
3666 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
3667 for dynamic loading targets.
3668 * include/private/gc_priv.h (GC_INNER): Don't try to use
3669 visibility on Cygwin which does not support it.
3670 * include/private/gc_priv.h (struct roots): Don't declare r_next
3671 member on Cygwin as on other windows hosts.
3672 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
3673 likewise.
3674 * include/private/gc_priv.h (struct _GC_arrays): Do declare
3675 _heap_bases[] member and don't declare _root_index likewise.
3676 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
3677 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
3678 likewise.
3679 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
3680 likewise.
3681 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
3682 prototype on Cygwin as other win32 platforms.
3683
3684 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
3685 pthread_attr_getstack() instead of GC_get_stack_base() (and check
3686 returned stackaddr for NULL); output a warning on failure.
3687
3688 * alloc.c (GC_start_call_back): Replace the definition type to
3689 GC_start_callback_proc.
3690 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
3691 setter/getter function.
3692 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
3693 unconditionally (because GC_try_to_collect_inner always does full
3694 GC).
3695 * include/gc_mark.h (GC_start_callback_proc): New type.
3696 * include/gc_mark.h (GC_set_start_callback,
3697 GC_get_start_callback): New API function declaration.
3698
3699 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
3700 * os_dep.c (GC_get_main_stack_base): Recognize
3701 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
3702 and use GC_get_stack_base() in this case.
3703
3704 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
3705 GC_find_limit_with_bound() should be called with the lock held).
3706 * backgraph.c (FOR_EACH_PRED): Fix a typo.
3707
3708 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
3709 DCL_LOCK_STATE.
3710 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
3711 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
3712 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
3713 * mark.c (GC_print_trace): Likewise.
3714 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
3715 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
3716 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
3717 GC_get_finalizer_notifier): Likewise.
3718 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
3719 * pthread_support.c (GC_is_thread_tsd_valid,
3720 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
3721 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
3722 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
3723 pthread_create): Likewise.
3724 * reclaim.c (GC_print_all_errors): Likewise.
3725 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
3726 GC_unregister_my_thread, GC_do_blocking_inner,
3727 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
3728 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
3729 GC_init_parallel): Likewise.
3730
3731 * doc/README.darwin: Update.
3732
3733 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
3734 usable on Mac OS X).
3735 * doc/README.cmake: Update.
3736
3737 * CMakeLists.txt: New file (adding CMake support).
3738 * tests/CMakeLists.txt: Likewise.
3739 * doc/README.cmake: Likewise.
3740
3741 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
3742 macros.
3743 * include/private/gc_priv.h (THREAD_FLD): Recognize
3744 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
3745
3746 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
3747 OpenBSD.
3748 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
3749 OpenBSD.
3750 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
3751 NetBSD and OpenBSD.
3752
3753 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
3754 if THREADS is undefined.
3755 * include/gc.h (GC_malloc_many): Update the comment.
3756
3757 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
3758 (formerly known as Borland) C++ compiler v6.21+.
3759 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
3760 VC++ compilers.
3761
3762 * win32_threads.c (GC_register_my_thread_inner,
3763 GC_pthread_start_inner): Undo the previous commit changes for
3764 the thread flags and DETACHED state (since the state is only
3765 tested in GC_thread_exit_proc).
3766
3767 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
3768 comment.
3769 * pthread_support.c (GC_delete_thread): Allow to delete the main
3770 thread (don't call GC_INTERNAL_FREE for it); update the comment.
3771 * win32_threads.c (GC_delete_thread): Likewise.
3772 * pthread_support.c (GC_unregister_my_thread): Add an assertion
3773 for FINISHED flag is unset.
3774 * tests/test.c (check_heap_stats): Test the main thread
3775 unregistering (only if THREADS).
3776 * win32_threads.c (GC_register_my_thread_inner): Set flags to
3777 DETACHED (only if GC_PTHREADS).
3778 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
3779 GC_wait_for_gc_completion).
3780 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
3781 state if needed; set pthread_id and flags while holding the lock.
3782
3783 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
3784 OpenBSD and Darwin.
3785
3786 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
3787
3788 * test.c (main, WinMain): Consistently don't invoke
3789 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
3790 do invoke it even if parallel marking is enabled.
3791
3792 * tests/test.c (reverse_test): Comment out a check for MSWIN32
3793 (when determining BIG value) assuming outdated win32S.
3794 * tests/test.c (reverse_test): Rename to reverse_test_inner;
3795 change the declaration (to be of GC_fn_type); call itself thru
3796 GC_call_with_gc_active() if the argument is zero.
3797 * tests/test.c (reverse_test): New function added calling
3798 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
3799 GC_call_with_gc_active).
3800
3801 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
3802 Document.
3803 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
3804 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
3805 PLATFORM_ANDROID.
3806 * include/private/gcconfig.h (LINUX): Define also if
3807 PLATFORM_ANDROID (for the windows-based toolkit).
3808 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
3809 define for Android/x86 platform.
3810 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
3811 new macro (undefine DYNAMIC_LOADING in this case).
3812 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
3813 PLATFORM_ANDROID.
3814 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
3815 explicitly defined CANCEL_SAFE.
3816
3817 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
3818 if GC_DISABLE_INCREMENTAL.
3819 * reclaim.c (GC_reclaim_generic): Likewise.
3820 * checksums.c (GC_page_was_ever_dirty): Add prototype.
3821 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
3822 unless PARALLEL_MARK.
3823 * include/private/gc_priv.h (GC_dirty_maintained,
3824 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
3825 declare if GC_DISABLE_INCREMENTAL.
3826 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
3827 declare if SMALL_CONFIG.
3828 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
3829 GC_DISABLE_INCREMENTAL (since nothing to check).
3830 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
3831 GC_DISABLE_INCREMENTAL.
3832 * os_dep.c (GC_dirty_maintained): Likewise.
3833 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
3834 GC_DISABLE_INCREMENTAL.
3835 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
3836 Uncomment; define only if CHECKSUMS.
3837
3838 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
3839 GC_push_all_stack() instead of GC_push_all_stack_frames()).
3840 * include/private/gc_priv.h (GC_push_all_stack_frames,
3841 GC_push_all_register_frames): Rename to
3842 GC_push_all_stack_sections and GC_push_all_register_sections,
3843 respectively.
3844 * mark_rts.c (GC_push_all_stack_frames,
3845 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
3846 GC_push_current_stack): Likewise.
3847 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3848 * win32_threads.c (GC_push_stack_for): Likewise.
3849 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
3850 to "stacksect".
3851 * pthread_support.c (GC_call_with_gc_active): Likewise.
3852 * win32_threads.c (GC_call_with_gc_active): Likewise.
3853 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
3854 Darwin.
3855 * win32_threads.c (GC_Thread_Rep): Update the comment for
3856 traced_stack_sect.
3857
3858 * darwin_stop_world.c (GC_push_all_stacks): Rename
3859 activation_frame to traced_stack_sect.
3860 * include/private/gc_priv.h (GC_push_all_stack_frames,
3861 GC_push_all_register_frames): Likewise.
3862 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3863 * mark_rts.c (GC_push_all_register_frames,
3864 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
3865 GC_push_current_stack): Likewise.
3866 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3867 * pthread_support.c (GC_call_with_gc_active): Likewise.
3868 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
3869 GC_push_stack_for): Likewise.
3870 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
3871 GC_traced_stack_sect_s.
3872 * include/private/gc_priv.h (GC_activation_frame): Rename to
3873 GC_traced_stack_sect.
3874 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
3875 * doc/README.macros (UNICODE): Document.
3876
3877 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
3878 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
3879 declare and use GC_envfile_getenv().
3880 * misc.c (GC_envfile_content, GC_envfile_length): New static
3881 variable (only if GC_READ_ENV_FILE).
3882 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
3883 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
3884 if GC_READ_ENV_FILE).
3885 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
3886 if GC_READ_ENV_FILE.
3887 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
3888 calls to be just before GC_envfile_init() one (since the latter
3889 uses GET_MEM).
3890 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
3891 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
3892 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
3893 from the ABORT message.
3894 * misc.c (GC_init): Likewise.
3895 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
3896 Likewise.
3897 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3898 * pthread_support.c (GC_init_real_syms, start_mark_threads):
3899 Likewise.
3900
3901 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
3902 (since unused for now).
3903
3904 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
3905 GC_register_main_static_data() is defined.
3906 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
3907 (if DYNAMIC_LOADING or PCR or Win32/CE).
3908 * dyn_load.c (GC_register_main_static_data): Define the default
3909 one only if DYNAMIC_LOADING.
3910 * include/private/gc_priv.h (GC_register_dynamic_libraries):
3911 Declare only if used (to prevent compiler warning).
3912
3913 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
3914
3915
3916 == [7.2alpha4] 2009-12-01 ==
3917
3918 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
3919
3920 * include/gc.h (GC_get_suspend_signal): New function declaration.
3921 * misc.c (GC_get_suspend_signal): New API function (only if
3922 THREADS).
3923
3924 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
3925 two if GC_incremental (instead of TRUE_INCREMENTAL).
3926
3927 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
3928
3929 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
3930 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
3931 "word"); add the comment.
3932 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
3933 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
3934
3935 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
3936 const value (for speed).
3937 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
3938 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
3939 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
3940 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
3941 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
3942
3943 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
3944
3945 * backgraph.c: Remove apostrophe char from "#error".
3946
3947 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
3948 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
3949 new macro; implicitly define it if SMALL_CONFIG.
3950 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
3951 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
3952 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
3953 GC_push_conditional): Likewise.
3954 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
3955 GC_push_conditional, GC_block_was_dirty): Likewise.
3956 * misc.c (GC_enable_incremental): Likewise.
3957 * misc.c (GC_init): Likewise.
3958
3959 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
3960 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
3961 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
3962 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
3963 in a comment.
3964 * backgraph.c: Likewise.
3965 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3966 * extra/threadlibs.c (main): Likewise.
3967 * pthread_support.c (pthread_join): Likewise.
3968 * tests/test.c (main): Likewise.
3969
3970 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
3971 a duplicate symbol definition linker error).
3972 * misc.c (GC_clear_stack_inner): Likewise.
3973 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
3974
3975 * include/private/gc_priv.h (GC_write_disabled): New variable
3976 declaration (only if GC_ASSERTIONS and Win32 threads).
3977 * misc.c (GC_write): Add assertion for GC_write_disabled value is
3978 not on (only if THREADS).
3979 * win32_threads.c (GC_write_disabled): New variable (only if
3980 GC_ASSERTIONS and not Cygwin).
3981 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
3982 (while holding GC_write_cs).
3983
3984 * win32_threads.c (GC_please_stop): If DllMain-based thread
3985 registration is not compiled in then define GC_please_stop as
3986 a non-volatile variable for assertion only.
3987 * win32_threads.c (GC_stop_world): Set and clear only if defined.
3988 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
3989 usage (while holding GC_write_cs).
3990 * win32_threads.c (GC_delete_gc_thread): Likewise.
3991 * os_dep.c (GC_remove_protection): Likewise.
3992
3993 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
3994 GC_printf() calls into a single one (for DEBUG_THREADS).
3995
3996 * include/private/gc_priv.h (GC_total_stacksize): New variable
3997 declaration (only if THREADS).
3998 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
3999 * alloc.c (min_bytes_allocd): Calculate stack_size using
4000 GC_stackbottom only in the single-threaded case; otherwise use
4001 GC_total_stacksize; print GC_total_stacksize value if
4002 DEBUG_THREADS.
4003 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
4004 specifier for lo/hi values (instead of "%lx").
4005 * darwin_stop_world.c (GC_push_all_stacks): Use
4006 GC_push_all_stack_frames() instead of GC_push_all_stack().
4007 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
4008 GC_total_stacksize value.
4009 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4010 * win32_threads.c (GC_push_all_stacks): Likewise.
4011 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
4012 stack size; don't check for non-zero value of thread->stack_base.
4013 * win32_threads.c (GC_push_all_stacks): Don't call
4014 GC_push_stack_for() and don't check for "t->id == me" if
4015 thread->stack_base is zero.
4016
4017 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
4018 with "0x".
4019 * os_dep.c (PROTECT): Likewise.
4020 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
4021 int (to match printf type specifier).
4022
4023 * tests/test.c (check_heap_stats): Take into account the unmapped
4024 memory size when checking for "Unexpected heap growth"; remove
4025 FIXME.
4026
4027 * alloc.c: Revert last change.
4028
4029 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
4030 for eCos/NOSYS.
4031 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
4032 longer defined in GCJ).
4033
4034 * os_dep.c (brk): Rename to ecos_gc_brk.
4035
4036 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
4037 stack_size even if THREADS.
4038 * doc/README.macros (DEBUG_THREADS): Document.
4039 * pthread_support.c (DEBUG_THREADS): Remove the commented out
4040 definition.
4041 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
4042 definition.
4043 * win32_threads.c: Include errno.h (except for WinCE).
4044 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
4045 to local variables, and free "arg" parameter before "start"
4046 invocation.
4047 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
4048 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
4049 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
4050 of -1).
4051
4052 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4053 Use GC_INNER for the function definition.
4054 * include/private/darwin_stop_world.h
4055 (GC_darwin_register_mach_handler_thread): Remove the prototype.
4056 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
4057 for the function prototype.
4058 * include/private/gc_priv.h (NDEBUG): Explicitly define if
4059 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
4060 inclusion).
4061
4062 * include/private/gcconfig.h: Move DebugBreak() workaround (for
4063 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
4064
4065 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
4066 GC_freehblk): Use GC_INNER for the function definition.
4067 * alloc.c (GC_never_stop_func, GC_should_collect,
4068 GC_try_to_collect_inner, GC_collect_a_little_inner,
4069 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
4070 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
4071 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
4072 Likewise.
4073 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
4074 GC_promote_black_lists, GC_unpromote_black_lists,
4075 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
4076 GC_is_black_listed): Likewise.
4077 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
4078 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
4079 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
4080 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
4081 GC_store_debug_info, GC_start_debugging,
4082 GC_debug_generic_malloc_inner,
4083 GC_debug_generic_malloc_inner_ignore_off_page,
4084 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
4085 * dyn_load.c (GC_register_dynamic_libraries,
4086 GC_register_main_static_data, GC_init_dyld): Likewise.
4087 * finalize.c (GC_push_finalizer_structures, GC_finalize,
4088 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
4089 Likewise.
4090 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
4091 * headers.c (GC_find_header, GC_header_cache_miss,
4092 GC_scratch_alloc, GC_init_headers, GC_install_header,
4093 GC_install_counts, GC_remove_header, GC_remove_counts,
4094 GC_next_used_block, GC_prev_block): Likewise.
4095 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
4096 * malloc.c (GC_collect_or_expand, GC_alloc_large,
4097 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
4098 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
4099 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
4100 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
4101 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
4102 GC_clear_marks, GC_initiate_gc, GC_mark_some,
4103 GC_mark_stack_empty, GC_invalidate_mark_state,
4104 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
4105 GC_mark_init, GC_push_all, GC_push_conditional,
4106 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
4107 Likewise.
4108 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
4109 GC_exclude_static_roots_inner, GC_push_all_register_frames,
4110 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
4111 GC_push_roots): Likewise.
4112 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
4113 Likewise.
4114 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
4115 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
4116 GC_initialize_offsets): Likewise.
4117 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
4118 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
4119 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
4120 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
4121 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
4122 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
4123 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
4124 GC_page_was_ever_dirty, GC_remove_protection,
4125 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
4126 GC_save_callers, GC_print_callers): Likewise.
4127 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
4128 GC_start_world, GC_stop_init): Likewise.
4129 * pthread_support.c (GC_mark_thread_local_free_lists,
4130 GC_lookup_thread, GC_reset_finalizer_nested,
4131 GC_check_finalizer_nested, GC_segment_is_thread_stack,
4132 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
4133 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
4134 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
4135 GC_wait_marker, GC_notify_all_marker): Likewise.
4136 * reclaim.c (GC_print_all_errors, GC_block_empty,
4137 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
4138 GC_reclaim_all): Likewise.
4139 * thread_local_alloc.c (GC_init_thread_local,
4140 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4141 * win32_threads.c (GC_reset_finalizer_nested,
4142 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
4143 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
4144 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
4145 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
4146 GC_thr_init, GC_init_parallel, GC_lock,
4147 GC_mark_thread_local_free_lists): Likewise.
4148 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
4149 GC_traverse_back_graph): Use GC_INNER for the function prototype.
4150 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4151 Likewise.
4152 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
4153 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
4154 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
4155 GC_get_next_stack): Likewise.
4156 * finalize.c (GC_reset_finalizer_nested,
4157 GC_check_finalizer_nested): Likewise.
4158 * gcj_mlc.c (GC_start_debugging): Likewise.
4159 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
4160 GC_has_other_debug_info, GC_store_debug_info): Likewise.
4161 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
4162 * include/private/gc_locks.h (GC_lock): Likewise.
4163 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
4164 GC_mark_from): Likewise.
4165 * include/private/pthread_support.h (GC_lookup_thread,
4166 GC_stop_init): Likewise.
4167 * include/private/thread_local_alloc.h (GC_init_thread_local,
4168 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4169 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
4170 * mark.c (GC_page_was_ever_dirty): Likewise.
4171 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
4172 * misc.c (GC_register_main_static_data, GC_init_win32,
4173 GC_setpagesize, GC_init_linux_data_start,
4174 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
4175 GC_do_blocking_inner): Likewise.
4176 * os_dep.c (GC_greatest_stack_base_below): Likewise.
4177 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
4178 Likewise.
4179 * include/private/gc_priv.h: Likewise.
4180 * include/private/gc_priv.h (GC_INNER): Update the comment.
4181 * doc/README.macros (GC_DLL): Update.
4182
4183 * alloc.c (GC_collection_in_progress): Move the prototype to
4184 gc_priv.h.
4185 * gc_dlopen.c (GC_collection_in_progress): Likewise.
4186 * pthread_support.c (GC_collection_in_progress): Likewise.
4187 * misc.c (GC_init_parallel): Likewise.
4188 * pthread_support.c (GC_init_parallel): Likewise.
4189 * win32_threads.c (GC_init_parallel): Likewise.
4190 * darwin_stop_world.c (GC_thr_init): Likewise.
4191 * misc.c (GC_thr_init): Likewise.
4192 * pthread_stop_world.c (GC_thr_init): Likewise.
4193 * pthread_support.c (GC_thr_init): Likewise.
4194 * blacklst.c (GC_clear_bl, GC_copy_bl,
4195 GC_number_stack_black_listed): Make STATIC.
4196 * dbg_mlc.c (GC_print_obj, GC_make_closure,
4197 GC_debug_invoke_finalizer): Likewise.
4198 * malloc.c (GC_alloc_large_and_clear): Likewise.
4199 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
4200 GC_push_marked4, GC_push_marked, GC_push_next_marked,
4201 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
4202 Likewise.
4203 * misc.c (GC_clear_stack_inner): Likewise.
4204 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
4205 * darwin_stop_world.c (FindTopOfStack): Make static; define only
4206 if not DARWIN_DONT_PARSE_STACK.
4207 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
4208 * dyn_load.c (GC_repeat_read): Remove unused prototype.
4209 * include/private/gc_pmark.h (GC_find_start): Likewise.
4210 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
4211 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
4212 THREADS).
4213 * dyn_load.c (GC_register_main_static_data): Define only if
4214 DYNAMIC_LOADING.
4215 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
4216 "return" statement.
4217 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
4218 GC_PTHREADS).
4219 * include/gc.h: Fix a typo.
4220 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
4221 the header is public.
4222 * include/gc_inline.h (GC_generic_malloc_many): New public
4223 function declaration.
4224 * mallocx.c (GC_generic_malloc_many): Make public.
4225 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
4226 (if available).
4227 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
4228 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
4229 MPROTECT_VDB.
4230 * os_dep.c: Don't include atomic_ops.h
4231 * win32_threads.c: Likewise.
4232 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
4233 GC_push_marked, GC_number_stack_black_listed,
4234 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
4235 GC_generic_malloc_many, GC_make_closure,
4236 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
4237 Remove the prototype.
4238 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
4239 PROC_VDB).
4240 * include/private/gc_priv.h (GC_push_next_marked_dirty,
4241 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
4242 the prototype to mark.c.
4243 * include/private/gc_priv.h (GC_is_static_root): Declare only if
4244 not THREADS.
4245 * include/private/gc_priv.h (GC_free_inner): Declare only if
4246 THREADS.
4247 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
4248 THREADS and DBG_HDRS_ALL.
4249 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
4250 if PARALLEL_MARK.
4251 * include/private/gc_priv.h (GC_register_main_static_data): Move
4252 the prototype to misc.c.
4253 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
4254 HAVE_PUSH_REGS definition.
4255 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
4256 definition with the ANSI C one.
4257 * mark.c (GC_started_thread_while_stopped): Declared only if not
4258 GNU C.
4259 * win32_threads.c (GC_started_thread_while_stopped): Don't define
4260 if GNU C.
4261 * mark.c (GC_mark_from): Avoid unbalanced brackets in
4262 #if-#else-#endif blocks.
4263 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
4264 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
4265 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
4266 except for PROC_VDB.
4267 * tests/test.c (main): Don't reference GC_print_obj,
4268 GC_make_closure, GC_debug_invoke_finalizer,
4269 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
4270 * thread_local_alloc.c: Don't include "gc_inline.h".
4271 * win32_threads.c (GC_write_fault_handler): Declare only if
4272 MPROTECT_VDB.
4273
4274 * allchblk.c (DEBUG): Remove macro (since unused).
4275 * allchblk.c: Include private/gc_priv.h before other includes and
4276 definitions.
4277 * alloc.c: Likewise.
4278 * gc_dlopen.c: Likewise.
4279 * headers.c: Likewise.
4280 * mallocx.c: Likewise.
4281 * mark_rts.c: Likewise.
4282 * new_hblk.c: Likewise.
4283 * reclaim.c: Likewise.
4284 * mark.c: Include private/gc_pmark.h before other includes.
4285 * misc.c: Likewise.
4286 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
4287 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
4288 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
4289 already defined in gc_config_macros.h).
4290 * dyn_load.c (GC_init_dyld): Remove parameter cast for
4291 _dyld_register_func_for_add_image() and
4292 _dyld_register_func_for_remove_image(); add the comment about
4293 possible warnings; add FIXME for the deprecated
4294 _dyld_bind_fully_image_containing_address().
4295 * include/private/gc_priv.h: Include gc.h before the standard
4296 headers inclusion.
4297 * tests/test.c: Likewise.
4298 * include/private/gcconfig.h (DebugBreak): Update the comment.
4299 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
4300
4301 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
4302 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
4303 * configure.ac: Add sparc-openbsd case.
4304 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
4305 Document.
4306 * tests/test.c (main): Handle OpenBSD case.
4307 * include/private/pthread_stop_world.h: Likewise.
4308 * extra/threadlibs.c (main): Replace K&R-style function definition
4309 with the ANSI C one.
4310 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
4311 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
4312 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
4313 define it for OpenBSD.
4314 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
4315 pthread_sigmask): Don't declare and redefine for OpenBSD.
4316 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
4317 amd64, powerpc).
4318 * mach_dep.c (NO_GETCONTEXT): Likewise.
4319 * include/private/pthread_stop_world.h (thread_stop_info): Don't
4320 define last_stop_count field if OpenBSD.
4321 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
4322 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
4323 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
4324 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
4325 (only if OpenBSD).
4326 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
4327 GC_skip_hole_openbsd): New static function (only if OpenBSD).
4328 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
4329 GC_register_data_segments): Define specially for OpenBSD case.
4330 * os_dep.c (GC_fault_handler_lock): Initialize to
4331 AO_TS_INITIALIZER (instead of 0).
4332 * pthread_support.c (GC_allocate_lock): Likewise.
4333 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
4334 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
4335 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
4336 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
4337 GC_restart_handler): Don't define and use if OpenBSD.
4338 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
4339 GC_start_world): Handle OpenBSD case.
4340 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
4341 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
4342 don't define the wrapper function if OpenBSD.
4343 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
4344
4345 * dyn_load.c: Move the inclusion of private/gc_priv.h below
4346 definition of a feature macro (_GNU_SOURCE).
4347
4348 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
4349 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
4350 (only if GC_I_HIDE_POINTERS).
4351 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
4352 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
4353 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
4354 GC_enqueue_all_finalizers): Likewise.
4355 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
4356 * finalize.c (GC_general_register_disappearing_link,
4357 GC_unregister_disappearing_link, GC_register_finalizer_inner,
4358 GC_finalize): Likewise.
4359 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
4360 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
4361 of I_HIDE_POINTERS.
4362 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
4363 * include/gc.h (_GC_H): Strip leading underscore.
4364 * include/gc_backptr.h (_GC_H): Likewise.
4365 * include/gc_gcj.h (_GC_H): Likewise.
4366 * include/gc_mark.h (_GC_H): Likewise.
4367 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
4368 * include/javaxfc.h (_GC_H): Likewise.
4369 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
4370 * include/private/dbg_mlc.h (_GC_H): Likewise.
4371 * include/private/gc_priv.h (_GC_H): Likewise.
4372
4373 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
4374
4375 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
4376 variable definitions).
4377 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
4378 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
4379 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
4380 GC_n_memory, GC_fail_count): Likewise.
4381 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
4382 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
4383 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4384 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
4385 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
4386 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
4387 GC_mark_no, GC_markers): Likewise.
4388 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
4389 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
4390 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
4391 GC_backtraces, GC_force_unmap_on_gcollect,
4392 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
4393 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
4394 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
4395 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
4396 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
4397 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
4398 GC_need_to_lock, GC_thr_initialized, GC_threads,
4399 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
4400 GC_mark_lock_holder): Likewise.
4401 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
4402 Likewise.
4403 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
4404 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
4405 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
4406 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
4407
4408 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
4409 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
4410 case (since they are not defined inside GC at present).
4411 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
4412 declaration (since made static).
4413 * mark.c (GC_objects_are_marked): Define as STATIC.
4414 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
4415 Likewise.
4416 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
4417 to initialize GC_n_kinds).
4418 * win32_threads.c (start_mark_threads): Adjust the comment.
4419
4420 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
4421 function.
4422 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
4423 * mark_rts.c (add_roots_to_index): Likewise.
4424
4425 * extra/gc.c: New file.
4426 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
4427
4428 * misc.c (GC_log): Remove the declaration; move the definition (to
4429 the place where it is used); make STATIC.
4430 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
4431 to print open log failure.
4432 * misc.c (GC_write): Don't abort on open log failure if the GC is
4433 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
4434
4435 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
4436
4437 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
4438 the variable declaration to gc_priv.h.
4439 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4440 GC_force_unmap_on_gcollect): Likewise.
4441 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4442 * finalize.c (GC_fail_count): Likewise.
4443 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4444 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
4445 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4446 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4447 GC_mark_stack_too_small, GC_mark_state): Likewise.
4448 * include/private/pthread_support.h (GC_threads,
4449 GC_thr_initialized, GC_in_thread_creation): Likewise.
4450 * mallocx.c (GC_bytes_found): Likewise.
4451 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4452 * misc.c (GC_unmap_threshold): Likewise.
4453 * os_dep.c (GC_unmap_threshold): Likewise.
4454 * pthread_support.c (GC_markers): Likewise.
4455 * thread_local_alloc.c (GC_gcjobjfreelist,
4456 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4457 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4458 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4459 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
4460 a tag for now); defined after "gcconfig.h" inclusion.
4461 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
4462 keyword for most global variables.
4463 * alloc.c (GC_copyright): Add the comment about the symbol
4464 visibility.
4465 * finalize.c (GC_fo_entries): Likewise.
4466 * include/private/gc_priv.h (GC_print_stats): Likewise.
4467 * misc.c (GC_quiet): Likewise.
4468 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
4469 STATIC.
4470 * pthread_support.c (GC_threads): Add explicit zero initializer
4471 (to make the variable definition differ from the declaration).
4472
4473 * backgraph.c (GC_quiet): Remove the declaration (not needed
4474 anymore since gc_priv.h is always included).
4475 * checksums.c (GC_quiet): Likewise.
4476 * gcj_mlc.c (GC_quiet): Likewise.
4477 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
4478 comment.
4479 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4480 GC_hdr_cache_misses): Likewise.
4481 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
4482 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
4483 Likewise.
4484 * win32_threads.c (GC_please_stop, GC_max_thread_index,
4485 GC_mark_mutex_waitcnt): Likewise.
4486
4487 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
4488 'D') in the name.
4489
4490 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
4491 redirection is turned off; turn it on later when dlopen real
4492 symbol is no longer needed (according to the comment and the same
4493 as in dyn_load.c).
4494 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
4495 REAL_DLFUNC, respectively (to have unique names since the
4496 definitions may differ from that of the similar ones in
4497 pthread_support.c).
4498 * mark.c (source): Undefine the macro when no longer needed.
4499 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
4500 have the unique name across the project).
4501 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
4502 comment.
4503 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
4504 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
4505 longer needed.
4506
4507 * pthread_stop_world.c (pthread_sigmask): Undefine before using
4508 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
4509 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
4510 neither redirected nor used here).
4511 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
4512 "tm" for short; remove "tm_" prefix.
4513 * win32_threads.c (in_use, next): Don't define the macros; use
4514 tm.in_use and tm.next fields, respectively (to ease debugging).
4515 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
4516 unique name across the project).
4517
4518 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
4519 inclusion.
4520 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
4521 not included yet.
4522 * finalize.c (I_HIDE_POINTERS): Don't define.
4523 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
4524 * misc.c (I_HIDE_POINTERS): Likewise.
4525 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
4526 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
4527 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
4528 inclusion order.
4529
4530 * dyn_load.c: Include gc_priv.h before using configuration
4531 information (MACOS).
4532 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
4533 GC_MUST_RESTORE_REDEFINED_DLOPEN.
4534
4535 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
4536 properly.
4537 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
4538 "ifdef DEBUG_THREADS".
4539 * pthread_stop_world.c: Likewise.
4540 * pthread_support.c: Likewise.
4541 * include/gc_inline.h: Guard with GC_INLINE_H.
4542
4543 * alloc.c (GC_copyright): Define as const.
4544 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
4545 (since the name starts with "GC_" prefix).
4546 * dbg_mlc.c (GC_describe_type_fns): Likewise.
4547 * dyn_load.c (GC_FirstDLOpenedLinkMap,
4548 GC_register_dynlib_callback, GC_dyld_sections,
4549 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
4550 Likewise.
4551 * malloc.c (GC_libpthread_start, GC_libpthread_end,
4552 GC_libld_start, GC_libld_end): Likewise.
4553 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
4554 Likewise.
4555 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
4556 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
4557 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
4558 GC_forward_exception): Likewise.
4559 * pthread_support.c (GC_syms_initialized): Likewise.
4560 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
4561 * win32_threads.c (GC_win32_dll_threads,
4562 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
4563 GC_waitForSingleObjectInfinite): Likewise.
4564 * darwin_stop_world.c (GC_use_mach_handler_thread,
4565 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
4566 "static" with "STATIC" and add zero initializer.
4567 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
4568 GC_sigbus_count): Likewise.
4569 * headers.c (free_hdr): Replace "static" with GC_INLINE.
4570 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
4571 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
4572 * os_dep.c (async_set_pht_entry_from_index): Make static (for
4573 MPROTECT_VDB case).
4574 * pthread_support.c (GC_real_pthread_create,
4575 GC_real_pthread_sigmask, GC_real_pthread_join,
4576 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
4577 for static GC_real_XXX symbols.
4578 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
4579
4580 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
4581 * dyn_load.c (GC_init_dyld): Likewise.
4582 * os_dep.c (GC_print_callers): Likewise.
4583 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
4584 result (since it's always of "struct mach_header" type).
4585 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
4586 GC_dyld_image_remove (to always have the first argument of
4587 "struct mach_header" pointer type).
4588
4589 * configure.ac: Add threads support for OpenBSD case (threads may
4590 not work correctly for it).
4591
4592 * acinclude.m4: Rename to m4/gc_set_version.m4.
4593 * m4/libtool.m4: Delete the file.
4594 * m4/lt~obsolete.m4: Likewise.
4595 * m4/ltoptions.m4: Likewise.
4596 * m4/ltsugar.m4: Likewise.
4597 * m4/ltversion.m4: Likewise.
4598
4599 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
4600 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
4601 declaration in winbase.h (the workaround would turn into a no-op
4602 when DebugBreak() will be defined as a macro in the toolchain).
4603
4604 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
4605 x86mingw32ce toolchain).
4606 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
4607 toolchain (or if already defined).
4608 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
4609 defined for WinCE or if NO_GETENV is defined).
4610 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
4611 NO_GETENV one.
4612
4613 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
4614 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
4615 * libtool.m4: Remove.
4616 * m4/libtool.m4: New file (generated).
4617 * m4/lt~obsolete.m4: Likewise.
4618 * m4/ltoptions.m4: Likewise.
4619 * m4/ltsugar.m4: Likewise.
4620 * m4/ltversion.m4: Likewise.
4621
4622 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
4623 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
4624 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
4625
4626 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
4627 comments; don't use "default" stop_func on a retry if
4628 GC_dont_expand.
4629 * alloc.c (GC_allocobj): Pass "retry" argument to
4630 GC_collect_or_expand().
4631 * malloc.c (GC_alloc_large): Likewise.
4632 * include/private/gc_priv.h (GC_collect_or_expand): Move the
4633 declaration to malloc.c; add "retry" argument.
4634
4635 * alloc.c (GC_start_call_back): Move the variable definition from
4636 misc.c.
4637 * include/private/gc_priv.h (GC_start_call_back): Remove the
4638 declaration.
4639 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
4640 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
4641 beginning of the function.
4642 * include/gc.h (GC_try_to_collect): Refine the comment about
4643 stop_func.
4644
4645 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
4646 GC_gcollect): Add the comment.
4647 * alloc.c (GC_try_to_collect_general): Move the assertion on
4648 stop_func != 0 to GC_try_to_collect().
4649 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
4650 GC_default_stop_func instead (holding the lock).
4651 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
4652 GC_default_stop_func (to prevent data races).
4653
4654 * Makefile.direct: Move "define arguments" documentation to
4655 doc/README.macros; add reference to doc/README.macros.
4656 * Makefile.dj: Change the documentation reference to
4657 doc/README.macros.
4658 * README.QUICK: Likewise.
4659 * configure.ac: Likewise.
4660 * allchblk.c: Remove unnecessary "-D" from the comment.
4661 * doc/README.macros: Likewise.
4662 * README.environment: Likewise.
4663 * include/gc.h: Likewise.
4664 * include/gc_inline.h: Likewise.
4665 * include/private/gcconfig.h: Likewise.
4666 * README.QUICK: Fix a typo.
4667
4668 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
4669 CreateFile(); don't immediately flush every write if very verbose.
4670
4671 * doc/README.win32: Replace ".exe.log" to ".gc.log".
4672 * doc/README.win64: Likewise.
4673 * doc/README.win64: Fix a typo.
4674 * misc.c (GC_CreateLogFile): Strip executable file extension for
4675 the log file; use ".gc.log" extension (instead of ".log").
4676
4677 * include/gc_config_macros.h: Avoid the redefinition of
4678 GC_xxx_THREADS macros.
4679
4680 * alloc.c (GC_try_to_collect_general): Change the type of "result"
4681 local variable to GC_bool.
4682
4683 * include/gc_config_macros.h: Use old behavior for FreeBSD and
4684 NetBSD platform detection code (check that other GC_xxx_THREADS
4685 are undefined); add FIXME.
4686
4687 * include/gc_config_macros.h: Rearrange the platform detection
4688 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
4689 GC_THREADS first if GC_XXX_THREADS already set; define proper
4690 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
4691 place; define _REENTRANT if posix threads except for Win32).
4692
4693 * alloc.c (GC_try_to_collect_general): New function (move the code
4694 from GC_try_to_collect, pass force_unmap argument).
4695 * alloc.c (GC_try_to_collect, GC_gcollect): Call
4696 GC_try_to_collect_general().
4697 * alloc.c (GC_gcollect_and_unmap): New public function.
4698 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
4699 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
4700 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
4701 and GC_gcollect()).
4702
4703 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
4704 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
4705 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
4706 (that is, don't depend on GC_THREADS macro).
4707 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
4708 with a check for GC_PTHREADS (since the former implies the
4709 latter).
4710
4711 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
4712 * include/gc.h (GC_MIN, GC_MAX): Don't define.
4713 * mallocx.c (GC_malloc_many): Add comment to #endif.
4714
4715 * configure.ac: Drop the subdir-objects Automake option, since
4716 it's incompatible with picking source files from libatomic_ops.
4717
4718 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
4719 "extern" keyword to a global variable declaration (some compilers
4720 require it).
4721 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4722 GC_force_unmap_on_gcollect): Likewise.
4723 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4724 * finalize.c (GC_fail_count): Likewise.
4725 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4726 GC_hdr_cache_misses): Likewise.
4727 * mallocx.c (GC_bytes_found): Likewise.
4728 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4729 * misc.c (GC_unmap_threshold): Likewise.
4730 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
4731 * pthread_support.c (GC_markers): Likewise.
4732 * thread_local_alloc.c (GC_gcjobjfreelist,
4733 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4734 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4735 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4736
4737 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
4738 suppress misleading GC "Out of Memory!" warning printed on every
4739 GC_MALLOC(LONG_MAX) call.
4740 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
4741 * tests/huge_test.c (main): Replace K&R-style function definition
4742 with the ANSI C one.
4743
4744 * dyn_load.c (GC_register_dynamic_libraries): Always use
4745 lpMaximumApplicationAddress value for WinCE (even for old
4746 versions).
4747 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
4748 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
4749 WinCE and THREADS).
4750 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
4751 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
4752 GC_dont_query_stack_min for older WinCE (prior to version 5).
4753 * win32_threads.c (GC_dont_query_stack_min): Declare.
4754 * win32_threads.c (GC_get_stack_min): Rename the macro to
4755 GC_wince_evaluate_stack_min for WinCE; update the comment.
4756 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
4757 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
4758 WinCE and don't update thread's last_stack_min value (only if
4759 GC_dont_query_stack_min).
4760 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
4761 GC_dont_query_stack_min (since the evaluated stack_min value may
4762 be incorrect if the stack is bigger than 64 KiB).
4763
4764 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
4765 GC_USE_LD_WRAP).
4766 * include/gc.h: Include "gc_pthread_redirects.h" even if
4767 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4768 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
4769 define and check for (since included only from gc.h).
4770 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
4771 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4772 * include/gc_pthread_redirects.h: Include signal.h only to get
4773 sigset_t definition.
4774
4775 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
4776 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
4777 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
4778 * os_dep.c (GC_sysinfo): Remove explicit global variable
4779 initialization to "{0}" (revert back the previous change) since it
4780 might produce a warning.
4781
4782 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
4783 gc_priv.h.
4784 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
4785 from misc.c; define as STATIC.
4786 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
4787 GC_large_alloc_warn_suppressed): Remove declaration.
4788 * alloc.c (GC_bytes_found): Add "defined in" comment.
4789 * mallocx.c (GC_bytes_found): Likewise.
4790 * misc.c (GC_unmap_threshold): Likewise.
4791 * os_dep.c (GC_old_allocator): Likewise.
4792 * pthread_support.c (GC_markers): Likewise.
4793 * thread_local_alloc.c (GC_gcjobjfreelist,
4794 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4795 * win32_threads.c (GC_markers): Likewise.
4796 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
4797 be distinctive from a variable declaration).
4798 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
4799 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
4800 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
4801 * checksums.c (GC_faulted, GC_n_dirty_errors,
4802 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
4803 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
4804 * dbg_mlc.c (GC_smashed): Likewise.
4805 * finalize.c (GC_old_dl_entries): Likewise.
4806 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
4807 GC_gcjdebugobjfreelist): Likewise.
4808 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4809 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
4810 GC_mark_stack_top): Likewise.
4811 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
4812 Likewise.
4813 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
4814 GC_old_segv_handler, GC_old_bus_handler,
4815 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
4816 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
4817 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
4818 * reclaim.c (GC_leaked): Likewise.
4819 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
4820 GC_typed_mark_proc_index, GC_array_mark_proc_index,
4821 GC_eobjfreelist, GC_arobjfreelist): Likewise.
4822 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
4823 GC_marker_Id): Likewise.
4824 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
4825 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
4826 * os_dep.c (GC_vd_base): Likewise.
4827 * pthread_support.c (GC_mark_threads): Likewise.
4828 * reclaim.c (GC_leaked): Likewise.
4829 * typd_mlc.c (GC_bm_table): Likewise.
4830 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
4831 that of definition; add "defined in" comment.
4832 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
4833 GC_save_regs_ret_val.
4834 * misc.c (GC_check_heap, GC_print_all_smashed,
4835 GC_start_call_back): Remove unnecessary cast (of 0).
4836 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
4837 * misc.c (GC_large_alloc_warn_interval): Initialize to
4838 GC_LARGE_ALLOC_WARN_INTERVAL value.
4839 * misc.c (GC_tmp): Change to "static".
4840 * os_dep.c (GC_mprotect_state): Define as static.
4841 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
4842 * win32_threads.c (WinMain): Remove FIXME for WinCE.
4843
4844 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
4845
4846 * configure.ac: Rewrite the tests for external or internal
4847 libatomic_ops.
4848 * configure.ac: In particular, drop the symbolic links. Add option
4849 --with-libatomic-ops for forced selection.
4850 * Makefile.am: Adjust the path of source files from libatomic_ops
4851 to not use the links.
4852 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
4853 be empty if we use the bundled AO sources.
4854
4855 * Makefile.am: Strip version suffix for libatomic_ops directory.
4856 * build_atomic_ops.sh: Likewise.
4857 * build_atomic_ops.sh.cygwin: Likewise.
4858 * configure_atomic_ops.sh: Likewise.
4859 * Makefile.direct: Remove AO_VERSION definition; strip version
4860 suffix for libatomic_ops directory.
4861 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4862 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4863 * NT_X64_THREADS_MAKEFILE: Likewise.
4864 * gc.mak: Likewise.
4865
4866 * libatomic_ops: Rename from "libatomic_ops-1.2".
4867
4868 * alloc.c (GC_version): Add "const" keyword.
4869 * alloc.c (GC_get_version): New public function.
4870 * include/gc.h (GC_get_version): New function declaration; update
4871 the comment for the GC version.
4872
4873 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4874 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
4875 (for the global variable declaration) again.
4876 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4877 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4878 GC_mark_stack_too_small, GC_mark_state): Likewise.
4879 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
4880 * include/private/pthread_support.h (GC_threads,
4881 GC_thr_initialized, GC_in_thread_creation): Likewise.
4882 * include/private/gc_priv.h: Likewise.
4883
4884 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
4885
4886 * allchblk.c (GC_hblkfreelist): Define as STATIC.
4887 * blacklst.c (GC_total_stack_black_listed): Likewise.
4888 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
4889 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
4890 declaration.
4891 * mark_rts.c (GC_stopped_mark): Add declaration (only if
4892 THREAD_LOCAL_ALLOC).
4893 * allchblk.c (GC_fail_count): Move the declaration out of
4894 GC_allochblk_nth(); remove "extern".
4895 * alloc.c (IF_THREADS): Remove unused macro.
4896 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
4897 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
4898 THREAD_LOCAL_ALLOC.
4899 * alloc.c (GC_bytes_found, GC_collection_in_progress,
4900 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
4901 Remove K&R-style "extern" for the declaration.
4902 * dbg_mlc.c (GC_free_inner): Likewise.
4903 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
4904 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
4905 * finalize.c (GC_fail_count): Likewise.
4906 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4907 GC_hdr_cache_misses): Likewise.
4908 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4909 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
4910 Likewise.
4911 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
4912 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
4913 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
4914 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
4915 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
4916 GC_page_size, GC_sysinfo, GC_black_list_spacing,
4917 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
4918 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
4919 GC_large_alloc_warn_suppressed, GC_blocked_sp,
4920 GC_activation_frame, GC_push_other_roots,
4921 GC_push_finalizer_structures, GC_push_thread_structures,
4922 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
4923 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
4924 GC_print_heap_obj, GC_have_errors, GC_print_stats,
4925 GC_dump_regularly, GC_backtraces, GC_print_back_height,
4926 GC_debug_generic_malloc_inner,
4927 GC_debug_generic_malloc_inner_ignore_off_page,
4928 GC_fl_builder_count, GC_mark_no, GC_help_marker,
4929 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
4930 * include/private/gcconfig.h (GC_SysVGetDataStart,
4931 GC_FreeBSDGetDataStart, GC_register_stackbottom,
4932 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
4933 * include/private/pthread_support.h (GC_threads,
4934 GC_thr_initialized, GC_in_thread_creation): Likewise.
4935 * malloc.c (GC_text_mapping): Likewise.
4936 * mallocx.c (GC_bytes_found): Likewise.
4937 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
4938 * mark_rts.c (GC_save_regs_ret_val): Likewise.
4939 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
4940 GC_setpagesize, GC_init_linux_data_start,
4941 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
4942 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
4943 GC_darwin_register_mach_handler_thread): Likewise.
4944 * pthread_support.c (GC_markers, GC_collection_in_progress):
4945 Likewise.
4946 * tests/test.c (GC_amiga_free_all_mem): Likewise.
4947 * thread_local_alloc.c (GC_gcjobjfreelist,
4948 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4949 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
4950 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
4951 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
4952 Move the declaration out of GC_init(); remove "extern".
4953 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
4954 compiler "unreachable code" warnings for ABORT callers (where
4955 ABORT is followed by a dummy return statement).
4956 * os_dep.c (GC_old_allocator): Move the declaration out of
4957 GC_default_push_other_roots(); remove "extern".
4958 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4959 Move the declaration out of GC_stop_world() and GC_start_world()
4960 (only if MPROTECT_VDB); remove "extern".
4961
4962 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
4963 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
4964 WinCE emulation and for custom WinCE 6 devices); add the comment.
4965 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
4966 of DWORD.
4967 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
4968 latest known stack_min value for WinCE (if GC_get_stack_min is
4969 defined as a macro); update the comments.
4970 * win32_threads.c (GC_wnt): Don't declare for WinCE.
4971
4972 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
4973 * gcj_mlc.c (GC_clear_stack): Remove declaration.
4974 * malloc.c (GC_clear_stack): Likewise.
4975 * mallocx.c (GC_clear_stack): Likewise.
4976 * typd_mlc.c (GC_clear_stack): Likewise.
4977 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
4978 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
4979 remove "lb" unnecessary cast to word.
4980 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
4981 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
4982 Move common declaration from typd_mlc.c and malloc.c; remove
4983 unnecessary result and "lb" parameter casts.
4984 * include/private/thread_local_alloc.h: Guard against duplicate
4985 header file inclusion.
4986 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
4987 the case when USE_MMAP is not defined.
4988 * pthread_support.c (GC_is_thread_tsd_valid): New internal
4989 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
4990 code from thread-local GC_malloc(); add FIXME for the condition.
4991 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
4992 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
4993 match that of its definition).
4994 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
4995 GC_gcjobjfreelist.
4996 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
4997 Remove unused declaration; don't include pthread.h.
4998 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
4999 (only if GC_ASSERTIONS).
5000 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
5001 instead of GC_lookup_thread().
5002 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
5003 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
5004 id different from that in os_dep.c).
5005
5006 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
5007 with GC_INLINE.
5008 * include/private/gc_priv.h (fixed_getenv): Likewise.
5009 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
5010 GC_INLINE.
5011 * mark_rts.c (rt_hash): Likewise.
5012 * win32_threads.c (GC_get_max_thread_index): Likewise.
5013 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
5014 "static"; define for Sun CC; define for VC++ (and other
5015 compilers).
5016 * pthread_support.c: Don't define __inline__ for non-GNU compilers
5017 (not needed anymore).
5018
5019 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
5020 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
5021 * Makefile.am: Likewise.
5022 * Makefile.dj: Likewise.
5023 * Makefile.direct: Likewise.
5024 * doc/README.win32: Add reference to gc.mak.
5025 * NT_X64_THREADS_MAKEFILE: Likewise.
5026
5027 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
5028
5029 * autogen.sh: Update.
5030
5031 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
5032 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
5033 * README.QUICK: Update information for Makefile.
5034 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
5035 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
5036 * tests/tests.am: Use it here to conditionally enable tracetest
5037 when possible.
5038
5039 * dyn_load.c (GC_wnt): Update the comment.
5040 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
5041 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
5042 macro); call GC_is_heap_base() only if check for Type succeeded.
5043
5044 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
5045 update the comment.
5046 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
5047
5048 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
5049 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
5050 ASSERT_CANCEL_DISABLED): New macros.
5051 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
5052 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
5053 Disable cancellation.
5054 (GC_add_to_our_memory): Check for overflow.
5055 * misc.c (GC_cancel_disable_count): declare.
5056 (GC_init, GC_write): Disable cancellation.
5057 (GC_init): Remove redundant GC_is_initialized test.
5058 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
5059 (GC_get_stack_base): Disable cancellation.
5060 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
5061 cancellation.
5062 * pthread_support.c (GC_mark_thread): Permanently disable
5063 cancellation.
5064 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
5065 Assert cancellation disabled.
5066 (fork handling): Disable cancellation, fix comment.
5067 (GC_pthread_create): Disable cancellation.
5068 (GC_unregister_my_thread): Disable cancellation.
5069 * Makefile.direct: Document NO_CANCEL_SAFE.
5070
5071 * Makefile: Remove outdated file (Makefile.direct should be used
5072 instead).
5073
5074 * include/gc.h (GC_use_DllMain): Refine the comment.
5075
5076 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
5077 EMPTY_GETENV_RESULTS.
5078 * configure.ac: Fix a typo.
5079 * Makefile.am: Likewise.
5080
5081 * checksums.c (GC_checksum, GC_update_check_page): Remove
5082 "register" keyword in local variable declarations (for the code
5083 used only for debugging or which is not time-critical).
5084 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
5085 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
5086 GC_print_smashed_obj, GC_debug_end_stubborn_change,
5087 GC_debug_invoke_finalizer): Likewise.
5088 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5089 * mallocx.c (GC_realloc): Likewise.
5090 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
5091 GC_clear_roots): Likewise.
5092 * misc.c (GC_write): Likewise.
5093 * os_dep.c (GC_print_callers): Likewise.
5094 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
5095 variable to "j" for the nested loop (just not to hide the similar
5096 variable in the outer one).
5097 * mark_rts.c (GC_print_static_roots): Output an error message
5098 using GC_err_printf() (instead of GC_printf()).
5099
5100 * configure.ac: Move include flag from ${INCLUDE} ...
5101 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
5102 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
5103 * configure.ac: Add documentation to all AC_DEFINE either directly
5104 or using AH_TEMPLATE.
5105
5106 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
5107 function (only if GC_WINMAIN_REDIRECT).
5108 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
5109 thru GC_do_blocking() instead of calling WaitForSingleObject()
5110 directly.
5111
5112 * pthread_support.c (start_mark_threads): Refine printed message.
5113 * win32_threads.c (GC_thr_init): Likewise.
5114
5115 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
5116 * Makefile.direct (NO_GETENV): Update the comment.
5117 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
5118 * include/gc.h (GC_WinMain): Remove declaration.
5119 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
5120 GC_WINMAIN_REDIRECT.
5121 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
5122 WinCE target unless GC_WINMAIN_REDIRECT is defined.
5123 * tests/test.c (WINMAIN_LPTSTR): New macro.
5124 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
5125 and GC_WINMAIN_WINCE_LPTSTR.
5126 * win32_threads.c (start_mark_threads): Add the comment for
5127 MARK_THREAD_STACK_SIZE.
5128 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
5129 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
5130 macro (only if GC_WINMAIN_REDIRECT).
5131 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
5132 * win32_threads.c (GC_WinMain): Add prototype (only if
5133 GC_WINMAIN_REDIRECT).
5134 * win32_threads.c (main_thread_args, WinMain): Rename
5135 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
5136 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
5137 use WINMAIN_THREAD_STACK_SIZE.
5138 * win32_threads.c (WinMain): Call GC_deinit() and
5139 DeleteCriticalSection() only if WinCE; add FIXME.
5140
5141 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
5142 value returned by GC_get_stack_base().
5143
5144 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
5145 Add the comment for.
5146 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
5147 Declare external variable (only if USE_MUNMAP).
5148 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
5149 value to 1 if GC_force_unmap_on_gcollect and restore it before
5150 unlocking (only if USE_MUNMAP).
5151 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
5152 information for.
5153 * include/gc.h (GC_set_force_unmap_on_gcollect,
5154 GC_get_force_unmap_on_gcollect): New public function prototype.
5155 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
5156 recognized.
5157 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
5158 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
5159 internal macro (used by GC_INIT only).
5160 * misc.c (GC_force_unmap_on_gcollect): New global variable.
5161 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
5162 environment variable (and set GC_force_unmap_on_gcollect).
5163 * misc.c (GC_set_force_unmap_on_gcollect,
5164 GC_get_force_unmap_on_gcollect): New public function.
5165 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
5166 to force the mode on if WM_HIBERNATE; restore the mode after
5167 GC_gcollect().
5168
5169 * Makefile.direct (LARGE_CONFIG): Update information.
5170 * include/gc.h (GC_stop_func): Refine the comment.
5171
5172 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
5173 Win32 (workaround for Wine bug).
5174
5175 * allchblk.c (GC_freehblk): Adjust local variables indentation.
5176 * mallocx.c (GC_generic_malloc_many): Likewise.
5177 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
5178 GC_calloc_explicitly_typed): Likewise.
5179 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
5180 brackets.
5181
5182 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
5183 * configure.ac: Process enable_parallel_mark option for Cygwin and
5184 Win32; define THREAD_LOCAL_ALLOC for Win32.
5185
5186 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
5187 PARALLEL_MARK (required for VC++ x86).
5188
5189 * dbg_mlc.c (GC_generate_random_backtrace): Call
5190 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
5191 if GC is disabled then print error message and return.
5192 * include/gc.h (GC_try_to_collect): Refine the comment.
5193 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
5194 refine the comment.
5195
5196 * add_gc_prefix.c: Move the file to the new "extra" directory.
5197 * AmigaOS.c: Likewise.
5198 * gcname.c: Likewise.
5199 * if_mach.c: Likewise.
5200 * if_not_there.c: Likewise.
5201 * MacOS.c: Likewise.
5202 * msvc_dbg.c: Likewise.
5203 * setjmp_t.c: Likewise.
5204 * threadlibs.c: Likewise.
5205 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
5206 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
5207 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
5208 with "extra" directory.
5209 * Makefile.am: Likewise.
5210 * Makefile.direct: Likewise.
5211 * Makefile.dj: Likewise.
5212 * Makefile.in: Likewise.
5213 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
5214 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5215 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5216 * NT_X64_THREADS_MAKEFILE: Likewise.
5217 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
5218 * gc.mak: Likewise.
5219 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
5220 directory.
5221 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
5222 directory.
5223 * doc/simple_example.html: Update for threadlibs.c.
5224 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
5225
5226 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
5227 function prototype.
5228 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
5229 single-threaded case) with an assertion check for the state to be
5230 not a "do-blocking" one.
5231 * include/private/gc_priv.h (blocking_data): Move the structure
5232 definition from pthread_support.c; change "fn" return type to void
5233 pointer.
5234 * include/private/gc_priv.h (GC_activation_frame_s): New structure
5235 type.
5236 * include/private/gc_priv.h (GC_push_all_stack_frames): New
5237 function declaration (only if THREADS).
5238 * include/private/gc_priv.h (GC_world_stopped): Don't declare
5239 unless THREADS.
5240 * include/private/gc_priv.h (GC_blocked_sp,
5241 GC_activation_frame_s): New declaration (only if not THREADS).
5242 * include/private/gc_priv.h (GC_push_all_register_frames): New
5243 function declaration (only for IA-64).
5244 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
5245 obsolete (unused) symbols.
5246 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
5247 Remove declaration (since it is static now).
5248 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
5249 (for code locality) and make STATIC.
5250 * mark_rts.c (GC_push_all_register_frames): New function (only for
5251 IA-64).
5252 * mark_rts.c (GC_push_all_stack_frames): New function (only if
5253 THREADS).
5254 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
5255 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
5256 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
5257 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
5258 function body (only for IA-64).
5259 * mark_rts.c (GC_push_current_stack): Call
5260 GC_push_all_stack_part_eager_frames() instead of
5261 GC_push_all_stack_partially_eager().
5262 * mark_rts.c (GC_push_current_stack): Call
5263 GC_push_all_register_frames() instead of GC_push_all_eager() for
5264 IA-64 backing store.
5265 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
5266 only).
5267 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
5268 GC_activation_frame): New global variables (only if not THREADS).
5269 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
5270 function (only if not THREADS).
5271 * misc.c (GC_do_blocking): Move the function from
5272 pthread_support.c.
5273 * include/private/pthread_support.h (GC_Thread_Rep): Add
5274 "activation_frame" field.
5275 * pthread_stop_world.c (GC_push_all_stacks): Call
5276 GC_push_all_stack_frames() and GC_push_all_register_frames instead
5277 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
5278 STACK_GROWS_UP here.
5279 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
5280 "fn" result back to "client_data" field.
5281 * pthread_support.c (GC_call_with_gc_active): New API function.
5282 * win32_threads.c (GC_call_with_gc_active): Likewise.
5283 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
5284 "activation_frame" fields.
5285 * win32_threads.c (GC_new_thread): Add assertion checking for
5286 thread_blocked_sp is NULL.
5287 * win32_threads.c (GC_do_blocking_inner): New function.
5288 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
5289 thread_blocked_sp is non-NULL.
5290 * win32_threads.c (GC_push_stack_for): Use thread
5291 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
5292 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
5293 thread before modifying its last_stack_min; call
5294 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
5295 the comments.
5296
5297 * alloc.c (GC_default_stop_func): New static variable (initialized
5298 to GC_never_stop_func).
5299 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
5300 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
5301 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
5302 else call GC_default_stop_func() before getting "current_time".
5303 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
5304 FIXME comment).
5305 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
5306 replacing GC_never_stop_func with GC_default_stop_func (if
5307 possible).
5308 * alloc.c (GC_gcollect): Use GC_default_stop_func.
5309 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
5310 (instead of GC_never_stop_func) unless it is trigged due to out of
5311 memory; don't increment GC_fail_count and don't output warning
5312 (before trying to collect again) in case the collection has been
5313 interrupted (by GC_default_stop_func) and the heap expansion has
5314 failed too.
5315 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
5316 prototypes.
5317
5318 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
5319 GC_get_writable_length() result.
5320
5321 * configure.ac: Don't use -lpthread -ldl for Cygwin.
5322
5323 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
5324
5325 * include/private/gcconfig.h (GWW_VDB): Undefine if
5326 USE_GLOBAL_ALLOC (since incompatible).
5327 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
5328 is defined.
5329 * os_dep.c (GC_unmap_threshold): Declare (for use in
5330 GC_init_win32) if USE_MUNMAP.
5331 * os_dep.c (GC_init_win32): Turn off memory unmapping if
5332 GlobalAlloc() is used.
5333 * os_dep.c (GC_win32_get_mem): Define and use new
5334 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
5335 MPROTECT_VDB is in use.
5336
5337 * Makefile: Replace "version.h" with "include/gc_version.h".
5338 * include/gc_version.h: Likewise.
5339
5340 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
5341 (before returning FALSE) for convenience.
5342
5343 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
5344 string.
5345 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
5346 * win32_threads.c (GC_delete_thread): Likewise.
5347 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
5348 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
5349 unnecessary cast for WARN argument.
5350 * pthread_support.c (start_mark_threads): if pthread_create()
5351 failed then don't try to create other marker threads and (after
5352 printing a warning) adjust GC_markers and GC_parallel values; log
5353 GC_markers value (possibly adjusted) after that.
5354
5355 * win32_threads.c (start_mark_threads): if pthread_create() is
5356 failed then don't try to create other marker threads and (after
5357 printing a warning) adjust GC_markers and GC_parallel values.
5358 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
5359 the definition upper (to be visible in start_mark_threads()).
5360 * win32_threads.c (start_mark_threads): if CreateThread() or
5361 _beginthreadex() is failed then don't try to create other marker
5362 threads and (after printing a warning) adjust GC_markers,
5363 GC_parallel values, and destroy the event objects (either only
5364 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
5365 not a single thread is created).
5366 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
5367 adjusted) after start_mark_threads() call.
5368
5369 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
5370 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
5371
5372 * include/private/gc_priv.h: Change include of config.h to
5373 private/config.h.
5374 * include/private/gc_pmark.h: Likewise.
5375 * gc_cpp.cc: Likewise.
5376 * tests/test.c: Likewise.
5377 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
5378 undefine GC_BUILD.
5379
5380 * finalize.c (GC_general_register_disappearing_link): Return
5381 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
5382 respectively).
5383 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
5384 * include/gc.h (GC_register_disappearing_link,
5385 GC_general_register_disappearing_link): Update the comment.
5386 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
5387 * finalize.c (GC_general_register_disappearing_link,
5388 GC_register_finalizer_inner): Recalculate the hash table index
5389 after GC_oom_fn succeeded (since the table may grow while not
5390 holding the lock) and check again that the entry is still not in
5391 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
5392 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
5393 local variable (to prevent a compiler warning).
5394 * finalize.c (GC_register_finalizer_inner): Don't modify the data
5395 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
5396 (due to out of memory).
5397
5398 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
5399 suppress compiler "variable might be uninitialized" warnings.
5400
5401 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
5402 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
5403 WinCE.
5404 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
5405 HANDLE thru word type (to avoid a compiler warning) for WinCE.
5406 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
5407 (only if DONT_USE_SIGNALANDWAIT).
5408 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
5409 and GC_marker_cv for each helper thread (only if
5410 DONT_USE_SIGNALANDWAIT).
5411 * win32_threads.c (GC_mark_mutex_state): New static variable (only
5412 if DONT_USE_SIGNALANDWAIT).
5413 * win32_threads.c (GC_mark_mutex_waitcnt,
5414 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
5415 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
5416 Use InterlockedExchange() over GC_mark_mutex_state (instead of
5417 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
5418 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
5419 Implement wait/broadcast primitives using Win32 multiple events
5420 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
5421 using Win32 SignalObjectAndWait).
5422 * win32_threads.c (GC_thr_init): Don't declare hK32 local
5423 variable, don't check for GC_wnt, and don't initialize
5424 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
5425
5426 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
5427 if GC_print_stats (after getting "done_time").
5428 * finalize.c (GC_old_dl_entries): New static variable (only if not
5429 SMALL_CONFIG).
5430 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
5431 if not SMALL_CONFIG).
5432 * finalize.c (GC_print_finalization_stats): Define if and only if
5433 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
5434 instead of GC_printf(); use "%lu" (instead of "%u") print format
5435 specifier; use unsigned long type for "ready" counter (for LP64
5436 targets).
5437 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
5438 here (since it is called from GC_finish_collection()).
5439 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
5440 ECOS).
5441
5442 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
5443 GC_init() one.
5444 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
5445 * mallocx.c (GC_generic_malloc_many): Likewise.
5446 * misc.c (GC_enable_incremental): Likewise.
5447 * alloc.c (GC_expand_hp): Update the comment.
5448 * mark.c (GC_obj_kinds): Likewise.
5449 * win32_threads.c (GC_allow_register_threads): Likewise.
5450 * private/gc_priv.h (GC_init_inner): Remove function declaration.
5451 * misc.c (GC_init_inner): Replace with public GC_init().
5452
5453 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
5454 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
5455 GC_gcj_fake_mark_proc (aborting with the appropriate message)
5456 instead.
5457
5458 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
5459 to out of memory) then don't increment GC_n_heap_bases and don't
5460 call VirtualAlloc() again (with MEM_COMMIT).
5461 * os_dep.c (GC_remap): Abort with a more informatory message if
5462 VirtualAlloc() fails due to out of memory; update FIXME.
5463
5464 * Makefile: Fix typo for msvc_dbg.c.
5465 * Makefile.direct: Likewise.
5466 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
5467 "GC_".
5468 * Makefile.dj: Don't reference remove files (nursery.c,
5469 gc_nursery.h, gc_copy_descr.h).
5470 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
5471 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5472 * NT_THREADS_MAKEFILE: Likewise.
5473 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5474 * NT_X64_THREADS_MAKEFILE: Likewise.
5475 * gc.mak: Likewise.
5476 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
5477 defined in the source files).
5478 * NT_THREADS_MAKEFILE: Likewise.
5479 * NT_X64_THREADS_MAKEFILE: Likewise.
5480 * gc.mak: Likewise.
5481 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
5482 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
5483 GC_THREADS.
5484 * NT_THREADS_MAKEFILE: Likewise.
5485 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5486 * NT_X64_THREADS_MAKEFILE: Likewise.
5487 * gc.mak: Likewise.
5488 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
5489 compiler warnings.
5490 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5491 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
5492 before "$*.C" (and "$*.CPP").
5493 * NT_X64_THREADS_MAKEFILE: Likewise.
5494
5495 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
5496 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
5497 * doc/README.win64: Add info about mingw-w64; add note for VC++
5498 warnings suppression.
5499
5500 * os_dep.c (GC_forward_exception): Fix logic in several places.
5501 (OSX-specific)
5502
5503 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
5504
5505 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
5506 from Makefile.
5507 * Makefile: Remove the information about "define arguments" (which
5508 is incomplete and outdated compared to that in Makefile.direct);
5509 add help reference to Makefile.direct.
5510 * Makefile.dj: Likewise.
5511
5512 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
5513 Replace "STATIC" with "static" in the definition (since the
5514 symbols aren't prefixed with "GC_").
5515 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
5516 start_mark_threads, mark_mutex, builder_cv, mark_cv,
5517 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
5518 Likewise.
5519 * pthread_support.c (GC_wait_builder): Define as STATIC.
5520 * win32_threads.c (GC_wait_builder): Likewise.
5521
5522 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
5523 API function.
5524 * include/gc_pmark.h (GC_get_heap_size_inner,
5525 GC_get_free_bytes_inner): New function declaration.
5526
5527 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
5528 * include/gc_config_macros.h: Likewise.
5529 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
5530 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
5531 internal use).
5532 * include/gc_config_macros.h: Always include stddef.h if GCC.
5533 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
5534 same way as for MinGW.
5535 * include/gc_config_macros.h (GC_API): Group the definition for
5536 all cases together (check for GC_DLL only once).
5537 * include/gc_pthread_redirects.h: Group non-Darwin code together.
5538 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
5539
5540 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
5541 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
5542 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
5543 comment for.
5544 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
5545 macro).
5546 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
5547 FIXME and the comment for WinCE.
5548 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
5549 (new macro).
5550 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
5551 WinCE (since backtrace() is unimplemented).
5552 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
5553 (since static).
5554 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
5555 definition to be above GC_is_heap_base().
5556 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
5557 (both for MinGW and CeGCC toolchains).
5558 * include/private/gcconfig.h: Recognize __CEGCC__ and
5559 __MINGW32CE__ (as synonyms for __WIN32_WCE).
5560 * include/private/gcconfig.h: If SH4 then don't set config
5561 parameters for SH.
5562 * include/private/thread_local_alloc.h (GC_key_create): Don't
5563 abort on failures, just return -1 in these cases (this also
5564 prevents compilation error for targets where ABORT is defined
5565 indirectly as an inline assembler sequence).
5566 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
5567 the GCC-based cross-compiler.
5568 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
5569 WRAP_MARK_SOME is defined; define also for WinCE case; don't
5570 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
5571 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
5572 the comment.
5573 * misc.c: Include signal.h after gc_pmark.h included; check for
5574 MSWINCE instead of _WIN32_WCE.
5575 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
5576 * misc.c: Don't include <crtdbg.h> for WinCE targets.
5577 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
5578 CeGCC toolchain).
5579 * misc.c (GC_write): Use OutputDebugStringW() instead of
5580 _CrtDbgReport() for WinCE targets.
5581 * os_dep.c (GC_least_described_address): Define as STATIC.
5582 * os_dep.c (GC_register_data_segments): Fix code indentation.
5583 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
5584 (to prevent a compiler warning).
5585 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
5586 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
5587 include assert.h instead.
5588 * tests/test.c (tiny_reverse_test): Define and use
5589 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
5590 useful for WinCE.
5591 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
5592 for WinCE (since thread Id is used as a "real" thread handle).
5593 * win32_threads.c (THREAD_HANDLE): New macro.
5594 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
5595 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
5596 WinCE.
5597 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
5598 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
5599 for MSWINCE.
5600 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
5601 close thread handle on WinCE (since it's a thread Id).
5602 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
5603 MPROTECT-related code (for the case if MPROTECT_VDB would be
5604 implemented for WinCE).
5605 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
5606 Use THREAD_HANDLE(t) to obtain thread handle.
5607 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
5608 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
5609 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
5610 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
5611 parallel mark support).
5612 * win32_threads.c (start_mark_threads): Use int type for "i" local
5613 variable (instead of "unsigned") to prevent a compiler warning.
5614 * win32_threads.c (start_mark_threads): Don't check CreateThread()
5615 result for -1; call CloseHandle() for the handle created by
5616 CreateThread() (on WinCE); don't use errno (since errno.h is
5617 missing on some targets like WinCE) when printing warning on a
5618 marker thread creation failure.
5619 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
5620 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
5621 for non-zero signalObjectAndWait_func (to make the code compilable
5622 for WinCE).
5623 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
5624 use GC_sysinfo to get processors count if WinCE; don't check for
5625 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
5626 GC_PTHREADS_PARAMARK.
5627 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
5628 macro (useful for testing parallel marking on WinCE).
5629 * win32_threads.c (GC_win32_start, main_thread_start): Define as
5630 STATIC.
5631 * win32_threads.c: Don't define main_thread_args,
5632 main_thread_start(), WinMain() for WinCE if GC_DLL.
5633 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
5634 (since the stack size parameter is ignored on WinCE).
5635 * win32_threads.c (main_thread_start): Remove forward declaration;
5636 place its definition before WinMain() one.
5637 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
5638 WaitForSingleObject() failed (for the main thread).
5639
5640 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
5641 a function.
5642 * allchblk.c (GC_unmap_threshold): New global variable definition
5643 (initialized to MUNMAP_THRESHOLD).
5644 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
5645 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
5646 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
5647 * misc.c (GC_unmap_threshold): New variable declaration.
5648 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
5649 environment variable to set GC_unmap_threshold value (only if
5650 USE_MUNMAP).
5651
5652 * dbg_mlc.c (OFN_UNSET): New macro (to detect
5653 GC_register_finalizer() failures).
5654 * dbg_mlc.c (store_old): Add a check for register_finalizer()
5655 failure caused by an out-of-memory event (leave *ofn and *ocd
5656 unmodified in that case).
5657 * dbg_mlc.c (GC_debug_register_finalizer,
5658 GC_debug_register_finalizer_no_order,
5659 GC_debug_register_finalizer_unreachable,
5660 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
5661 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
5662 as in GC_register_finalizer_inner()).
5663
5664 * Makefile.direct (GC_DLL): Add the comment for.
5665 * doc/README.macros: Fix a typo.
5666 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
5667 * doc/README.macros (__STDC__): Remove info.
5668 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
5669 GC_generate_random_valid_address, GC_print_backtrace,
5670 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
5671 GC_API and GC_CALL to function definition.
5672 * malloc.c (GC_generic_malloc): Likewise.
5673 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
5674 * mark.c (GC_mark_and_push): Likewise.
5675 * misc.c (GC_new_free_list_inner, GC_new_free_list,
5676 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
5677 Likewise.
5678 * include/gc_backptr.h (GC_get_back_ptr_info,
5679 GC_generate_random_heap_address, GC_generate_random_valid_address,
5680 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
5681 GC_CALL to function prototype.
5682 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
5683 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
5684 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
5685 GC_register_describe_type_fn): Likewise.
5686 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
5687 GC_generic_malloc_words_small): Likewise.
5688 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
5689 * include/private/gc_pmark.h: Likewise.
5690 * include/private/gc_priv.h: Likewise.
5691 * tests/test.c: Likewise.
5692 * gc_cpp.cc: Define GC_BUILD.
5693 * include/private/gc_pmark.h: Likewise.
5694 * include/private/gc_priv.h: Likewise.
5695 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
5696 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
5697 definition.
5698 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
5699 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
5700 pthread_detach, pthread_create): Likewise.
5701 * win32_threads.c (GC_pthread_join, GC_pthread_create,
5702 GC_pthread_sigmask, GC_pthread_detach): Likewise.
5703 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
5704 * include/gc_backptr.h: Include "gc.h".
5705 * include/gc_backptr.h: Use extern "C" for the exported functions.
5706 * include/gc_mark.h: Likewise.
5707 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
5708 GC_XXX_THREADS is defined.
5709 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
5710 Move the definitions below the place where GC_NETBSD_THREADS and
5711 GC_DGUX386_THREADS are defined.
5712 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
5713 is defined) for GCC.
5714 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
5715 same way as for VC++); define for GCC v4+ (other than already
5716 recognized MinGW/Cygwin) as a "default" visibility attribute if
5717 GC_DLL is defined.
5718 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
5719 New macro.
5720 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5721 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5722 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5723 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5724 GC_debug_malloc_atomic, GC_debug_strdup,
5725 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5726 GC_debug_malloc_ignore_off_page,
5727 GC_debug_malloc_atomic_ignore_off_page,
5728 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
5729 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5730 GC_gcj_malloc_ignore_off_page): Likewise.
5731 * include/gc.h (GC_malloc, GC_malloc_atomic,
5732 GC_malloc_uncollectable, GC_malloc_stubborn,
5733 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5734 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5735 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
5736 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
5737 GC_debug_malloc_atomic_ignore_off_page,
5738 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
5739 (for the first argument).
5740 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5741 GC_gcj_malloc_ignore_off_page): Likewise.
5742 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
5743 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
5744 (for the second argument).
5745 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5746 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5747 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
5748 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
5749 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
5750 GC_register_displacement, GC_debug_register_displacement,
5751 GC_try_to_collect, GC_malloc_ignore_off_page,
5752 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5753 GC_debug_malloc_atomic, GC_debug_strdup,
5754 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5755 GC_debug_malloc_ignore_off_page,
5756 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
5757 GC_debug_realloc, GC_debug_malloc_replacement,
5758 GC_debug_realloc_replacement, GC_finalization_proc,
5759 GC_register_finalizer, GC_debug_register_finalizer,
5760 GC_register_finalizer_ignore_self,
5761 GC_debug_register_finalizer_ignore_self,
5762 GC_register_finalizer_no_order,
5763 GC_debug_register_finalizer_no_order,
5764 GC_register_finalizer_unreachable,
5765 GC_debug_register_finalizer_unreachable,
5766 GC_register_disappearing_link,
5767 GC_general_register_disappearing_link,
5768 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
5769 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
5770 GC_call_with_alloc_lock, GC_stack_base_func,
5771 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
5772 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
5773 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
5774 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
5775 GC_endthreadex): Comment out (or remove if single and meaningless)
5776 function argument names (to avoid identifiers out of the name
5777 space).
5778 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
5779 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
5780 * include/gc.h (GC_try_to_collect): Update the comment.
5781 * include/gc.h (GC_size, GC_register_my_thread): Add const
5782 qualifier for the argument referent.
5783 * misc.c (GC_size): Likewise.
5784 * pthread_support.c (GC_register_my_thread_inner,
5785 GC_register_my_thread): Likewise.
5786 * win32_threads.c (GC_register_my_thread_inner,
5787 GC_register_my_thread): Likewise.
5788 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
5789 (define instead of GC_INIT() for Cygwin and AIX).
5790 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
5791 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
5792 GC_INITIAL_HEAP_SIZE): Recognize new macro.
5793 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
5794 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
5795 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
5796 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
5797 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
5798 * include/gc_mark.h: Prefix GC_H with '_'.
5799 * include/gc_mark.h (GC_least_plausible_heap_addr,
5800 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
5801 for the public variable declaration.
5802 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
5803 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
5804 * include/gc_pthread_redirects.h (GC_pthread_create,
5805 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
5806 Use GC_API for the wrapper prototype.
5807 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
5808 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
5809 before redirecting.
5810 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
5811 GC_incr_bytes_freed(); remove FIXME.
5812 * include/private/gc_priv.h (GC_make_closure,
5813 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
5814 function.
5815 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
5816 the target.
5817
5818 * finalize.c (GC_general_register_disappearing_link,
5819 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
5820 guard for LOCK/UNLOCK().
5821 * finalize.c (GC_general_register_disappearing_link,
5822 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
5823 the lock (to prevent data races).
5824 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
5825 GC_gcj_malloc_ignore_off_page): Likewise.
5826 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5827 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
5828 instead of GC_oom_fn (to prevent data races).
5829 * malloc.c (GC_generic_malloc): Likewise.
5830 * mallocx.c (GC_memalign): Likewise.
5831 * pthread_support.c (pthread_create): Likewise.
5832 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
5833 last_finalized_no value to prevent data races.
5834 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
5835 GC_set_find_leak, GC_set_finalize_on_demand,
5836 GC_set_java_finalization, GC_set_finalizer_notifier,
5837 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
5838 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
5839 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
5840 the comment.
5841 * misc.c (GC_set_oom_fn): Likewise.
5842 * include/gc.h (GC_general_register_disappearing_link): Refine the
5843 comment (replace "soft" word with "weak").
5844 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
5845 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
5846 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
5847 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
5848
5849 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
5850 "private/dbg_mlc.h" before it.
5851 * malloc.c: Likewise.
5852 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
5853 for WinCE (since deprecated); evaluate strlen() only once; don't
5854 set errno for WinCE.
5855 * malloc.c (GC_strdup): Likewise.
5856 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
5857 * include/gc.h (GC_unregister_my_thread): Refine the comment.
5858 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
5859 Don't declare for WinCE.
5860 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
5861 * include/gc.h (GC_WinMain): Remove GC_API.
5862 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
5863 lpCmdLine.
5864 * tests/test.c (GC_WinMain): Likewise.
5865 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
5866 * include/gc_config_macros.h (ptrdiff_t): Guard with
5867 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
5868 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
5869 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
5870 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
5871 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
5872 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
5873 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
5874 of include <atomic_ops.h>.
5875 * include/private/gc_priv.h: Likewise.
5876 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
5877 Don't export (replace GC_API to "extern").
5878 * win32_threads.c (GC_allocate_ml): Don't export.
5879 * include/private/gc_priv.h (DebugBreak): Define as macro for
5880 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
5881 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
5882 (since "UNALIGNED" is defined in winnt.h of WinCE).
5883 * mark.c (UNALIGNED): Likewise.
5884 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
5885 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
5886 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
5887 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
5888 for WinCE (since __declspec(thread) is unsupported).
5889 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
5890 Define for WinCE (if undefined).
5891 * malloc.c (GC_malloc): Remove outdated comment about disabling
5892 signals.
5893 * misc.c: Don't include <tchar.h> (since not used anymore and may
5894 break TEXT() macro defined in winnt.h).
5895 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
5896 InitializeCriticalSectionAndSpinCount() for WinCE.
5897 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
5898 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
5899 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
5900 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
5901 only); move the code from GC_write(); replace GETENV() with
5902 GetEnvironmentVariable(); replace CreateFileA() with
5903 CreateFile(); use TEXT() macro (for Unicode support); replace
5904 strcat() with memcpy() (since deprecated in WinCE).
5905 * misc.c (GC_write): Define as STATIC.
5906 * win32_threads.c (GC_attached_thread): Likewise.
5907 * misc.c (GC_write): Use GC_CreateLogFile().
5908 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
5909 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
5910 (Win32 only) if DONT_USE_USER32_DLL is defined.
5911 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
5912 WinCE).
5913 * misc.c (GC_abort): Use a more user-friendly abort if
5914 NO_DEBUGGING (Win32 only).
5915 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
5916 THREADS).
5917 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
5918 (for Unicode support); check GetModuleHandle() result.
5919 * tests/test.c: Don't define assert for WinCE (since may be
5920 redefined by "assert.h" included from libatomic_ops).
5921 * tests/test.c (FAIL): Define as ABORT for all targets (except
5922 for PCR).
5923 * tests/test.c (n_tests): Don't use AO_t.
5924 * tests/test.c (check_heap_stats): Don't cast n_tests.
5925 * tests/test.c (inc_int_counter): New function (for n_tests atomic
5926 incrementation).
5927 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
5928 * tests/test.c (run_one_test): Avoid unbalanced brackets in
5929 #if-#else-#endif blocks.
5930 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
5931 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
5932 * tests/test.c (check_heap_stats): Replace
5933 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
5934 "unreachable code" compiler warning.
5935 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
5936 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
5937 * tests/test.c (thr_window): Replace "L" string prefix with
5938 TEXT().
5939 * thread_local_alloc.c: Check THREADS is defined (to prevent other
5940 compiler errors and warnings otherwise).
5941 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
5942 GC_use_DllMain()).
5943 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
5944 the comments for.
5945 * win32_threads.c (GC_register_my_thread_inner): Recognize
5946 DONT_IMPORT_GETCURTHREAD macro.
5947 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
5948 DllMain support if needed).
5949 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
5950 thread registration is unsupported for a given configuration.
5951 * win32_threads.c (GC_use_DllMain): Update the comment; refine
5952 ABORT message.
5953 * win32_threads.c (GC_use_DllMain,
5954 GC_started_thread_while_stopped, GC_register_my_thread_inner,
5955 GC_lookup_thread_inner, GC_delete_gc_thread,
5956 GC_allow_register_threads, GC_lookup_pthread,
5957 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
5958 Check for GC_NO_DLLMAIN.
5959 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
5960 DllMain): Don't define if GC_NO_DLLMAIN.
5961 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
5962 variables only if not GC_NO_DLLMAIN (to suppress compiler
5963 warning).
5964 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
5965 CreateThread() instead of _beginthreadex() for WinCE.
5966 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
5967 New macros defined (used by start_mark_threads(), WinMain()).
5968 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
5969 WinCE for now (since getenv(), GetProcessAffinityMask() and
5970 SignalObjectAndWait() are missing on WinCE).
5971 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
5972 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
5973 TEXT() macro (for Unicode support).
5974
5975 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
5976 callback).
5977 * include/gc.h (GC_register_has_static_roots_callback): Use
5978 GC_has_static_roots_func type.
5979 * dyn_load.c (GC_has_static_roots,
5980 GC_register_has_static_roots_callback): Likewise.
5981 * dyn_load.c (GC_has_static_roots,
5982 GC_register_has_static_roots_callback): Define on all platforms.
5983 * dyn_load.c (GC_register_dynlib_callback,
5984 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
5985 functions definition with the ANSI C one.
5986 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
5987 "callback" (initialized from GC_has_static_roots) to minimize data
5988 races.
5989 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
5990 GC_cond_add_roots): Define as STATIC.
5991 * mark_rts.c (GC_remove_roots_inner): Likewise.
5992 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
5993 sections smaller than pointer size (just to avoid acquiring the
5994 lock unnecessarily).
5995 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
5996 only for DARWIN_DEBUG).
5997 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
5998 LOCK + GC_add_roots_inner() + UNLOCK.
5999 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
6000 callback (if set) holding the lock; if it returns 0 then don't call
6001 GC_add_roots_inner() for that region.
6002 * dyn_load.c (GC_register_has_static_roots_callback): Put
6003 "callback" value to GC_has_static_roots on all platforms.
6004 * dyn_load.c (GC_has_static_roots): Update the comments.
6005 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
6006 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
6007 * include/private/gc_priv.h (struct roots): Likewise.
6008 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
6009 to mark_rts.c and declare it as STATIC.
6010 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
6011 prototype.
6012 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
6013 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
6014 * misc.c (GC_init_inner): Likewise.
6015 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
6016 all the code from GC_exclude_static_roots(); add the comment.
6017 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
6018 add alignment assertion for the lower bound; add assertion for the
6019 lower bound to be less than the upper one.
6020 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
6021 the upper bound (round down to be of a pointer-aligned value);
6022 return in case of an empty range.
6023 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
6024 GC_exclude_static_roots_inner().
6025 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
6026 in case of a do-nothing case (before acquiring the lock).
6027
6028 * finalize.c (GC_fail_count): New external variable declaration.
6029 * finalize.c (GC_reset_finalizer_nested,
6030 GC_check_finalizer_nested): New function declarations (if THREADS
6031 only).
6032 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
6033 static global variables (used internally by GC_finalize() and
6034 GC_check_finalizer_nested()).
6035 * finalize.c (GC_check_finalizer_nested): New static function
6036 definition (only if not THREADS, used internally by
6037 GC_notify_or_invoke_finalizers() to minimize the probability of
6038 a deep recursion when a client finalizer tries to allocate GC
6039 memory).
6040 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
6041 call GC_reset_finalizer_nested()) if last heap expansion failed.
6042 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
6043 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
6044 last_finalizer_notification variables holding the lock (to avoid
6045 data races).
6046 * finalize.c (GC_finalizer_notifier): Add comment.
6047 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
6048 for an empty finalization queue (only if THREADS and not
6049 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
6050 * finalize.c (GC_notify_or_invoke_finalizers): Call
6051 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
6052 if appropriate.
6053 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
6054 finalizer_nested and finalizer_skipped fields (for internal use
6055 by the multi-threaded GC_check_finalizer_nested()).
6056 * win32_threads.c (GC_Thread_Rep): Likewise.
6057 * pthread_support.c (GC_reset_finalizer_nested,
6058 GC_check_finalizer_nested): New function definitions (the
6059 multi-threaded variants of that in finalize.c).
6060 * win32_threads.c (GC_reset_finalizer_nested,
6061 GC_check_finalizer_nested): Likewise.
6062
6063 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
6064 anymore and GCC produces a warning for it).
6065 * alloc.c (GC_stopped_mark): Adjust printf argument type
6066 specifier.
6067 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
6068 the case when the configuration information comes from a config.h
6069 file).
6070 * checksums.c: Likewise.
6071 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
6072 keyword instead of "unused".
6073 * include/gc_allocator.h: Fix typos in comments.
6074 * thread_local_alloc.c: Likewise.
6075 * include/javaxfc.h (GC_finalize_all): Update comment.
6076 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
6077 GC_API and serves only as a marker for the private but exported
6078 symbols used by test.c only).
6079 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
6080 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
6081 GC_API_PRIV one.
6082 * include/private/gc_priv.h (GC_fo_entries): Don't export it
6083 outside a DLL.
6084 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
6085 designated to check the arguments correctness of printf-like
6086 functions (currently works only for GCC v3+).
6087 * include/private/gc_priv.h (GC_printf, GC_err_printf,
6088 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
6089
6090 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
6091 Define for FreeBSD 7.0+.
6092
6093 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
6094
6095 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
6096 comment.
6097
6098 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
6099 free blocks have different mapping status.  Correctly handle gap
6100 between blocks.
6101 (GC_split_block): Remove dead code setting hb_flags.  Add comment.
6102 (GC_allochblk): Split blocks also in generational-only mode.
6103 * os_dep.c (GC_unmap_gap): Don't really use munmap.
6104
6105 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
6106 not USE_MUNMAP case.
6107
6108 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
6109 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
6110 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
6111 PARALLEL_MARK, STATIC): Update the comments.
6112 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
6113 recognized (only if MPROTECT_VDB).
6114 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
6115 Add the comments for.
6116 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
6117 environment variable (only if MPROTECT_VDB, if the variable is
6118 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
6119 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
6120 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
6121 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
6122 the future).
6123 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
6124 space returned to OS (GC_unmapped_bytes).
6125 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
6126 comments.
6127 * misc.c (GC_get_unmapped_bytes): New API function.
6128 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
6129 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
6130 "ifdef MSWIN32" one (for Cygwin).
6131
6132 * pthread_support.c (GC_allow_register_threads): New API function.
6133 * win32_threads.c (GC_allow_register_threads): Likewise.
6134 * include/gc.h (GC_allow_register_threads): New API prototype.
6135 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
6136 Update the comments.
6137 * pthread_support.c (GC_register_my_thread): Check the collector
6138 is in the multi-threaded mode.
6139 * win32_threads.c (GC_register_my_thread): Likewise.
6140
6141 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
6142 instead, following Ivan's original patch.
6143
6144 * allchblk.c (GC_allochblk_nth): Add assertion.
6145 * checksums.c: Add GC_record_fault, GC_was_faulted,
6146 CC_n_faulted_dirty_errors.
6147 (GC_check_dirty): Remove register declarations, print
6148 dirty bit errors on faulted pages.
6149 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
6150 * os_dep.c (GC_remove_protection): Compute index correctly.
6151
6152
6153 == [7.2alpha2] 2009-06-12 ==
6154
6155 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
6156 calls into a single one (for output atomicity).
6157 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
6158 GC_finalization_failures variable; check the result of
6159 GC_general_register_disappearing_link() (for lack of memory)
6160 instead.
6161 * finalize.c (GC_finalization_failures): Remove unused global
6162 variable.
6163 * finalize.c (GC_general_register_disappearing_link,
6164 GC_general_register_disappearing_link): Don't update the value of
6165 GC_finalization_failures (since unused).
6166 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
6167 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
6168 word type now (as FIXUP_POINTER requires numeric argument).
6169 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
6170 requires the first parameter of word type.
6171 * mark.c (PUSH_GRANULE): Likewise.
6172 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
6173 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
6174 GC_finalizer_notifier directly, instead
6175 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
6176 * include/javaxfc.h: Clarify GC_finalize_all comment.
6177 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
6178 after) for configuration information.
6179 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
6180 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
6181 variable for NULL before dereferencing it, return GC_oom_fn() in
6182 this case.
6183 * typd_mlc.c (GC_malloc_explicitly_typed,
6184 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
6185 suppress compiler warning (for uninitialized "lg" variable).
6186
6187 * win32_threads.c (GC_unregister_my_thread): add false assertion
6188 in unreachable code.
6189
6190 * pthread_support.c (GC_inner_start_routine): Don't release the
6191 GC lock between GC_register_my_thread_inner() and
6192 GC_init_thread_local() calls (post the "registered" even after
6193 calling GC_init_thread_local()).
6194 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
6195 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
6196 acquire the GC lock only once.
6197 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
6198 directly instead of GC_register_my_thread() since I_HOLD_LOCK
6199 and our (main) thread is not registered yet (add assertion for it).
6200 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
6201 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
6202 * win32_threads.c (GC_lookup_thread): Remove unused function.
6203 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
6204 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
6205 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
6206 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
6207 (for Cygwin).
6208 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
6209 (inside GC_ASSERT) to prevent compiler warning.
6210 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
6211 PARALLEL_MARK.
6212 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
6213 to a place before GC_get_next_stack().
6214 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
6215 as in pthread_support.c).
6216 * win32_threads.c (marker_last_stack_min): New static arrays (the
6217 same semantics as for last_stack_min of GC_Thread_Rep).
6218 * win32_threads.c (GC_get_next_stack): Handle marker threads.
6219 * win32_threads.c (GC_mark_thread): Save the current stack pointer
6220 to marker_[b]sp.
6221 * win32_threads.c (start_mark_threads): Initialize
6222 marker_last_stack_min elements (to "unset" value).
6223
6224 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
6225 GC_set_finalize_on_demand, GC_set_java_finalization,
6226 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
6227 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
6228 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
6229 Change return type to void (these API functions no longer return
6230 the old value).
6231 * include/gc.h: Likewise.
6232 * tests/test.c (main, WinMain, test): Remove explicit cast to void
6233 for GC_set_warn_proc().
6234 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
6235 GC_get_finalize_on_demand, GC_get_java_finalization,
6236 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
6237 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
6238 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
6239 API functions (to get the current value of the corresponding R/W
6240 public variables).
6241 * include/gc.h: Likewise.
6242 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
6243 Update the comment.
6244 * misc.c (GC_ignore_warn_proc): New API call-back function.
6245 * include/gc.h (GC_ignore_warn_proc): Likewise.
6246 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
6247 GC_get_non_gc_bytes): New API setter and getter functions (for the
6248 public GC_find_leak and GC_non_gc_bytes variables, respectively).
6249 * include/gc.h: Likewise.
6250 * include/gc.h (GC_memalign): Add proto to GC API.
6251 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
6252 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
6253 remove GC_memalign() proto.
6254 * misc.c (GC_write): Use multi-byte (A) variants of Win32
6255 GetModuleFileName() and CreateFile().
6256 * tests/test.c (main): Replace K&R-style function definition with the
6257 ANSI C one.
6258
6259 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
6260 recognized (for Linux on ARM32 without glibc).
6261 * include/private/gcconfig.h (STRTOULL): Define for all targets
6262 (define as "strtoul" for most targets except for LLP64/Win64).
6263 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
6264 (cast the result to word type) to decode values of "GC_TRACE",
6265 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
6266 variables.
6267
6268 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
6269 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
6270
6271 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
6272 AO_load in assertion.
6273
6274 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
6275 is defined as FALSE (otherwise the size of dll_thread_table is near
6276 200 KiB for 32-bit).
6277 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
6278 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
6279 backing_store_ptr fields for IA64 support.
6280 * win32_threads.c (GC_register_my_thread_inner): Set
6281 backing_store_end field to reg_base value for IA64 (same as in
6282 pthread_support.c).
6283 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
6284 "right" places, remove ';'.
6285 * win32_threads.c (GC_fault_handler_lock): Declare only
6286 if MPROTECT_VDB (and not WinCE).
6287 * win32_threads.c (GC_suspend): Acquire and release
6288 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
6289 * win32_threads.c (GC_suspend): Define as STATIC.
6290 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
6291 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
6292 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
6293 calls into a single one (for output atomicity).
6294 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
6295 before altering its last_stack_min ("thread" variable is added).
6296 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
6297 "s" is non-NULL.
6298 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
6299 if WinCE.
6300 * win32_threads.c (GC_get_next_stack): Pass current_min value to
6301 GC_get_stack_min as-is (without -1).
6302 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
6303 version of AO_fetch_and_sub1().
6304 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
6305 to pointer (and vice versa) thru word type to suppress warnings.
6306 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
6307 access atomically.
6308 * misc.c: Change GC_THREADS tests back to THREADS.
6309
6310 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
6311 a group of printf() calls into a single one (for output atomicity).
6312 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
6313 GC_set_time_limit): New prototypes.
6314 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
6315 GC_set_time_limit): New public setter/getter functions.
6316 * include/gc.h: Fix (and remove outdated) comments for thread-local
6317 allocation.
6318 * include/gc.h: Fix typos in comments.
6319 * misc.c (GC_init_inner, GC_printf): Likewise.
6320 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
6321 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
6322 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6323 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
6324 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6325 GC_bytes_allocd_at_reset): Define as STATIC.
6326 * misc.c (GC_get_heap_size, GC_get_free_bytes,
6327 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
6328 avoid data races.
6329 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
6330 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
6331 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
6332 set the default initial value of initial_heap_sz.
6333 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
6334 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
6335 word-compliant, "%p" is used w/o "0x").
6336 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
6337 environment variable if SMALL_CONFIG.
6338 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
6339 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
6340 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
6341 * doc/README.environment (GC_MARKERS): Refine information.
6342 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
6343 possible.
6344 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
6345 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
6346 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
6347 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
6348 (to prevent possible infinite recursion).
6349
6350 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
6351 with ANSI C one.
6352 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
6353 GC_enqueue_all_finalizers): Remove outdated comments about disabling
6354 signals.
6355 * finalize.c (GC_general_register_disappearing_link): Fix assertion
6356 to catch NULL "obj" value.
6357 * finalize.c (GC_unregister_disappearing_link): Check "link"
6358 alignment before gaining the lock.
6359 * finalize.c (GC_finalize): Refine comment.
6360 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
6361 word-compliant, "%p" is used w/o "0x").
6362 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
6363 variable (to 0) to suppress compiler warning.
6364 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
6365 * include/gc_gcj.h: add "extern C" header and tail.
6366 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
6367 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
6368 the comments to the place where these symbols are defined in mark.c).
6369 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
6370 GC_mark_some_inner, if PARALLEL_MARK only).
6371 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
6372 GC_active_count, GC_do_parallel_mark): Define as STATIC.
6373 * pthread_support.c (GC_mark_thread): Likewise.
6374 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
6375 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
6376 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
6377 GC_arobjfreelist): Likewise.
6378 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
6379 for HBLKSIZE to GC_STATIC_ASSERT.
6380 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
6381 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
6382 * pthread_support.c (GC_do_blocking_inner): Likewise.
6383 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
6384 switch branch to suppress compiler warning.
6385 * mark.c (GC_return_mark_stack): Append new-line to printf message.
6386 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
6387 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
6388 suppress compiler warning.
6389 * pthread_support.c (start_mark_threads): Move the code limiting
6390 "GC_markers" value (and printing a warning) to GC_thr_init().
6391 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
6392 if based on the number of CPUs.
6393 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
6394 values as one.
6395 * pthread_support.c (GC_register_my_thread_inner): Add a check for
6396 "stack_end" is non-NULL (the same as in win32_threads.c).
6397 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
6398 with ENOMEM.
6399 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
6400 to "while" one to suppress "possible extraneous ';'" warning.
6401
6402 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
6403 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
6404 (Darwin only).
6405 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
6406 * include/private/gcconfig.h (ARM32): Define config parameters for
6407 DARWIN (iPhone).
6408
6409 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
6410 GC_TIME_LIMIT): New macros (used to control the default initial
6411 values of GC_full_freq variable, GC_dont_expand,
6412 GC_free_space_divisor, GC_time_limit respectively).
6413 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
6414 with GC_TIME_LIMIT in alloc.c).
6415 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
6416 Define as STATIC.
6417 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
6418 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
6419 Move the prototypes to alloc.c, make STATIC.
6420 * include/private/gc_priv.h (GC_push_current_stack,
6421 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
6422 (move the comments to the places where these functions are defined).
6423 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
6424 as STATIC.
6425 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
6426 GC_print_heap_sects): Convert a group of printf() calls into
6427 a single one (for output atomicity).
6428 * mark_rts.c (GC_print_static_roots): Likewise.
6429 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
6430 convenience to delimit collections.
6431 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
6432 make "frames" local variable volatile (to prevent optimization).
6433 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6434 GC_finish_collection, GC_allocobj): Remove outdated comments about
6435 disabling signals.
6436 * include/private/gc_priv.h (GC_register_displacement_inner,
6437 GC_gcollect_inner): Likewise.
6438 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6439 GC_finish_collection): Initialize "start_time" local variable (to 0)
6440 to suppress compiler warning.
6441 * mark_rts.c (GC_add_roots_inner): Likewise.
6442 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
6443 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
6444 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
6445 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
6446 K&R-style function prototypes with ANSI C one.
6447 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
6448 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
6449 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
6450 macros.
6451 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
6452 same as for Watcom.
6453 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
6454
6455 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
6456 outdated comment about disabling signals.
6457 * mallocx.c (GC_malloc_uncollectable,
6458 GC_malloc_atomic_uncollectable): Likewise.
6459 * os_dep.c: Likewise.
6460 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
6461 Add ARGSUSED tag.
6462 * pthread_stop_world.c (GC_suspend_handler,
6463 GC_suspend_handler_inner): Likewise.
6464 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
6465 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
6466 switch branch to suppress compiler warning.
6467 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
6468 * include/private/darwin_semaphore.h (sem_init): Likewise.
6469 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
6470 * include/private/dbg_mlc.h (GC_has_other_debug_info,
6471 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
6472 C one.
6473 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
6474 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
6475 * include/private/pthread_support.h (GC_stop_init): Likewise.
6476 * include/private/gcconfig.h: Refine comment about setting
6477 GC_stackbottom.
6478 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
6479 "right" places.
6480 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
6481 for "stack_end" field.
6482 * mallocx.c (GC_malloc_uncollectable,
6483 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
6484 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
6485 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
6486 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
6487 format specifier (should be word-compliant, "%p" is used w/o "0x").
6488 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
6489 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
6490 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
6491 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
6492 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
6493 as STATIC.
6494 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
6495 "thread_blocked" is not set for the current thread.
6496 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
6497 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
6498 suppress compiler warning.
6499
6500 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
6501
6502 * win32_threads.c: restructure parallel marking mutex initialization.
6503 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
6504 pthread_stop_world.c, pthread_support.c: Add runtime conditions
6505 on GC_parallel were appropriate.
6506 * pthread_support.c: Condition marker_bsp on ia64.
6507 (GC_segment_is_thread_stack): Fix loop upper bound.
6508 * reclaim.c: Limit some assertions to PARALLEL_MARK.
6509 * pthread_support.c: Don't acquire mark lock for thread-local
6510 allocation.
6511 * include/private/gc_priv.h: Don't define parallel mark sync
6512 support just for THREAD_LOCAL_ALLOC.
6513
6514 * include/private/gcconfig.h: refine MINGW32 test.
6515 * mark.c: Add win64/gcc tests.
6516
6517 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
6518 typed_test, run_one_test, check_heap_stats, main, test): Replace
6519 all K&R-style function definitions with ANSI C ones.
6520 * trace_test.c (main): Likewise.
6521 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6522 THREAD_LOCAL_ALLOC.
6523 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
6524 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
6525 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
6526 local variables (to suppress "assigned value is never used"
6527 compiler warning).
6528 * test.c (tree_test): Use public GC_noop1() instead of private
6529 GC_noop().
6530 * test.c (typed_test): Likewise.
6531 * test.c (check_heap_stats): Define and assign value to
6532 "late_finalize_count" local variable only if its value is used
6533 (if FINALIZE_ON_DEMAND defined).
6534 * test.c (main): Remove DJGPP-specific initialization of
6535 GC_stackbottom (not needed anymore, handled in gcconfig.h).
6536 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
6537 * trace_test.c: Include "gc_backptr.h".
6538 * trace_test.c (main): Call GC_INIT().
6539 * trace_test.c (main): Add "return 0" statement.
6540
6541 * dyn_load.c (GC_register_dynlib_callback): Use new index j
6542 instead of i in the inner loop.
6543
6544 * tests/test.c: Increment n_tests with fetch_and_add when possible,
6545 avoiding need to export lock.
6546
6547 * include/gc_pthread_redirects.h:
6548 - dlfcn.h is included for dlopen() proto before undefining
6549 "dlopen" (so, it's possible now to include dlfcn.h after
6550 gc.h from user code);
6551 - GC_dlopen() proto is added (except for Darwin as
6552 it's missing there);
6553 - "dlopen" is explicitly undefined (before its redefinition).
6554 * include/gc.h:
6555 - "process.h" is included besides "windows.h"
6556 (for _beginthreadex/_endthreadex); win32 only.
6557 - GC_NO_THREAD_DECLS is moved to the right place
6558 (before closing "extern C").
6559 * pthread_support.c: Fix out of memory handling for Thread_Reps.
6560 * win32_threads.c: Don't include process.h on winCE,
6561 improve out of memory handling for thread structures, don't
6562 define GC_beginthreadex and GC_endthreadex for winCE.
6563
6564 * tests/test.c: Change gcj vtable decriptor type from size_t to
6565 GC_word.
6566
6567 * gcj_mlc.c: Add comment.
6568 * tests/test.c: Change NTEST to NTHREADS.  Fork 5 threads by default.
6569 Run reverse_test a second time in each thread.Add comments.
6570 Don't rely on AO_fetch_and_add.
6571
6572 * dyn_load.c (GC_register_dynlib_callback,
6573 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
6574 for GNU_PT_RELRO relocations.
6575
6576 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
6577 by GC_SOLARIS_THREADS.
6578 * include/gc.h: Improve finalizer documentation.
6579 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
6580 * pthread_stop_world.c, Makefile.dj: Fix typos.
6581
6582 * win32_threads.c (GC_new_thread): Make first_thread
6583 visible to the whole file.
6584 (UNPROTECT): New macro.
6585 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
6586 thread structures before writing.
6587 (GC_suspend): Acquire GC_fault_handler_lock before suspending
6588 thread.
6589 * os_dep.c: export GC_fault_handler_lock.
6590 (GC_remove_protection): Check if already unprotected.
6591
6592 * doc/README.win32: Add OpenWatcom warning.
6593 * include/private/gcconfig.h: Really check it in.
6594
6595 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
6596 code from gcc version.
6597 * os_dep.c: make gc compilable (optionally) for Cygwin with
6598 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
6599 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
6600 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
6601 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
6602 Watcom (Win32 only).  It works.
6603
6604 * mach_dep.c: Don't use __builtin_unwind_init for register
6605 state on PowerPC/Darwin.
6606
6607 * doc/gcdescr.html: Improve description of object freelist
6608 structure.
6609 * include/private/gc_priv.h: Fix comment for _size_map.
6610
6611 * os_dep.c (GC_linux_stack_base): Relax sanity test.
6612
6613 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
6614 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
6615
6616 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
6617 non-Cygwin win32.
6618
6619 * configure.ac: Enable thread-local allocation for sparc-linux.
6620
6621 * alloc.c (GC_try_to_collect): Remove duplicate initialization
6622 check.
6623 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
6624 threaded warnings.
6625 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
6626
6627 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
6628 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
6629 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
6630 thread_local_alloc.c.
6631 * misc.c: Refine comment.
6632
6633 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently.  Add FIXME
6634 comment.
6635
6636 * win32_threads.c (GC_push_stack_for): Yet another attempt
6637 at the stack_min finding logic.  Try to clean up the existing code
6638 while minimizing VirtualQuery calls.
6639 (GC_win32_start_inner): Register thread before GC_printf.
6640 Produce more output with DEBUG_THREADS.
6641 *include/gc.h: Update obsolete comments.
6642
6643 * tests/test.c:
6644 (gcj_class_struct2): Use cast instead of l suffix.
6645 Cast GetLastError to int in various places.
6646 Avoid unused result warning from incr/decr macros.
6647 Add cast for fake_gcj_mark_proc.
6648 Cast GC_gc_no to unsigned in printf.
6649
6650 * include/gc.h: Fix two typos in comments.
6651
6652 * finalize.c: Fix typo in comment.
6653
6654 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
6655 with lock.
6656
6657 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
6658 if we are checking for leaks.
6659
6660 * win32_threads.c: Remove mark lock spinning.
6661 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
6662 GC_spin_count, and GC_block_count using atomic operations.
6663 * tests/test.c: Declare n_tests as AO_t only if we have threads.
6664
6665 * win32_threads.c: Support PARALLEL_MARK.  Make printf arg
6666 types agree with format specifiers.
6667 Add STATIC for GC_threads.
6668 * include/private/gcconfig.h: Add FIXME comment.
6669 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
6670 AO_fetch_and_add1_full.  Declare n_tests as AO_t.
6671 (WinMain): Don't call GC_use_DllMain.
6672 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
6673
6674 * alloc.c (GC_try_to_collect_inner): Don't print redundant
6675 GC_bytes_allocd and GC_gc_no.
6676 (GC_stopped_mark): Print average world stop time.
6677 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
6678
6679 * misc.c, doc/README.environment: Add support  for
6680 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
6681 * include/gc.h: Make GC_set_free_space_divisor correspond to
6682 (somewhat unfortunate) reality.
6683
6684 (Mostly improves LLP64 support.)
6685 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
6686 misc.c, reclaim.c: Changed some int and long type to word or size_t
6687 (and vice versa where appropriate)
6688 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
6689 include/private/thread_local_alloc.h, mark.c,
6690 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
6691 casts to word type when casting from int to pointer (or pointer
6692 to int, or data pointer to code pointer) - just to remove the
6693 corresponding compiler warning.
6694 * ptr_chck.c (GC_is_visible): cast int const to word type to
6695 prevent left shift overflow.
6696 * os_dep.c: change the type of GC_mem_top_down global variable
6697 (containing a flag) to DWORD.
6698 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
6699 is defined on SunOS x86_64.
6700 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
6701 for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
6702 (the compiler gets hung if invoked with -Ox -D
6703 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
6704 * backgraph.c: cast GC_gc_no value to unsigned short when
6705 assigned/compared to height_gc_no field of back_edges.
6706 * os_dep.c (GC_remove_protection): Add ARGSUSED.
6707 * win32_threads.c (GC_thread_exit_proc): Remove unused local
6708 variable.
6709 * mark.c (GC_check_dirty): Move declaration out of func body.
6710
6711 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
6712 * include/gc.h (GC_register_my_thread): Improve comment.
6713
6714 * Makefile.direct: Add comment for -DCHECKSUMS.
6715
6716 * thread_local_alloc.c, include/private/thread_local_alloc.h:
6717 Fix typos in comments.
6718 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
6719 STATIC.
6720 * malloc.c (GC_free): Move size calculation below assertion.
6721
6722 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
6723 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
6724 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
6725
6726 * finalize.c (GC_general_register_disappearing_link): Add
6727 assertion.
6728 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
6729 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
6730 granules, not words.
6731
6732 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
6733 * configure.ac: Define mach_dep for sparc-linux.
6734
6735 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
6736 warning.
6737
6738 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
6739 order.
6740
6741 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
6742 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
6743 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
6744 include/javaxfc.h, include/private/gc_locks.h,
6745 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
6746 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
6747 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
6748 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
6749 * test.c: Remove some old K&R code.
6750
6751 * win32_threads.c (GC_may_be_in_stack): New.  (GC_Thread_Rep):
6752 Add last_stack_min.  (GC_push_stack_for): Use last_stack_min.
6753 (GC_get_next_stack): Add limit argument, use_last_stack_min.
6754 (GC_suspend): make stack_base assignment conditional.
6755 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
6756 GC_get_next_stack.
6757 * configure_atomic_ops.sh: Remove.
6758 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
6759 Makefile.direct: Partially support build directories whose path
6760 name contains blanks.
6761 * Makefile.am: Support new files (build_atomic_ops.sh,
6762 build_atomic_ops.sh.cygwin)
6763
6764 * include/private/gc_locks.h, include/private/gc_pmark.h,
6765 include/private/gc_priv.h, include/private/gcconfig.h,
6766 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
6767 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
6768 Fix comments.
6769
6770 * pthread_support.c: Comment out LOCK_STATS.
6771 * include/gc.h: Fix comments.
6772
6773 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
6774 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
6775 * os_dep.c (GC_get_main_stack_base): Use alternate definition
6776 with USE_MMAP.
6777 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
6778
6779 * doc/README: Make it clearer when Makefile.direct is assumed.
6780 * cord/cord.am: install include/cord.h.
6781
6782 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
6783 Remove unused variables.
6784 * darwin_stop_world.c: Always declare GC_thr_init().
6785 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
6786 SHORT_DBG_HDRS is defined.
6787 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
6788 mark, USE_MARK_BITS version): Refer to correct parameter name.
6789
6790 * finalize.c (GC_general_register_disappearing_link): Remove
6791 redundant code.
6792 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
6793 * os_dep.c: (GC_write_fault_handler): Remove remaining
6794 references to deleted variable "code".  Remove redundant
6795 FREEBSD definitions.
6796 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
6797 defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
6798
6799 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
6800
6801 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
6802 smashed string, (GC_debug_free_inner): Mark as free.
6803 * mallocx.c (GC_malloc_many): Always clear new block if
6804 GC_debugging_started.
6805 * reclaim.c: Move GC_debugging_started from
6806 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
6807 which is also called directly.
6808 * doc/README: Fix spelling error.  Update license summary.
6809 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
6810 * tests/test.c: Don't define GC_DEBUG if already defined.
6811
6812 * doc/simple_example.html: update --enable-full-debug reference,
6813 Make HTML formatting standards compliant.
6814 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
6815 * doc/gcinterface.html: specify encoding.
6816
6817 * doc/simple_example.html: Update thread-local allocation
6818 description.
6819
6820 * configure.ac: Check for gc-debug earlier; replace remaining
6821 full-debug tests.
6822 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
6823 Use signed offset type.  Use ptr_t internally.
6824 * doc/gcinterface.html: Update LOCAL_MALLOC description.
6825 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
6826 Fix full-debug reference.
6827 * include/gc.h: Rewrite GC_..._INCR and friends.
6828 * tests/test.c: Minimally test GC_..._INCR and friends.
6829
6830 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
6831 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
6832 on free hblk.
6833 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
6834 (GC_header_cache_miss): Always blacklist pointers for free
6835 hblks.  Add assertion and comment.
6836 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
6837 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
6838 Delete it.
6839 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
6840
6841 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
6842
6843 * configure.ac: Set win32_threads on MinGW.
6844
6845 Ivan's description of the patch follows. Note that a few pieces like
6846 the GC_malloc(0) patch, were not applied since an alternate had been
6847 previously applied.  A few differed stylistically from the rest of
6848 the code (mostly casts to void * instead of target type),
6849 or were classified as too minor to bother.  Note that
6850 all of Ivan's static declarations which did not correct outright
6851 naming bugs (as a few did), where replaced by STATIC, which is
6852 ignored by default.
6853
6854 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
6855 GC_malloc(0));
6856 - addition of missing getter/setter functions for public variables
6857 (may be useful if compiled as Win32 DLL);
6858 - addition of missing GC_API for some exported functions;
6859 - addition of missing "static" declarator for internal functions
6860 and variables (where possible);
6861 - replacement of all remaining K&R-style definitions with ANSI
6862 C ones (__STDC__ macro is not used anymore);
6863 - addition of some Win32 macro definitions (that may be missing in
6864 the standard headers supplied with a compiler) for GWW_VDB mode;
6865 - elimination of most compiler warnings (except for
6866 "uninitialized data" warning);
6867 - several typos correction;
6868 - missing parenthesis addition in macros in some header files of
6869 "libatomic_ops" module.
6870
6871 My highlights based on reading the patch:
6872
6873 * allchblk.c: Remove GC_freehblk_ptr decl.
6874 Make free_list_index_of() static.
6875 * include/gc.h: Use __int64 on win64, define GC_oom_func,
6876 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
6877 add getter and setters: GC_get_gc_no, GC_get_parallel,
6878 GC_set_oom_fn, GC_set_finalize_on_demand,
6879 GC_set_java_finalization, GC_set_dont_expand,
6880 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
6881 GC_set_finalizer_notifier.  Always define GC_win32_free_heap.
6882 gc_config_macros.h: Define _REENTRANT after processing
6883 GC_THREADS.
6884 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
6885 handling of operator new[] for old Windows compilers.
6886 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
6887 around arguments.
6888 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
6889 * mark.c (GC_mark_and_push_stack): Fix source argument for
6890 blacklist printing.
6891 * misc.c: Fix log file naming based on environment variable
6892 for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
6893 just return current value with 0 argument.  Add DONT_USE_USER32_DLL.
6894 Add various getters and setters as in gc.h.
6895 * os_dep.c: Remove no longer used GC_disable/enable_signals
6896 implementations.  (GC_get_stack_base): Add pthread_attr_destroy
6897 call.  No longer set GC_old_bus_handler in DARWIN workaround.
6898 * pthread_support.c: GC_register_my_thread must also
6899 call GC_init_thread_local.
6900
6901 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
6902 * mach_dep.c: Include signal.h.
6903 * gc_priv.h: Factor out INLINE declaration.
6904
6905 * include/private/gcconfig.h: Update MIPS/LINUX config.
6906 * doc/gcdescr.html: Fix typo.
6907 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
6908 for MIPS/LINUX.
6909
6910 * configure.ac: SPARC fixes.
6911 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
6912 size 0, except for gcj.
6913 * doc/gc.man: Expand C++ cautions.
6914 * include/gc_inline.h: Fix comments.
6915
6916
6917 == [7.1] 2008-05-03 ==
6918
6919 * doc/gcinterface.html: Improve C++ interface documentation.
6920
6921 * allchblk.c (GC_allochblk): Check for overflow during size
6922 rounding.
6923 * tests/huge_test.c: New.
6924 * Makefile.direct, tests/tests.am: Add huge_test.c
6925
6926 * pthread_support.c: Fix typo in comment.
6927 * os_dep.c (GC_win32_get_mem): Add heap section only if
6928 allocation succeeded.
6929
6930 * malloc.c: (free replacement) Fix caller address space check.
6931
6932 * finalize.c (GC_grow_table): Dereference table in null-check.
6933
6934 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
6935 Consistently call CloseHandle. (GC_suspend): Call
6936 GC_delete_gc_thread.
6937 * tests/test.c: Don't reference GC_print_stats if not exported.
6938
6939 * tests/test.c (run_one_test): Don't mention pthread_self().
6940 * misc.c: Declare GC_thr_init().
6941
6942 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
6943 and refine assertions to handle huge unmergable blocks.
6944 (GC_allochblk_nth): Add comment.
6945
6946 * include/private/gcconfig.h: Add missing FREEBSD macro
6947 consistency test.
6948
6949 * allchblk.c (GC_enough_large_bytes_left): No longer take
6950 parameters; return free list index bound.
6951 (GC_merge_unmapped): Don't access nexthdr until after null test.
6952 (Fixes bug in 1/29/08 check-in.)  (GC_allochblk): Calculate
6953 when splitting is allowable only once here, not when considering each
6954 block. (GC_allchblk_nth): Accept new may_split parameter.
6955 Avoid some redundant tests for exact size matches.
6956 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
6957 (GC_maybe_gc): Make locking assertion testable.
6958 * mark_rts.c: Fix indentation.
6959 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
6960 * tests/test.c: Remove (void) casts.  Optionally print some
6961 timing information.
6962
6963 * windows-untested/gc.def: Remove CreateThread line.
6964 * windows-untested/README: New file.
6965 * win32_threads.c (GC_use_DllMain): Force collector initialization.
6966 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
6967 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
6968 * include/gc_cpp.h: Add matching placement delete overloads
6969 everywhere.
6970 * include/private/gc_locks.h (NO_THREAD): Add cast.
6971 * include/private/gcconfig.h: Add test for __HP_aCC.
6972 * configure.ac, tests/tests.am:  Avoid libgccpp on HP/UX.
6973
6974 * doc/README.win32: Fix typo.
6975 * configure.ac: Fix printing of enable-shared result.
6976
6977 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
6978 defined.  (GC_call_with_stack_base): Add GC_API.
6979 * os_dep.c (GC_get_stack_base): Add GC_API.
6980 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
6981 Add GC_API.
6982 * include/gc.h: Add GC_API annotations.
6983 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
6984 PCR.
6985 * include/private/gc_pmark.h: Fix comments.
6986
6987 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
6988 Add GC_push_typed_structures() to push GC_ext_descriptors.
6989
6990 * tests/test.c: Call GC_INIT for DARWIN; test system type using
6991 gcconfig.h-defined macros.
6992
6993 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
6994 blocks large enough that their size, when interpreted as a signed
6995 value, would be negative.
6996 * include/private/gc_priv.h: Comment hb_sz range limit.
6997
6998 * mark.c (GC_push_next_marked): correct comment.
6999 * Makefile.direct: document NO_PROC_STAT.
7000 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
7001
7002
7003 == [7.1alpha2] 2008-01-10 ==
7004
7005 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
7006 again.  Refer to build directory as ".".
7007
7008 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
7009 * darwin_stop_world.c: Add FIXME comment for parallel marker.
7010
7011 * include/private/gc_priv.h: Update MAX_ROOT_SETS
7012 and LOG_PHT_ENTRIES to handle larger heaps.
7013
7014 * include/gc.h (GC_INIT,GC_init): Update comments.
7015
7016 * allchblk.c, alloc.c, include/private/gc_priv.h:
7017 Track GC_bytes_dropped and use in GC triggering decisions.
7018 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
7019
7020 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
7021 adjusting p.
7022
7023 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
7024
7025 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
7026 * alloc.c: Add declaration for GC_add_current_malloc_heap.
7027 * win32_threads.c (GC_beginthreadex): Clean up error
7028 return code.
7029 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
7030 Add NT_X64_THREADS_MAKEFILE.
7031
7032 * alloc.c: Define GC_version instead of in version.h.
7033 * version.h: Remove.
7034 * include/gc_version.h: Move most of version.h here.
7035 * include/gc.h: Include gc_version.h.
7036 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
7037 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
7038 Adjust for version.h rename.
7039
7040 * configure.ac: Put libatomic_ops links in build directory.
7041 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
7042 as nodist sources.
7043
7044 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
7045 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
7046
7047 * alloc.c: Deal correctly with address wrapping for
7048 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
7049 * finalize.c, include/gc.h (GC_register_disappearing_link,
7050 GC_register_finalizer_inner): Improve out-of-memory handling.
7051 * include/private/gc_pmark.h: Fix comment spelling.
7052
7053 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
7054 in other contexts.
7055
7056 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
7057
7058 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
7059
7060 * allchblk.c, configure.ac (add --enable-munmap)
7061
7062 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
7063 GC_GETSECTBYNAME instead.
7064 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
7065 architecture (Darwin).
7066
7067 * reclaim.c (GC_bytes_found): Expand comment.
7068 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
7069 granules, not bytes, to GC_FAST_MALLOC_GRANS.
7070 * include/gc.h: Never include gc_local_alloc.h.
7071 * tests/test.c: Add size zero allocation tests.
7072
7073 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
7074 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
7075
7076 * Makefile.direct: Invoke $(MAKE) instead of make.
7077
7078 * doc/scale.html: Reflect gc7 thread local allocation behavior.
7079
7080 * include/extra/gc.h, include/extra/gc_cpp.h: New.
7081 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
7082 again.
7083
7084 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
7085 for HURD.
7086
7087 * include/private/gcconfig.h: Add Linux/mips-64 support.
7088
7089 * dbg_mlc.c: Use random() on all glibc systems.
7090 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
7091 HURD.  Add comment.
7092 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
7093 systems without SA_SIGINFO.
7094
7095 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
7096 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
7097 No longer test for RS6000.
7098
7099 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
7100 Maintain GC_our_memory and GC_n_memory.
7101 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
7102 (GC_print_all_smashed_proc): Pass client object address instead of
7103 base.
7104 * dyn_load.c (sort_heap_sects): New.  (GC_register_map_entries):
7105 Register sections that are contiguous and merged with our heap.
7106 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
7107 of libraries.
7108 * malloc.c (calloc): Check for special callers even with
7109 USE_PROC_FOR_LIBRARIES. Move assertion.  Add rudimentary
7110 malloc/free tracing.
7111 * misc.c: No longer call GC_init_lib_bounds explicitly.
7112 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
7113 initialize on demand.
7114 * tests/test.c: Call GC_INIT only when required.
7115
7116 * Makefile.direct: Remove comment fragment.
7117 * tests/tests.am: Add smashtest.
7118 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
7119 * pthread_support.c: Fix comment spelling.
7120 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
7121 GC_LINUX_THREADS and REDIRECT_MALLOC.
7122 * tests/smash_test.c: Initial check-in.
7123 * obj_map.c: Print log entry to correct file.
7124 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
7125
7126 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
7127 while world is still running.
7128 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
7129 with world stopped.
7130 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
7131 * misc.c (GC_init/GC_init_inner): Perform all work in
7132 GC_init_inner.
7133 * Makefile.direct: Expand -DUSE_MUNMAP comment.
7134
7135 * include/gc.h: Define uintptr_t explicitly for VC++6.
7136 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
7137 exist.
7138
7139
7140 == [7.0] 2007-07-02 ==
7141
7142 * include/gc_config_macros.h: Also check for IA64 when setting
7143 GC_HPUX_THREADS.
7144 * mallocx.c: Change my_bytes_allocd to signed_word.
7145 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
7146 (as opposed to pthreads) support.
7147
7148 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
7149 on ARM/Linux.  Check getcontext() return value.
7150
7151 * backgraph.c (per_object_func): Make argument types consistent.
7152 (GC_traverse_back_graph): Mark GC_deepest_obj.
7153
7154 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
7155 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
7156
7157 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
7158 anachronisms.
7159 * dyn_load.c: Partially support cygwin, but don't enable it yet.
7160
7161 * Makefile.am: Use -no-undefined for libgc.
7162 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
7163 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
7164 consistently.
7165 * misc.c: Fix some WARN calls.  Move GC_is_initialized setting and
7166 GC_thr_init() call.
7167 * os_dep.c: Consistently use WARN where appropriate.
7168 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test.  Instead
7169 remove inappropriate pthread.h include.
7170 * doc/README.linux: Remove some anachronisms.
7171
7172 * alloc.c: Also use GC_check_tls on non-Linux systems.
7173 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
7174 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
7175 with prototype.
7176
7177 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
7178 (GC_print_heap_sects): Use size_t instead of unsigned long.
7179 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
7180 context.
7181 * win32_threads.c, include/gc_config_macros.h: The last of Romano
7182 Paolo Tenca's patch.  Move stdint.h include to gc_config_macros.h.
7183 * include/gc_inline.h: Avoid gc_priv.h dependencies.
7184 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
7185
7186 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
7187 * mark_rts.c (GC_push_roots): Fix kind type.
7188
7189 * doc/README.win64: New file.
7190 * doc/doc.am, Makefile.direct: Add README.win64.
7191
7192 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
7193 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
7194 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
7195 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
7196 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
7197 win32_threads.c, cord/de_win.c, include/gc_mark.h,
7198 include/private/gc_hdrs.h, include/private/gc_pmark.h,
7199 include/private/gc_priv.h, tests/test_cpp.cc:
7200 Replace old style function declarations.  Clean up integral types.
7201 Remove register declarations.  The change in malloc.c and the
7202 "int descr" declaration in mark.c are the most likely to have
7203 been real bugs outside of win64.
7204 * msvc_dbg.c: Disable on win64.
7205 * win32_threads.c: Add AMD64 support.
7206 * include/gc.h: no backtrace on AMD64 for now.
7207
7208 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
7209
7210 * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
7211 Don't include windows.h in an extern "C" context.
7212 * include/private/gcconfig.h: Fix win64/X86_64 configuration.
7213 * tests/test.c: Eliminate more old style function definitions.
7214 Cleanup pointer and integer casts for win64.
7215 * tests/test_cpp.cc: Don't include gc_priv.h.
7216 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
7217 * NT_X64_STATIC_THREADS_MAKEFILE: New.
7218
7219 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK.  Ignore
7220 FINISHED threads for suspension.  (GC_pthread_join): Add
7221 pthread_self() cast.  (GC_pthread_start_inner): Execute cleanup
7222 handler when popping it.
7223 * include/private/gc_locks.h: Inline THREAD_EQUAL for
7224 GC_WIN32_PTHREADS.  Define USE_PTHREAD_LOCKS only if we have
7225 pthreads.
7226
7227 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
7228 tests/test.c: Accommodate GC_WIN32_PTHREADS.
7229 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
7230 * include/gc_config_macros.h: Define both PTHREADS and
7231 GC_WIN32_THREADS.
7232 * include/private/gc_locks.h: Nonstandard definitions of
7233 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
7234 * doc/README.win32, Makefile.direct: Include documentation
7235 for GC_WIN32_PTHREADS.
7236 * Makefile.direct: Remove some anachronisms in the documentation.
7237
7238 * Makefile.am: Move includes to bottom.  Add better library
7239 dependencies.  Increment library version.  Remove "SUBDIRS += .".
7240 * cord/cord.am, tests/tests.am: Add better library dependencies.
7241 Remove now unnecessary dependencies.
7242 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
7243 Move to define on all Windows platforms.  (_beginthread): define
7244 to generate error if used.
7245
7246 * include/private/gc_locks.h: Format to 80 columns.
7247
7248 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
7249 * NT_MAKEFILE: msvc_dbg.h is in include/private.  Don't use cvars
7250 rc.
7251 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
7252 case.
7253 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
7254 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
7255 * include/gc.h: Add GC_reachable_here().  (GC_WinMain): Add GC_API.
7256 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
7257 * tests/test.c: Add GC_reachable_here() call.
7258
7259 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
7260 * tests/thread_leak_test.c: Don't unconditionally define
7261 GC_LINUX_THREADS.
7262
7263 * Makefile.am: Remove extra_ldflags_libgc definition.
7264
7265 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
7266
7267 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
7268 value.
7269
7270
7271 == [7.0alpha9] 2007-05-15 ==
7272
7273 * Some gc6.9 changes.
7274 * Change FindTopOfStack decl in darwin_stop_world.c.
7275 * Move some static tests from misc.c to gcconfig.h.  Use #error.
7276 * Add GC_print_free_list() function (thanks to Bruce Hoult).
7277 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
7278 Barry DeFreese, and possibly other Debian maintainers).
7279 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
7280 Peter Wang).
7281 * Integrated various MacOSX patches and tried to reconcile them (thanks to
7282 Allan Hsu, several contributors at Apple, and probably others).
7283 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
7284
7285 * Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
7286 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
7287 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New.  GC_lock_holder: now
7288 unsigned long.  I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
7289 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
7290 NUMERIC_THREAD_ID, THREAD_EQUAL.
7291 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
7292 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
7293 ARM.
7294
7295 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
7296 GC_debug_register_finalizer_unreachable() patch from gcc tree.
7297 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
7298 to check GC has been initialized.
7299
7300 * include/gc_cpp.h: Documentation updates.
7301 * include/gc_config_macros.h: Don't check for __ppc__ to set
7302 DARWIN_THREADS.
7303 * Makefile.am: Include configure_atomic_ops.sh in dist.
7304
7305 * Makefile.am: Don't distribute copied atomic_ops files.  Include
7306 libatomic_ops with "make dist".
7307 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
7308 * win32_threads.c: Report error for Cygwin + GC_DLL.
7309
7310 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
7311 * cord/de_win.c: Rename and move AboutBox.  Call GC_INIT.  Remove
7312 MakeProcInstance anachronism.
7313 * doc/README.macros: Officially remove elif prohibition.
7314 Remove documentation for defunct SRC_M3 support.
7315 * include/gc.h: Remove more SRC_M3 references.
7316 * include/private/gcconfig.h: Remove still more SRC_M3 references.
7317 GC_SOLARIS_THREADS no longer needs to be checked separately.
7318
7319 * thread_local_alloc.c, include/private/thread_local_alloc.h:
7320 Spell __declspec correctly.
7321 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
7322
7323 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
7324
7325 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
7326 GC_started_thread_while_stopped.
7327 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
7328 * win32_threads.c: (client_has_run): remove,
7329 GC_started_thread_while_stopped, GC_attached_thread: add.
7330 (GC_push_all_stacks): Add verbose output.
7331 (DllMain): Avoid initializing collector or the like.
7332 Never update both thread tables.
7333 * doc/README.win32: Adjust GC_win32_dll_threads rules.
7334
7335 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
7336 GC_PRINT_VERBOSE_STATS.
7337
7338 * configure.ac: Comment out redundant
7339 AC_DEFINE(NO_EXECUTE_PERMISSION).
7340 * sparc_mach_dep.S: Remove single quote in comment.
7341 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
7342 * win32_threads.c: Include stdint.h for Mingw.  Add GC_API for DllMain.
7343 (GC_use_DllMain): Fix assertion.
7344
7345 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
7346 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
7347 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
7348 targets. Remove comments.
7349 Prepare ppc64 support for Darwin.
7350
7351 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
7352 Make i unsigned.
7353 (GC_stop_world): Likewise. Remove unused GC_thread p.
7354 (GC_start_world): Likewise.
7355
7356 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
7357 Remove double SIG_HNDLR_PTR definition.
7358 (GC_forward_exception): Fix compiler warnings, make i unsigned.
7359 Initialize thread_state to NULL.
7360 (catch_exception_raise): Fix compiler warnings, make i unsigned.
7361
7362 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
7363 also define for X86_64.
7364 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
7365 * README.changes: Point to ChangeLog.
7366
7367 * darwin_stop_world.c: Move THREAD_FLD defines to ...
7368 * include/private/gc_priv.h: ... here.
7369 Fix THREAD_STATE definitions for ppc64.
7370 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
7371 access.
7372
7373 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
7374 HAS_X86_THREAD_STATE32_*.
7375 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
7376 HAS_X86_THREAD_STATE64_*.
7377 Added value 1 in the above AC_DEFINE's. Important for the upcoming
7378 Leopard.
7379 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
7380 Removed __x86_64__ check in POWERPC section. Added base definitions
7381 for the X86_64 Darwin port.
7382 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
7383 to distinguish between 32 and 64-bit applications. Added definitions
7384 for X86_64 Darwin.
7385 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
7386 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
7387 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
7388 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
7389 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
7390 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
7391 Distinguish between getsectbynamefromheader_64 and
7392 getsectbynamefromheader.
7393 * os_dep.c (catch_exception_raise): Introduce exception definition for
7394 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
7395 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
7396
7397
7398 == [7.0alpha7] 2006-09-19 ==
7399
7400 * More 6.7 changes.
7401 * Declare GC_dump() in gc.h.
7402 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
7403 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
7404 Charles Mills).
7405 * Use #elif in the definitions of GET_MEM.
7406 * Overhaul porting.html.  Remove corresponding text from README.
7407 * Fix typo in DARWIN section of gcconfig.h.
7408 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
7409 * Update x86 AO_test_and_set implementation to use "=q".
7410 * Add $(EXEEXT) to many tests in tests/tests.am.  (Corresponds to a
7411 6.7 fix, which no longer applied.)
7412 * Fix Darwin/PPC port.
7413 * Fix Cygwin/threads port.
7414 * Fix gcj malloc support.
7415 * For GNU-style make, don't build libatomic_ops unless threads are requested.
7416 This should allow single-threaded builds on platforms which do not
7417 currently support libatomic_ops.
7418 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
7419 (Substantially improves things on HP/UX.)
7420 * Integrated Andrei Polushin's Visual C++ patches.  These provide for
7421 stack traces, better C++ debug support, and better log file handling.
7422 Note that these change the location of the log file to a the path of the
7423 executable with a .log extension.  To get the old behavior back, define
7424 OLD_WIN32_LOG_FILE.  For the time being, I'm checking his project
7425 files and the like into a windows-untested subdirectory.  They
7426 are almost certainly already out of date, but better than what we had
7427 before.
7428 * Fixed some win32 threads bugs, and added support for _beginthreadex.
7429 * Fix zero size thread local allocation so that explicit deallocation
7430 works correctly.
7431 * Removed serious bug in GC_malloc_uncollectable(large size).
7432 * Do not try to do thread-local gcj allocation in incremental mode.  There
7433 are races in setting up the descriptor.
7434 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
7435 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
7436 it can now spuriously return TRUE.
7437 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
7438 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
7439 and then switching to mmap if that fails.
7440 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
7441 * Fix REDIRECT_MALLOC with threads on Linux.  It now usually seems to work
7442 with ugly hacks that include having calloc behave differently when it is
7443 called from ld.so or the pthreads library.  A reasonable amount of
7444 infrastructure was added to support some of this.  (Thanks to Roland McGrath
7445 for ideas and information.)
7446 * Import various updated build scripts.
7447 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
7448 * Fix serious bugs in GC_malloc_atomic_uncollectable().
7449 * Return GC_SUCCESS form GC_get_stack_base().
7450 * Fix several atomic_ops problems on IA64 with HP Compiler.
7451 * Update to atomic_ops-1.2.
7452 * Fix hb_n_marks description and reclaim.c assertion.
7453 * Various additional win32 threads fixes.
7454 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
7455
7456
7457 == [7.0alpha5] 2005-09-29 ==
7458
7459 * More 6.6, 6.7 changes.
7460 * Some Solaris fixes, including some more general changes in how
7461 the assembly pieces of mach_dep.c are handled.
7462 * Removed a lot of SOLARIS_THREADS-specific code that was only
7463 needed with the old implementation.  This included many (mostly no-op)
7464 versions of GC_is_fresh.
7465 * Don't use atomic_ops in gc_locks.h unless we need threads.
7466 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
7467 * Removed Solaris GC_INIT hack.  It's a workaround for a long dead bug,
7468 and it seemed to be wrong anyway.
7469 * Changed win32_threads.c to require preprocessor-based interception
7470 of thread routines by default.  A client call to GC_use_DllMain is
7471 now required to get the old behavior in which DllMain is used to implicitly
7472 register threads.  This was done for uniformity with other platforms, and
7473 because the DllMain solution seemed to require very tricky code which,
7474 at least in the past, imposed hard bounds on the number of threads.
7475 * Many small changes to make thread support work again on Cygwin.
7476 * Moved definition of allocator lock etc. to pthread_support.c and
7477 win32_threads.c for those two cases.
7478 * Got rid of the FASTLOCK() machinery.  It doesn't seem useful on modern
7479 platforms.
7480 * Cleaned up the uncollectible allocation routines, speeding up the
7481 slower paths.  The code did enough unnecessary work off the critical path
7482 that the underlying logic was getting hard to extract.
7483 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL.  Indications
7484 are it just works, and I think the reasons for it not working disappeared
7485 a while ago.
7486 * Fixed bugs in hb_n_marks calculation and assertion.
7487 * Don't use __builtin_expect for pre-3.0 gcc.
7488 * Define GWW_VDB only for recent Microsoft tool chains.
7489 * Add overview.html to doc directory.
7490 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
7491 * Made thread local allocation sort of work with Cygwin.  The code should
7492 be there to deal with other Windows variants, But non-Cygwin Windows
7493 threads need more bug fixes.
7494
7495
7496 == [7.0alpha4] 2005-08-02 ==
7497
7498 * Various 6.5, 6.6 changes.
7499 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
7500 (thanks to Ben Maurer).
7501 * Integrated build patches from Davide Angelocola and Petter Urkedal.
7502 * Fix dynamic-linker-based pthread call redirection.
7503 * Renamed RS6000 to POWERPC/AIX.
7504 * Allow recovery from SIGSEGV in marker on Linux.  This works around
7505 a race in thread stack marking if /proc is used to find roots.  We do
7506 that by default with malloc redirection and threads.  This involved
7507 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
7508 * Added doc/porting.html file.
7509 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
7510 memory overwrite errors.
7511 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
7512 * Added GC_getattr_np-based GC_get_stack_base (untested).
7513 * Separated thread local allocation into a separate file and added the
7514 beginning of win32 support for that.
7515
7516
7517 == [7.0alpha3] 2005-04-28 ==
7518
7519 * Added support for dlopen-based interception of pthread functions.
7520 This is only half done.  The gc.h redefinitions currently interfere.
7521 * Integrated major automake overhaul from Petter Urkedal.
7522
7523
7524 == [7.0alpha2] 2005-04-07 ==
7525
7526 * GC_bytes_allocd was incremented by a possibly uninitialized variable
7527 in GC_generic_malloc_inner.  (Bug introduced in gc7.0alpha1.  Thanks
7528 to Ben Hutchings for tracking it down.)
7529 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
7530 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
7531 implementation for win32.
7532 * Removed pc_gc.tar and floppy targets in Makefile.direct.  Removed
7533 pc_excludes file.
7534 * No longer include GC_bytes_wasted when evaluating allocation progress.
7535 Since we are now counting live memory, it no longer makes sense.
7536 * Applied Davide Angelocola's configure patch.  There are now separate
7537 Makefile.am's in the cord and tests subdirectory, more tests, etc.
7538 * Renamed configure.in to configure.ac.
7539 * Merged a very small number of Nathanael Nerode's configure.ac
7540 cleanups from the gcc tree.  Unfortunately, that file is a bit
7541 different from ours.
7542 * Changed EINTR handling in sem_wait slightly.
7543 * Restructure the root marking code.  Remove all traces of
7544 USE_GENERIC_PUSH_REGS, and effectively make it the default.
7545 Make it easier to pass a context pointer to the mark routine, in
7546 case we ever want to do precise stack marking.
7547 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
7548 This remains undocumented, and only implemented for pthreads.  But it
7549 removes an otherwise unavoidable race with stores of callee-save
7550 registers.
7551 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case.  This
7552 resulted in bogus complaints in heap dumps.
7553 * Upgrade to libatomic_ops-1.0, and update build structure to match.
7554 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
7555 * Removed gc_local_alloc.h.  If THREAD_LOCAL_ALLOC is defined, the
7556 thread local allocation routines are now called automatically.
7557 * Renamed gc_inl.h back to gc_inline.h.  Changed the interface appreciably
7558 since locking has turned into a dominant issue, and in-line allocation
7559 only makes sense if it's no worse than thread-local allocation.
7560 Gc_inline.h is now also used to implement thread-local allocation.
7561 * Finished replacing stubborn allocation with manual write barrier.
7562 Untested.
7563 * Use thread-local allocation code by default.
7564 * Added GC_register_my_thread and friends for Posix and win32.
7565 * Patch for GWW_VDB from Ben Hutchings.
7566 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
7567 redefines GC_malloc.
7568 * Removed now unused AIX memory allocation code.
7569 * Various minor fixes for bugs introduced in 7.0alpha1.
7570
7571
7572 == [7.0alpha1] 2004-11-09 ==
7573
7574 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST.  Assume ANSI C compiler
7575 and use ANSI constructs unconditionally.
7576 * Introduce #elif and #error in some of the appropriate places.
7577 * Remove GC_printf cruft. Use stdargs.
7578 * Remove separate Solaris threads support.  Use the more generic Posix
7579 implementation.
7580 * Use atomic_ops for atomic operations and memory barriers.
7581 * Clean up MPROTECT_VDB implementation.  Use SA_SIGINFO wherever
7582 possible.
7583 * Remove broken SIGNALS stuff.
7584 * Use size_t instead of word, where appropriate.
7585 * Add .S.o rule to Makefile.am.
7586 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
7587 A/UX, HP), IBM PC/RTs and RISCOS/Irix4.  (I doubt the old code worked.
7588 If anyone cares, these should be easy to resurrect.)
7589 * Add EXPECT() in some critical places.
7590 * Redefined hb_sz and hb_body to deal with bytes rather than words.
7591 This affected a great deal of code.  I would like to consistently use
7592 byte offsets and sizes where there's not a convincing reason to do
7593 otherwise.
7594 * Redefined several other variables (GC_mem_found, GC_words_allocd)
7595 etc. to use units of bytes.  Most of these were also renamed to
7596 reflect that fact.
7597 * Killed as many "register" declarations as possible.
7598 * Partially replaced stubborn allocation with manual write barrier.
7599 It's currently broken.
7600 * Restructured mark code, to allow mark bits to be kept either on
7601 a per allocation granule or per object basis.  The emphasis is
7602 now on the -DUSE_MARK_BYTES option, since individual bits perform
7603 quite badly on hyper-threaded P4s, and are probably suboptimal on
7604 other architectures.  -DUSE_MARK_BITS is currently broken, and may
7605 be resurrected only for the single-threaded case.  This significantly
7606 reduced the cache footprint required by auxiliary GC data structures.
7607 It also reduces space overhead for small heaps.  It probably slows
7608 things down slightly if interior pointers are very common.
7609 * As part of the above, we now maintain an approximate count of set
7610 mark bits in each heap block.
7611 * As part of the above, the semantics of hb_map changed drastically.
7612 For MARK_BIT_PER_OBJ, it doesn't exist.  For MARK_BIT_PER_GRANULE,
7613 it is purely a way to replace a mod instruction with a table lookup.
7614 (Somewhat to my surprise, this still wins on modern hardware.)
7615 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros.  Everything is
7616 now controlled by GC_print_stats variable and GC_PRINT_STATS
7617 and new GC_PRINT_VERBOSE_STATS environment variables.
7618 * Add GC_log_printf and use it consistently for logging output.
7619 * Unconditionally count the objects we reclaim in the sweep phase.
7620 For thread local allocation, we need that anyway, and we expect
7621 that's increasingly the only case that matters.  And it simplifies
7622 the code.  In general expect minor performance hacks that benefit
7623 only the single-threaded case to disappear.
7624 * Remove GC_quiet from gc.h and elsewhere.
7625 * Changed the heap expansion heuristic, and the definition of
7626 GC_free_space_divisor, to refer to live data size, instead of total
7627 heap size.  I believe this is much more robust.  It wasn't previously
7628 possible, because we didn't have access to live data size.
7629 * Thread local allocation added the extra byte in twice: Once in
7630 thread_local_alloc, and once in malloc_many.
7631 * Removed GC_malloc_words_small and GC_gcj_fast_malloc.  A new
7632 mechanism based on the thread local allocation data structures
7633 is expected to be added instead.  This should allow inlined code
7634 that is both fast and doesn't rely on collector internals.
7635 * Changed both free lists and reclaim lists to be indexed by granules
7636 instead of words, norming halving their size.
7637 * MERGE_SIZE is now the only option, and the macro was removed.
7638 (Without it, we need a memory reference to GC_all_interior_pointers
7639 anyway.  Thus it costs us nothing.)
7640 * Change GC_size_map to map to granules instead of words.  Make sure
7641 that every possible size up to TINY_FREELISTS is present.
7642 * Split of macros need for fast inline allocation into gc_tiny_fl.h
7643 in anticipation of a new inline allocator that doesn't rely on GC
7644 internals.
7645 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
7646 in anticipation of a merge with the inline allocation code.
7647 * Removed ALIGN_DOUBLE.  This is mostly handled by GRANULE_BYTES.
7648 * Make locking on most platforms conditional on GC_need_to_lock.
7649
7650
7651 == [6.9] ==
7652
7653 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
7654 * Fix M68K LINUX port (thanks to Debian packagers).
7655 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
7656 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
7657 * Applied FreeBSD/X86_64 patch.
7658
7659
7660 == [6.8] 2006-07-08 ==
7661
7662 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
7663 Thomas Klausner).
7664 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
7665 to Andreas Tobler).
7666 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
7667 extremely unlikely circumstances.  (Thanks to Jean-Baptiste Nivois for
7668 some careful code inspection.)
7669 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
7670 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
7671 * Added initial Solaris/X86-64 support (thanks to Rainer Orth).
7672
7673
7674 == [6.7] 2006-03-03 ==
7675
7676 * Add "int" to Solaris "end" and "etext" declaration in gc.h.  Declared
7677 the symbols with underscores and as arrays, since that's what's actually
7678 used.  Perhaps this could all just be removed.  (Thanks to John Bowman.)
7679 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
7680 * Added casts for assignments to hb_last_reclaimed, which truncate the
7681 value.  Added a cast to GC_adj_words_allocd.  Use GetModuleHandleA
7682 when retrieving a handle to kernel32.dll under win32.
7683 * Added Tandem S-Series support.  (Thanks to Craig McDaniel.  A modified
7684 version of his patch was applied, and hence breakage is probably not
7685 his fault.)
7686 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
7687 to Hanno Boeck).
7688 * Changed a test for LINUX in config_macros.h to one for __linux__.
7689 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
7690 David Ayers).
7691 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
7692 (thanks to Andreas Tobler).
7693 * Add support for Darwin/X86 (thanks to Geoff Norton and the Mono
7694 developers).
7695 * Merge in some recent gcc fixes.  Add ppc64 asm code.  (Thanks to
7696 Bryce McKinlay and other GCJ developers.)
7697 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
7698 * Interior pointers with some largish offsets into large objects could
7699 be ignored, if GC_all_interior_pointers was set.  (Oddly this worked
7700 correctly for stack references if it was not set.  Otherwise it failed
7701 for both stack and heap references.  Thanks to Andrew McKinlay for the
7702 critical test case.)
7703 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
7704 untested changes.
7705 * Added GC_strdup and friends to make leak detection work correctly
7706 for strdup clients (thanks to Jon Moore).  Fixed the existing strdup
7707 with malloc redirection to handle a null malloc return correctly.
7708
7709
7710 == [6.6] 2005-09-09 ==
7711
7712 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
7713 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
7714 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
7715 * Don't access the GC thread structure from the restart handler.  It's
7716 unsafe, since the handler may run too late.  (Thanks to Ben Maurer for
7717 tracking this down.)
7718 * Applied Christian Thalinger's patch to change comment syntax in
7719 alpha_mach_dep.S.
7720 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
7721 Juan Jose Garcia-Ripoll).
7722 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
7723 Sugioka Toshinobu and Christian Thalinger).
7724 * Rewrote GC_parse_map_entry.  This assumed a fixed column layout of
7725 /proc/self/maps on Linux.  This ceased to be true about 2 years ago.
7726 The old code is probably quite problematic with -DREDIRECT_MALLOC.  It
7727 is also used by default for IA64, though I haven't seen actual failures
7728 there.
7729 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
7730 4K pages (thanks to Andrew Haley).
7731 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
7732 to Ben Hutchings for the observation and patch).
7733 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
7734
7735
7736 == [6.5] 2005-05-22 ==
7737
7738 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
7739 * Make GC_approx_sp() write to dummy location to ensure that stack
7740 is grown here, when sp looks reasonable, rather than later, when
7741 it might look like a bad memory reference.  (Problem was never
7742 observed that I know of.  But on rereading the code it seemed
7743 dubious.)
7744 * Separate out GC_with_callee_saves_pushed and sometimes call
7745 it from GC_suspend_handler in pthread_stop_world.c.  Callee-save
7746 register values sometimes failed to get traced under HP/UX on
7747 PA-RISC.  Linux/IA64 had the same problem, though non-stacked
7748 callee-save registers seem to be so rarely used there that nobody
7749 ever noticed.
7750 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
7751 from Andreas Tobler, which I had lost.
7752 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
7753 pickier compiler versions.
7754 * Fixed Itanium 32-bit ABI support (HP/UX).  In particular, the
7755 compare_and_exchange implementation didn't consider that possibility.
7756 * Undefine GC_pthread_detach in win32_threads.c (thanks to
7757 Tommaso Tagliapietra).
7758 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
7759 * Applied Dan Bonachea's patch to use mmap on AIX.
7760 * Several fixes to resurrect the Irix port on recent OS versions.
7761 * Change ALPHA to use LINUX_STACKBOTTOM.
7762 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM.  Deal with potential
7763 bad values of __libc_stack_end on that platform (thanks to David Miller).
7764 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
7765 (Unnecessary in 7.0)
7766 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
7767 we get prototypes.  (Unnecessary in 7.0)
7768 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
7769 which are only defined in private include files.
7770 * Integrated some small gcconfig.h patches from Dan Bonachea.  Also
7771 relaxed assertion about FreeBSD stack size in pthread_support.c.
7772 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
7773 support.  This may need additional work.
7774 * Avoided potentially infinite recursion in GC_save_callers if
7775 the system backtrace calls malloc.  The workaround currently requires
7776 __thread support if this code is used with threads.
7777 * Avoided another similar infinite recursion by conditionally
7778 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
7779 for helping to track down both of these).
7780 * Removed all traces of aix_irix_threads.c.  AIX and Irix now use
7781 pthread_support.c and pthread_stop_world.c.  The old code appeared
7782 to be unreliable for AIX, and was not regularly maintained.
7783 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
7784 they're not always safe to read.
7785 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
7786 in GC_remove_from_fl.
7787 * Fix stack_size assertion in GC_pthread_create.
7788 * Fix assertion in GC_steal_mark_stack.
7789
7790
7791 == [6.4] 2004-12-21 ==
7792
7793 * Merge gcconfig.h changes from gcc tree.
7794 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
7795 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
7796 * Start marker threads in GC_thr_init, so that they get started even
7797 if no other threads are ever started.  (Oddly enough, the parallel
7798 collector worked correctly, though not well, with no helper threads.)
7799 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
7800 is set (thanks to Alexander Petrossian).
7801 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
7802 * Let in_progress_space in backgraph.s grow dynamically.
7803 * Fix README.solaris2.  The GC_thr_init() hack doesn't work anymore.
7804 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
7805 * Add missing declaration for GC_generic_malloc_words_small_inner.
7806 Without it, s390x breaks.  (Thanks to Ulrich Weigand.)
7807 * Applied several MacOSX patches to support older tool chains (thanks
7808 to Stefan Ring).
7809 * Bug fix for NetBSD/amd64 (thanks to Marc Recht).
7810 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
7811 * Fixed an uninitialized variable in cordprnt.c.
7812 * Eliminated some, but not all, gcc -Wall warnings.
7813 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
7814 (thanks to Dan Grayson).
7815 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
7816 GC_DONT_ADD_BYTE_AT_END is set.
7817 * Changed some (long) casts to (word) in preparation for win64 (thanks
7818 to Peter Colson).
7819 * Changed "int stack_size" declaration in pthread_support.c to use
7820 size_t.  (Only mattered with GC_ASSERTIONS enabled.)
7821 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
7822 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
7823 it with a check that the mapping type is MEM_IMAGE.
7824 In theory, this should work much better, but it is a high
7825 risk change for win32.  (Thanks to Ashley Bone for the crucial
7826 experimental data behind this, and to Rutger Ovidius for
7827 some further experiments.)
7828 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
7829 words.
7830 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
7831 reason.  (A hack to avoid some extremely unlikely scenarios in which
7832 we manage to allocate only "wasted" space.  7.0 has a better fix.)
7833 * Changed PowerPC GC_clear implementation to use lwsync instead of
7834 eieio, since the documentation recommends against eieio, and
7835 it seems to be incorrect if the preceding memory op is a load.
7836 * Fixed print_block_list to print the correct kind number for
7837 STUBBORN (thanks to Rutger Ovidius).
7838 * Have configure.in generate an error if it is asked to support
7839 pthreads, but doesn't know how to.
7840 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
7841 * Have the GNU build mechanism link with -ldl.  Rename THREADLIBS
7842 to THREADDLLIBS to reflect this.  (Thanks to Sven Verdoolaege.)
7843 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
7844 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
7845 (Thanks to John Merryweather Cooper.)
7846 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
7847 dirty page tracking mechanism uses threads.  (This avoids an undefined
7848 reference to _GC_darwin_register_mach_handler_thread.)
7849 * By popular demand, use __libc symbols only if we are built with
7850 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
7851 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
7852 The GC itself will dirty lots of pages in this cases, probably making
7853 it counterproductive on all platforms.  And the DARWIN port crashes.
7854
7855
7856 == [6.3] 2004-07-08 ==
7857
7858 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
7859 * Very large allocations could cause a collector hang.  Correct
7860 calculation of GC_collect_at_heapsize.
7861 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
7862 was defined.
7863 * Include gc_config_macros.h in threadlibs.c.
7864 * Correct MacOSX thread stop code (thanks to Dick Porter).
7865 * SMALL_OBJ definition was off by one.  This could cause crashes
7866 at startup.  (Thanks to Zoltan Varga for narrowing this down to
7867 a trivial test case.)
7868 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
7869 thread stopping code.
7870 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
7871 implementation.  The old approach appears to have been broken by
7872 recent kernels.
7873 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
7874 to Andrew Begel).
7875 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
7876 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
7877
7878
7879 == [6.3alpha6] 2004-05-06 ==
7880
7881 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
7882 * Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
7883 different prefetch instructions from AMD64).  (Thanks to H.J. Lu.)
7884 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
7885 GC_THREADS.
7886 * Added simple_example.html.
7887 * Merged Andrew Gray's patch to correctly restore signal handlers on
7888 FreeBSD.
7889 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
7890 on x86-64.  Added some other casts so that the PREFETCH macros
7891 always get a ptr_t argument.  Removed some casts in the PREFETCH
7892 implementations.
7893 * Added a header guard for gc_allocator.h and changed GC_debug_free to
7894 clobber contents of deallocated object (suggested by Jesse Jones).
7895 * The signal masking code in pthread_stop_world.c contained some errors.
7896 In particular SIGSEGV was masked in the handler, in spite of the fact that
7897 it wrote to the heap.  This could lead to an uncaught SIGSEGV, which
7898 apparently became much more likely in Linux 2.6.  Also fixed some
7899 typos, and reduced code duplication in the same area.
7900 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
7901 Adrian Bunk for the patches).
7902 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
7903
7904
7905 == [6.3alpha5] 2004-03-30 ==
7906
7907 * Fix & vs && typo in GC_generic_malloc and
7908 GC_generic_malloc_ignore_off_page.  (Propagated from the gcc tree.)
7909 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
7910 (According to Christian Limpach, the NetBSD problem is fixed.
7911 Presumably so is the Solaris 2.3 problem.)
7912 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
7913 to Simon Gornall for the patch).
7914 * Changed semantics of the GC_IGNORE_FB environment variable, based
7915 on experimentation by Nicolas Cannasse pointing out that the old
7916 interpretation was useless.  We still need help in identifying win32
7917 graphics memory mappings.  The current "solution" is a hack.
7918 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
7919 It probably made more sense in the gcc context.
7920 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
7921 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
7922 supports the same extension on various platforms.
7923 * Added some basic (completely untested) defines for win64, in support
7924 of future work.
7925 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
7926 a memory overwrite bug on Solaris and perhaps other platforms.
7927 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
7928 Jakub Jelinek for the patch and explaining the problem).
7929 Otherwise pre-linking could cause the collector to fail.
7930 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
7931 for HP/UX with gcc.  The compiler-based implementation appears to work
7932 only with the vendor compiler.
7933 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
7934 making client mark code cleaner and less dependent on GC version.
7935 * Export several new procedures and GC_generic_malloc from gc_mark.h
7936 to support user-defined kinds.  Use the new procedures to replace existing
7937 code in gcj_mlc.c and typd_mlc.c.
7938 * Added support for GC_BACKTRACES.
7939 * Fixed a remaining problem in CORD_str with signed characters (thanks
7940 to Alexandr Petrosian for the patch).
7941 * Removed supposedly redundant, but very buggy, definitions of finalizer
7942 macros from javaxfc.h.  Fortunately this file probably has no users.
7943 The correct declarations were already in gc.h.
7944 * Also need to set GC_in_thread_creation while waiting for GC during
7945 thread termination, since it is also possible to collect from an
7946 unregistered thread in that case.
7947 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
7948 Plus some other minor WinCE fixes (thanks to Alain Novak).
7949 * Added GC_register_describe_type_fn.
7950 * Arrange for debugging finalizer registration to ignore non-heap
7951 registrations, since the regular version of the routine also behaves
7952 that way.
7953 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
7954 One of the more obscure allocation routines with missing a LOCK() call.
7955 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
7956 to work with VS.NET.
7957 * Cleaned up GC_INIT calls in test.  Updated gc.man to encourage GC_INIT
7958 use in portable code.
7959 * Taught the GC to use libunwind if --enable-full-debug is specified on
7960 IA64 and libunwind is present.
7961 * The USE_MUNMAP code could get confused about the age of a block and
7962 prematurely unmap it.  GC_unmap_old had a bug related to wrapping of
7963 GC_gc_no.  GC_freehblk and GC_merge_unmapped didn't maintain
7964 hb_last_reclaimed reasonably when blocks were merged.  The code was
7965 fixed to reflect original intent, but that may not always be an
7966 improvement.
7967
7968
7969 == [6.3alpha4] 2004-01-01 ==
7970
7971 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
7972 * Darwin support was broken in alpha3 as a result of my mis-integration of
7973 Andrew Begel's patches.  Fixed with another patch from Andrew Begel.
7974 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
7975 overly aggressive.  We may collect from an unregistered thread during
7976 thread creation.  Fixed by explicitly checking for that case.  (Added
7977 GC_in_thread_creation.)
7978
7979
7980 == [6.3alpha3] 2003-12-20 ==
7981
7982 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
7983 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
7984 * Mostly applied a DJGPP patch from Doug Kaufman.  Especially Makefile.dj
7985 had suffered from serious bit rot.
7986 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
7987 and a call to alloca (for lcc compatibility).
7988 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
7989 the memory with PROT_NONE instead of unmapping it.  The latter risks
7990 an intervening mmap grabbing the address space out from underneath us.
7991 Updated this code to reflect a cleaner patch from Ulrich Drepper.
7992 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
7993 (Patch from Andrew Begel.)
7994 * Dynamically choose whether or not lock should spin on win32 (thanks
7995 to Maurizio Vairani for the patch).  This may be a significant performance
7996 improvement for win32.
7997 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
7998 in the distribution (thanks to Maurizio Vairani).
7999 * Maybe_install_looping_handler() was accidentally exported, violating
8000 our name space convention.
8001 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD.  (Thanks to
8002 Christian Limpach.  I generalized the patch to use sigsetjmp on all
8003 UNIX_LIKE platforms, admittedly a slightly risky move.  But it may avoid
8004 similar problems on some other platforms.  I also cleaned up the definition
8005 of UNIX_LIKE a bit.)
8006 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
8007 some of Fergus Hendersons's comments.  (Patch didn't apply cleanly,
8008 errors are possible.)
8009 * Added another test or two for the Intel 8.0 compiler to avoid
8010 confusing it with gcc.  The single-threaded collector should now build
8011 with icc, at least on ia64.
8012
8013
8014 == [6.3alpha2] 2003-11-04 ==
8015
8016 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
8017 * Put back the WINABI qualifier for GC_CreateThread.  (Thanks to
8018 Danny Smith for the patch.  6.3alpha1 had the qualifier in one place
8019 but not elsewhere, which was clearly wrong.)
8020 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
8021 include.  (Thanks to Andreas Tobler for posting the patch.)
8022 * Included signal.h from pthread_support.c.  Removed GC_looping_handler,
8023 which was dead code.
8024 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
8025 defined (thanks to Glauco Masotti for testing and reporting this).
8026 Changed GC_find_start to never just return 0.  According to its
8027 comment it doesn't, and it's unclear that's correct.
8028 * GC_alloc_large had several largely compensating bugs in the
8029 computation of GC_words_wasted.  (It was confused about bytes vs.
8030 words in two places.)
8031 * Integrated Slava Sysoltsev's patch to support more recent versions of
8032 the Intel compiler on IA64/Linux.
8033 * Changed win32 spinlock initialization to conditionally set a spin count.
8034 (Emmanual Stumpf pointed out that enabling this makes a large performance
8035 difference on win32 multiprocessors.)  Also cleaned up the win32 spinlock
8036 initialization code a bit.
8037 * Fixed thread support for HP/UX/IA64.  The register backing store base for
8038 the main thread was sometimes not set correctly.  (Thanks to
8039 Laurent Morichetti.)
8040 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
8041 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
8042 avoid 64-bit size mismatches (thanks to Bernie Solomon).
8043 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
8044 tail call optimization.  This could lead to prematurely reclaimed
8045 objects on configurations that used the generic routine and the new
8046 build infrastructure (which potentially optimizes mach_dep.c).
8047 This was a serious bug, but it's unclear whether it has resulted in
8048 any real failures.
8049 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
8050 for noticing the problem and supplying the patch).
8051 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
8052 to Anthony Green).
8053 * Partially merged a win32 patch from Ben Hutchings, and substantially
8054 revised other parts of win32_threads.c.  It had several problems.
8055 Under MinGW with a statically linked library, the main thread was
8056 not registered.  Cygwin detached threads leaked thread descriptors.
8057 There were several race conditions.  For now, unfortunately the
8058 static threads limit remains, though we increased it, and made table
8059 traversal cost depend on the actual thread count.
8060 There is also still some code duplication with pthread_support.c.
8061 (Thread descriptors did become much smaller, since Ben Hutchings
8062 removed the thread context from them.)
8063 * Integrated a Solaris configure.in patch from Rainer Orth.
8064 * Added GC_IGNORE_FB and associated warning to very partially address
8065 the issue of the collector treating a mapped frame buffer as part
8066 of the root set.  (Thanks to David Peroutka for providing some
8067 insight.  More would be helpful.  Is there anything that can be used
8068 to at least partially identify such memory segments?)
8069
8070
8071 == [6.3alpha1] 2003-07-26 ==
8072
8073 * Integrated some NetBSD patches by Marc Recht.  These
8074 were already in the NetBSD package.
8075 * GC_pthread_create waited for the semaphore even if pthread_create failed.
8076 (Thanks to Dick Porter for the pthread_support.c patch.)  Applied the
8077 analogous fix for aix_irix_threads.c.
8078 * Added Rainer Orth's Tru64 fixes.
8079 * The check for exceeding the thread table size in win32 threadDetach
8080 was incorrect (thanks to Alexandr Petrosian for the patch).
8081 * Applied Andrew Begel's patch to correct some reentrancy issues
8082 with dynamic loading on Darwin.
8083 * GC_CreateThread() was neglecting to duplicate the thread handle in
8084 the table (thanks to Tum Nguyen for the patch).
8085 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
8086 Roger Sayle for the patch).
8087 * Applied more AIX threads patches from Scott Ananian.
8088
8089
8090 == [6.2] 2003-06-21 ==
8091
8092 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
8093 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
8094 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
8095 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
8096 * There was a race between GC_pthread_detach and thread exit that could
8097 result in a thread structure being deallocated by GC_pthread_detach
8098 even though it was still needed by the thread exit code (thanks to
8099 Dick Porter for the small test case that allowed this to be debugged).
8100 * Fixed version parsing for non-alpha versions in acinclude.m4 and
8101 version checking in version.h.
8102 * Issues identified (not yet fixed):
8103 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
8104 against libdl.
8105 - GC_proc_fd for Solaris is not correctly updated in response to a
8106 fork() call.  Thus incremental collection in the child won't work
8107 correctly.  (Thanks to Ben Cottrell for pointing this out.)
8108 - --enable-redirect-malloc is mostly untested and known not to work
8109 on some platforms.
8110 - There seem to be outstanding issues on Solaris/X86, possibly with
8111 finding the data segment starting address.
8112 - Very large root set sizes (> 16 MB or so) could cause the collector
8113 to abort with an unexpected mark stack overflow.  (Thanks to
8114 Peter Chubb.)  NOT YET FIXED.  Workaround is to increase the initial
8115 size.
8116 - The SGI version of the collector marks from mmapped pages, even
8117 if they are not part of dynamic library static data areas.  This
8118 causes performance problems with some SGI libraries that use mmap
8119 as a bitmap allocator.  NOT YET FIXED.  It may be possible to turn
8120 off DYNAMIC_LOADING in the collector as a workaround.  It may also
8121 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
8122 The real fix is to walk rld data structures, which looks possible.
8123 - Incremental collector should handle large objects better.  Currently,
8124 it looks like the whole object is treated as dirty if any part of it is.
8125
8126
8127 == [6.2alpha6] 2003-06-05 ==
8128
8129 * There was an extra underscore in the name of GC_save_registers_in_stack
8130 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
8131 * Integrated Brian Alliet's patch for Darwin.  This restructured the
8132 linuxthreads/pthreads support to separate generic pthreads support
8133 from more the system-dependent thread-stopping code.  I believe this
8134 should make it easier to eliminate the code duplication between
8135 pthreads platforms in the future.  The patch included some other
8136 code cleanups.
8137 * Integrated Dan Bonachea's patch to support AIX threads.  This required
8138 substantial manual integration, mostly due to conflicts with other
8139 recent threads changes.  It may take another iteration to
8140 get it to work.
8141 * Removed HPUX/PA-RISC support from aix_irix_threads.c.  It wasn't used
8142 anyway and it cluttered up the code.  And anything we can do to migrate
8143 towards generic pthreads support is a good thing.
8144 * Added a more explicit test for tracing of function arguments to test.c.
8145 * Added Akira Tagoh's PowerPC64 patch.
8146 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
8147 pointing it out).  gc.h now includes just windows.h, not winbase.h.
8148 * Declared GC_save_regs_in_stack() in gc_priv.h.  Remove other declarations.
8149 * Changed --enable-cplusplus to use automake consistently.  The old way
8150 confused libtool.  "Make install" didn't work correctly for the old version.
8151 Previously --enable-cplusplus was broken on cygwin.
8152 * Changed the C version of GC_push_regs to fail at compile time if it is
8153 generated with an empty body.  This seems to have been the cause of one
8154 or two subtle failures on unusual platforms.  Those failures should
8155 now occur at build time and be easily fixable.
8156
8157
8158 == [6.2alpha5] 2003-05-14 ==
8159
8160 * GC_invoke_finalizers could, under rare conditions, set
8161 GC_finalizer_mem_freed to an essentially random value.  This could
8162 possibly cause unbounded heap growth for long-running applications
8163 under some conditions.  (The bug was introduced in 6.1alpha5, and
8164 is not in gcc3.3.)
8165 * Attempted to sanitize the various DLL macros.  GC_USE_DLL disappeared.
8166 GC_DLL is used instead.  All internal tests are now on GC_DLL.
8167 README.macros is now more precise about the intended meaning.
8168 * Include DllMain in the multi-threaded win32 version only if the
8169 collector is actually built as a dll (thanks to Mohan Embar for
8170 a version of the patch).
8171 * Hide the cygwin threadAttach/Detach functions.  They were violating our
8172 namespace rules.
8173 * Fixed an assertion in GC_check_heap_proc.  Added GC_STATIC_ASSERT
8174 (thanks again to Ben Hutchings).
8175 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
8176 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
8177 a CORD invariant.  Also tweaked the re-balancing rule for
8178 CORD_cat_char_star.  (Thanks to Alexandr Petrosian for the bug report
8179 and patch.)
8180 * Added hand-coded structured exception handling support to mark.c.
8181 This should enable support of dynamic libraries under win32 with
8182 gcc-compiled code.  (Thanks to Ranjit Mathew for the patch.)
8183 Turned on dynamic library scanning for win32/gcc.
8184 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
8185 GC_USE_LD_WRAP was probably broken in recent versions.
8186 * The build could fail on some platforms since gcconfig.h could include
8187 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
8188 was built (thanks to Yann Dirson for pointing this out).  Also
8189 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
8190 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
8191 collection, since the write fault handler was erroneously overridden.
8192 Handlers are now set up in the correct order.
8193 * It used to be possible to call GC_mark_thread_local_free_lists() while
8194 the world was not stopped during an incremental GC.  This was not safe.
8195 Fortunately, it was also unnecessary.  Added GC_world_stopped flag
8196 to avoid it.  (This caused occasional crashes in GC_set_fl_marks
8197 with thread local allocation and incremental GC.  This probably happened
8198 primarily on old, slow multiprocessors.)
8199 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
8200 command line (thanks to Yannis Bres for the patch).
8201 * Taught the IA64/linux code to determine the register backing store base from
8202 /proc/self/maps after checking the __libc symbol, but before guessing.
8203 (__libc symbols are on the endangered list, and the guess is likely to not
8204 always be right for 2.6 kernels.)  Restructured the code to read and parse
8205 /proc/self/maps so it only exists in one place (all platforms).
8206 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux.  It claimed that it
8207 also registered the main data segment, but didn't actually do so.  (I don't
8208 think anyone actually uses this configuration, but ...)
8209 * Made another attempt to get --enablecplusplus to do the right thing.
8210 Since there are unavoidable problems with C programs linking against a
8211 dynamic library that includes C++ code, I separated out the c++ code into
8212 libgccpp.
8213
8214
8215 == [6.2alpha4] 2003-03-10 ==
8216
8217 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS.  (See Debian bug
8218 # 177204)
8219 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
8220 * Integrated Grzegorz Jakacki's substantial GNU build patch.  "Make dist"
8221 should now work for the GNU build process.  Documentation files
8222 are installed under share/gc.
8223 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
8224 Rene Girard for pointing out the problems).
8225 * Updated BCC_MAKEFILE (thanks to Rene Girard).
8226 * Added GC_ASSERT check for minimum thread stack size.
8227 * Added --enable-gc-assertions.
8228 * Added some web documentation to the distribution.  Updated it in the
8229 process.
8230 * Separate gc_conf_macros.h from gc.h.
8231 * Added generic GC_THREADS client-defined macro to set the appropriate
8232 GC_XXX_THREADS internal macro.  (gc_config_macros.h.)
8233 * Add debugging versions of _ignore_off_page allocation primitives.
8234 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
8235 from gc.h to gc_priv.h.
8236 * Reset GC_fail_count even if only a small allocation succeeds.
8237 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
8238 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
8239 when it should have called the lower case version, since it was
8240 explicitly computing a base pointer.
8241
8242
8243 == [6.2alpha3] 2003-01-30 ==
8244
8245 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
8246 exist.
8247
8248
8249 == [6.2alpha2] ==
8250
8251 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
8252 Hironori Sakamoto for the patch).
8253 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
8254 * Attempted to work around the problems with .S filenames and the SGI
8255 compiler.  (Untested.)
8256 * Worked around an HP/UX make issue with the GNU-style build process.
8257 * Fixed the --enable-cplusplus build machinery to allow builds without
8258 a C++ compiler.  (That was always the intent ...)
8259 * Changed the debugging allocation macros to explicitly pass the return
8260 address for Linux and XXXBSD on hardware for which we can't get stack
8261 traces.  Use __builtin_return_address(0) to generate it when possible.
8262 Some of the configuration work was cleaned up (good) and moved to gc.h
8263 (bad, but necessary).  This should make leak detection more useful
8264 on a number of platforms.  (Thanks to Fabian Thylman for the suggestion.)
8265 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
8266 * Bumped revision number for dynamic library.
8267
8268
8269 == [6.2alpha1] 2003-01-23 ==
8270
8271 * Guard the test for GC_DUMP_REGULARLY in misc.c with
8272 "#ifndef NO_DEBUGGING".  Otherwise it fails to build with NO_DEBUGGING
8273 defined.  (Thanks to Manuel Serrano.)
8274 * Message about retrying suspend signals was incorrectly generated even when
8275 flag was not set.
8276 * Cleaned up MACOSX/NEXT root registration code.  There was apparently a
8277 separate ifdef case in GC_register_data_segments() for no reason.
8278 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
8279 * Arrange for gc.h and friends to be correctly installed with GNU-style
8280 "make install".
8281 * Enable the GNU-style build facility include C++ support in the library
8282 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
8283 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
8284 from the garbage collected heap, as it is with our own thread-specific
8285 storage implementation (thanks to Jeff Sturm).
8286 * Mark all free list header blocks if they are heap allocated.  This avoids
8287 some unnecessary tracing.  And it remains correct if we clear the
8288 root set.  (Thanks to Jeff Sturm for identifying the bug.)
8289 * Improved S390/Linux support.  Add S390/Linux 64-bit support (thanks to
8290 Ulrich Weigand).
8291 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
8292 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h.  This is technically
8293 an interface change.  Based on the fact that nobody reported this,
8294 I suspect/hope there were no clients.
8295 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
8296 when appropriate, (2) doesn't generate references to undefined internal
8297 macros, and (3) allows easier manual construction of descriptors.
8298 * Close the file descriptor used by GC_print_address_map().
8299 * Set the "close-on-exec" bit for various file descriptors maintained
8300 for the collector's internal use.
8301 * Added a hack to find memory segments owned by the system allocator
8302 under win32.  Based on my tests, this tends to eventually find all
8303 segments, though it may take a while.  There appear to be cleaner,
8304 but slower solutions under NT/XP.  But they rely on an API that's
8305 unsupported under 9X.
8306 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM.  (Thanks
8307 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
8308 64-bit kernels.)
8309 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
8310 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
8311 of candidate pointers for tagging, etc.
8312 * Always lock around GC_notify_full_gc().  Simplified code for
8313 invoking GC_notify_full_gc().
8314 * Changed the way DATASTART is defined on FreeBSD to be robust against
8315 an unmapped page after etext.  (Thanks to Hironori Sakamoto for
8316 tracking down the intermittent failure.)
8317 * Made GC_enable() and GC_disable() official.  Deprecated direct update
8318 of GC_dont_gc.  Changed GC_gcollect to be a noop when garbage collection
8319 is disabled.
8320 * Call GC_register_dynamic_libraries before stopping the world on Linux,
8321 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
8322 * Introduced a more general mechanism for platform-dependent code to
8323 decide whether the main data segment should be handled separately
8324 from dynamic libraries, or registered by GC_register_dynamic_libraries.
8325 The latter is more reliable and easier on Linux with dl_iterate_phdr.
8326
8327
8328 == [6.1] ==
8329
8330 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
8331 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
8332 * Double page hash table size for -DLARGE_CONFIG.
8333 * Integrated Bo Thorsen's X86-64 support.
8334 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
8335 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
8336 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
8337 SEARCH_FOR_DATA_START.  It doesn't hurt to fall back to a search.
8338 And __data_start doesn't seem to get defined correctly of the GC
8339 library is loaded with LD_PRELOAD, e.g. for leak detection.
8340 * If the GC_find_leak environment variable is set, do a
8341 atexit(GC_gcollect) to give us at least one chance to detect leaks.
8342 This may report some very benign leaks, but ...
8343 * Addeded REDIRECT_FREE.  It's necessary if we want leak detection with
8344 LD_PRELOAD.
8345 * Defer printing of leaked objects, as for smashed objects.
8346 * Fixed process and descriptor leak in GC_print_callers.  Try for
8347 line number even if we got function name.)
8348 * Ported parallel GC support and thread local allocation to Alpha.
8349 Not yet well-tested.
8350 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
8351 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
8352 alpha_mach_dep.s.
8353 * Incorporated a change to new_gc_alloc.h,
8354 which should make it work with gcc3.1.
8355 * Use alpha_mach_dep.S only on Linux.  (It's not clear that this is
8356 optimal, but it otherwise didn't build on Tru64.  Thanks to Fergus Henderson.)
8357 * Added ifdef to guard free() in os_dep.c.  Otherwise we get a
8358 compilation error on Irix (thanks to Dai Sato).
8359 * Added an experimental version of GC_memalign to mallocx.c.  This can't
8360 always work, since we don't handle alignment requests in the hblk-level
8361 allocator, and we can't handle arbitrary pointer displacements unless
8362 GC_all_interior_pointers is enabled.  But it should work for alignment
8363 requests up to HBLKSIZE.  This is not yet documented in the standard
8364 places.
8365 * Finally debugged the OSF1/Tru64 thread support.  This needs more testing,
8366 since I needed to add a somewhat unconvincing workaround for signal
8367 delivery issues that I don't yet completely understand.  But it does
8368 pass my tests, even in parallel GC mode.  Incremental GC support is
8369 disabled if thread support is enabled, due to the signal issues.
8370 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
8371 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
8372 declarations to gc.h.  On IA64, this is required for REDIRECT_MALLOC
8373 to work correctly with these.
8374 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
8375
8376
8377 == [6.1alpha5] 2002-06-19 ==
8378
8379 * Added GC_finalizer_mem_freed, and changed some of the code that
8380 decided on heap expansion to look at it.  Memory explicitly
8381 deallocated by finalizers essentially needs to be counted as reclaimed
8382 by the GC.  Otherwise there are cases in which the heap can grow
8383 infinitely.  (Thanks to Mark Reichert for the test case.)
8384 * Integrated Adam Megacz patches to not scan dynamic libraries if
8385 we are compiling with gcc on win32.  Otherwise we need structured
8386 exception handling to deal with asynchronously unmapped root
8387 segments, and gcc doesn't directly support that.
8388 * Integrated Anthony Green's patch to support Wine.
8389 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
8390 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
8391 * Integrated Loren J. Rittle's Alpha FreeBSD patches.  These also
8392 changed the declarations of symbols like _end on many platforms to
8393 that they wouldn't mistakenly be declared as short data symbols (suggested by
8394 Richard Henderson).
8395 * Integrated changes from the Debian distribution (thanks to Ryan Murray
8396 for pointing these out).
8397 Fix C++ comments in POWERPC port.  Add ARM32
8398 incremental GC support.  Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
8399 this time for real.  Use va_copy to get rid of cord printf problems
8400 (finally).
8401 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
8402 pointing out the omission).
8403 * Don't just drop gcj free lists in GC_start_reclaim, since that can
8404 eventually cause the marker to see a bogus mark descriptor in the
8405 dropped objects.  The usual symptom was a very intermittent segmentation
8406 fault in the marker.  This mattered only if one of the GC_gcj_malloc
8407 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
8408 Tom Tromey for helping to track this down).
8409 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
8410 Jeff Sturm, Tom Tromey, and Christian Joensson).
8411 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
8412 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
8413 This is needed on Linux.  I'm not sure whether it's better or worse
8414 on Tru64.
8415 * Changed gc_cpp.h once more to declare operator new and friends only in
8416 a Microsoft environment.  This may need further fine tuning (thanks to
8417 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
8418 * Don't ever override strdup if it's already macro defined (thanks to
8419 Adnan Ali for pointing out the problem).
8420 * Changed gc_cpp.h yet again to also overload placement new.  Due to the
8421 C++ overloading rules, the other overloaded new operations otherwise hide
8422 placement new, which causes many STL uses to break (thanks to Reza Shahidi
8423 for reporting this, and to Matt Austern for proposing a fix).
8424 * Integrated cygwin pthreads support from Dan Bonachea.
8425 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
8426 * Changed printing code to print more complete GC times.
8427 * Applied Mark Mitchell's Irix patch to correct some bit rot.
8428 * Clarified which object-printing routines in dbg_mlc.c should hold
8429 the allocation lock.  Restructured the code to allow reasonable object
8430 printing with -DREDIRECT_MALLOC.
8431 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
8432 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
8433 Jeffrey Mark Siskind).
8434 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
8435 with a system header (thanks to Philip Brown).
8436 * Cause win32_threads.c to handle an out of range stack pointer correctly,
8437 though currently with a warning.  (Thanks to Jonathan Clark for
8438 observing that win32 applications may temporarily use the stack
8439 pointer for other purposes, and suggesting a fix.  Unfortunately, it's
8440 not clear that there is a complete solution to this problem.)
8441
8442
8443 == [6.1alpha4] 2002-06-16 ==
8444
8445 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
8446 building.  Increased 64-bit heap size limit in test.c slightly, since
8447 a functional SPARC collector seems to slightly exceed the old limits.
8448 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
8449 go wrong.
8450 * Added GC_MARKERS environment variable to allow use of a single marker
8451 thread on an MP without confusing the lock implementation.
8452 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
8453 This is really a purely generational mode, and we can afford to
8454 postpone the collection until the heap is (nearly) full.
8455 * Remove read() wrapper for MPROTECT_VDB.  It was causing more harm than
8456 good.  It is often no longer needed if system calls avoid writing to
8457 pointerful heap objects.
8458 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
8459 * Change GC_test_and_set so that it consistently has one argument.
8460 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
8461 Ryan Murray).
8462 * Fixed a formatting error in dbg_mlc.c.  Added prototype to GC_abort()
8463 declaration (thanks to Michael Smith).
8464 * Removed "source" argument to GC_find_start().  Eliminate GC_FIND_START().
8465 * Added win32 recognition code in configure.in.  Changed some of the
8466 dllimport/export defines in gc.h (thanks to Adam Megacz).
8467 * GC_malloc_many didn't set hb_last_reclaimed when it called
8468 GC_reclaim_generic.  (I'm not sure this matters much, but ...)
8469 * Allocating uncollectible objects with debug information sometimes
8470 allocated objects that were one byte too small, since uncollectible
8471 objects don't have the extra byte added at the end (thanks to
8472 Wink Saville for pointing this out).
8473 * Added a bit more assertion checking to make sure that gcj objects
8474 on free lists never have a nonzero second word.
8475 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
8476 * Upgraded libtool, configure.in and some related files to hopefully
8477 support NetBSD/SPARC (thanks to Adrian Bunk).  Unfortunately,
8478 libtool 1.4.2 seemed to be buggy due to missing quotes in several
8479 "test" invocations.  Fixed those in the ltmain.sh script.
8480 * Some win32-specific patches, including the introduction of
8481 GC_CreateThread (thanks to Adam Megacz).
8482 * Merged in gcj changes from Anthony Green to support embedded systems.
8483 * Tried to consistently rename preprocessed assembly files with a capital
8484 .S extension.
8485 * Use alpha_mach_dep.S on ALPHA again.  It doesn't really matter, but this
8486 makes our distribution consistent with the gcc one, avoiding future merge
8487 problems.
8488 * Move GET_MEM definition into gcconfig.h.  Include gcconfig.h slightly
8489 later in gc_priv.h to avoid forward references to ptr_t.
8490 * Add some testing of local allocation to test.c.
8491 * Change definition of INVALID_QTID in specific.h.  The -1 value was used
8492 inconsistently, and too likely to collide with a valid stack address.
8493 Some general clean-up of specific.[ch].  Added assertions.  (Thanks
8494 to Michael Smith for tracking down an intermittent bug to this
8495 general area.  I'm not sure it has been squashed yet, however.)
8496 * On Pthread systems it was not safe to call GC_malloc() between fork()
8497 and exec().  According to the applicable standards, it doesn't appear
8498 to be safe to call malloc() or many other libc functions either, thus
8499 it's not clear this is fixable.  Added experimental support for
8500 -DHANDLE_FORK in linux_threads.c which tries to support it.  It may
8501 succeed if libc does the right thing.  I'm not sure whether it does.
8502 (Thanks to Kenneth Schalk for pointing out this issue.)
8503 * Documented thread local allocation primitives to require an
8504 explicit GC_init call.  GC_init_parallel is no longer declared to
8505 be a constructor function, since that isn't portable and often
8506 seems to lead to initialization order problems.
8507 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
8508 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
8509 * Some more patches for Linux on HP PA-RISC.
8510 * Added include/gc_allocator.h.  It implements (hopefully) standard
8511 conforming (as opposed to SGI-style) allocators that allocate
8512 collectible (gc_allocator) or GC-traceable, but not collectible
8513 (traceable_allocator) objects.  This borrows heavily from libstc++,
8514 which borrows heavily from the SGI implementation, this part of
8515 which was written by Matt Austern.  Changed test_cpp.cc to very
8516 minimally test this.
8517 * On Linux/X86, retry mmap with a different start argument.  That should
8518 allow the collector to use more (closer to 3GB) of the address space.
8519 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
8520 patch to the gcc tree).
8521 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
8522 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
8523 * Compensated for the fact that current versions of glibc set
8524 __libc_stack_end incorrectly on Linux/IA64 while initialization code
8525 is running.  This could cause the collector to miss 16 bytes of
8526 the memory stack if GC_malloc or friends where called before main().
8527 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
8528 This will probably take another iteration to work, since his
8529 patch conflicted with the libtool upgrade.
8530 * Added README.arm.cross containing some information about cross-
8531 compiling to an ARM processor from Margaret Fleck (original code provided by
8532 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
8533 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
8534
8535
8536 == [6.1alpha3] 2002-02-07 ==
8537
8538 * Minor cleanup on the gcconfig.h section for SPARC.
8539 * Minor fix to support Intel compiler for I386/Linux (thanks to
8540 Sven Hartrumpf).
8541 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
8542 * Restructured the way in which we determine whether or not to keep
8543 call stacks for debug allocation.  By default SAVE_CALL_COUNT is
8544 now zero on all platforms.  Added SAVE_CALL_NARGS parameters.
8545 If possible, use execinfo.h to capture call stack.  (This should
8546 add support for a number of new platforms, though often at
8547 considerable runtime expense.)
8548 * Try to print symbolic information for call stacks.  On Linux, we
8549 do this with a combination of execinfo.h and running addr2line in
8550 a separate process.  This is both much more expensive and much more
8551 useful.  Amazingly, it seems to be fast enough for most purposes.
8552 * Redefined strdup if -DREDIRECT_MALLOC is given.
8553 * Changed incremental collector and MPROTECT_VDB implementation so that,
8554 under favorable conditions, pointer-free objects are not protected.
8555 Added GC_incremental_protection_needs() to determine ahead of time whether
8556 pointer-free objects may be protected.  Replaced GC_write_hint() with
8557 GC_remove_protection().
8558 * Added test for GC_ENABLE_INCREMENTAL environment variable.
8559 * Made GC_time_limit runtime configurable.  Added GC_PAUSE_TIME_TARGET
8560 environment variable.
8561 * Eliminated GC_page_sz, a duplicate of GC_page_size.
8562 * Caused the Solaris and Irix thread creation primitives to call
8563 GC_init_inner().
8564
8565
8566 == [6.1alpha2] 2001-12-20 ==
8567
8568 * No longer wrap read by default in multi-threaded applications.  It was
8569 pointed out on the libgcj list that this holds the allocation lock for
8570 way too long if the read blocks.  For now, reads into the heap are
8571 broken with incremental collection.  It's possible to turn this back on
8572 if you make sure that read calls don't block (e.g. by calling select
8573 first).
8574 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
8575 * Added check for environment variable GC_IGNORE_GCJ_INFO.
8576 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
8577 variable is set.
8578 * The calloc definition in leak_detector.h was missing parentheses, and
8579 realloc was missing a second argument to GC_REALLOC (thanks to
8580 Elvenlord Elrond).
8581 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
8582 code, mostly in the new file backgraph.c.  See doc/README.environment.
8583 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
8584 Jonathan Clark).
8585 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
8586 different address-space layout).  This may help for other machines with
8587 holes in the data segment.  (Thanks to Hironori Sakamoto.)
8588 * Changed the order in which GC_push_roots and friends push things onto
8589 the mark stack.  GC_push_all calls need to come first, since we can't
8590 necessarily recover if those overflow the mark stack.  (Thanks to
8591 Matthew Flatt for tracking down the problem.)
8592 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
8593
8594
8595 == [6.1alpha1] 2001-09-22 ==
8596
8597 * Non-debug, atomic allocations could result in bogus smashed object
8598 reports with debugging on (thanks to Patrick Doyle for the small test case).
8599 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
8600 2.2.4 bug.
8601 * Initial port to HP/UX on Itanium.  Thread support and both 32 and 64
8602 bit ABIs appear to work.  Parallel mark support doesn't yet, due to
8603 some inline assembly code issues.  Thread local allocation does appear
8604 to work.
8605 * ifdef'ed out glibc2.1/Itanium workaround.  I suspect nobody is using
8606 that combination anymore.
8607 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
8608 Dimitris Vyzovitis for the patch).
8609 * Debugged 64-bit support on HP/UX PA-RISC.
8610 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
8611 * Unregistering of finalizers with debugging allocation was broken (thanks
8612 to Jani Kajala for the test case).
8613 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
8614 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
8615 * Cleaned up some statistics gathering code in reclaim.c (thanks to
8616 Walter Bright).
8617 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
8618 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
8619 traversal to dyn_load.c.  Changed it to weakly reference dl_iterate_phdr,
8620 so that the old code is still used with old versions of glibc.
8621 * Cleaned up feature test macros for various threads packages and
8622 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
8623 It's likely that the cleanup broke something, since it touched lots of
8624 code.  It's also likely that it fixed some unreported bugs in the
8625 less common thread implementations, since some of the original code
8626 didn't stand up to close scrutiny.  Support for the next pthreads
8627 implementation should be easier to add.
8628
8629
8630 == [6.0] 2001-07-26 ==
8631
8632 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
8633 * Fixed a stack clearing problem that resulted in SIGILL with a
8634 misaligned stack pointer for multi-threaded SPARC builds.
8635 * Integrated another HURD patch (thanks to Igor Khavkine).
8636
8637
8638 == [6.0alpha9] ==
8639
8640 * added README.macros.
8641 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
8642 hard links.
8643 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
8644 it on untested platforms.
8645 * Integrated initial GNU HURD port (thanks to Chris Lingard and
8646 Igor Khavkine).
8647 * A few more fixes for Digital Mars compiler (by Walter Bright).
8648 * Fixed gcc version recognition.  Renamed OPERATOR_NEW_ARRAY to
8649 GC_OPERATOR_NEW_ARRAY.  Changed GC_OPERATOR_NEW_ARRAY to be the default.
8650 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
8651 Cesar Eduardo Barros).
8652 * Changed the byte size to free-list mapping in thread local allocation
8653 so that size 0 allocations are handled correctly.
8654 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
8655 * Changed finalization registration to invoke GC_oom_fn when it runs out
8656 of memory.
8657 * Removed lvalue cast in finalize.c.  This caused some debug configurations
8658 not to build with some non-gcc compilers.
8659
8660
8661 == [6.0alpha8] 2001-06-15 ==
8662
8663 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
8664 so that they compile under Irix (thanks to Dave Love).
8665 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
8666 is in a dynamic library (thanks to Andrew Begel).
8667 * Transformed README.debugging into debugging.html, updating and
8668 expanding it in the process.  Added gcdescr.html and tree.html
8669 from the web site to the GC distribution.
8670 * Fixed several problems related to PRINT_BLACK_LIST.  This involved
8671 restructuring some of the marker macros.
8672 * Fixed some problems with the sizing of objects with debug information.
8673 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST.  Reduced the
8674 object size with SHORT_DEBUG_HDRS by another word.
8675 * The "Needed to allocate blacklisted ..." warning had inadvertently
8676 been turned off by default, due to a buggy test in allchblk.c.  Turned
8677 it back on.
8678 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
8679 They were messy and the performance improvement seemed minimal.  We'll
8680 leave such scheduling issues to the compiler.
8681 * Changed Linux/PowerPC test to also check for __powerpc__ in response
8682 to a discussion on the gcc mailing list.
8683 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
8684 (suggested by Matthew Flatt).  This was causing problems in
8685 systems that register all of their own roots.  It looks far more correct
8686 to me without the "static" anyway.
8687 * Fixed several problems with thread local allocation of pointer-free or
8688 typed objects.  The collector was reclaiming thread-local free lists, since
8689 it wasn't following the link fields.
8690 * There was apparently a long-standing race condition related to
8691 multi-threaded incremental collection.  A collection could be started and
8692 a thread stopped between the memory unprotect system call and the setting of
8693 the corresponding dirt bit.  I believe this did not affect Solaris or PCR,
8694 which use a different dirty-bit implementation.  Fixed this by installing
8695 signal handlers with sigaction instead of signal, and disabling the thread
8696 suspend signal while in the write-protect handler.  (It is unclear
8697 whether this scenario ever actually occurred.)
8698 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
8699 implementation of GC_malloc_many or the local_malloc primitives.  It still
8700 doesn't work well, but it shouldn't lose memory anymore.
8701 * Integrated some changes from the gcc source tree that I had previously
8702 missed (thanks to Bryce McKinlay for the reminder and patch).
8703 * Added Makefile.direct as a copy of the default Makefile, which would
8704 normally be overwritten if configure is run.
8705 * Changed the gc.tar target in Makefile.direct to embed the version number
8706 in the gc directory name.  This will affect future tar file distributions.
8707 * Changed the Irix dynamic library finding code to no longer try to
8708 eliminate writable text segments under Irix6.x, since that is probably no
8709 longer necessary, and can apparently be unsafe on occasion (thanks to
8710 Shiro Kawai for pointing this out).
8711 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
8712 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
8713 debug header.  Call GC_register_finalizer_ignore_self instead, even with
8714 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
8715 * The collector didn't build with call chain saving enabled but NARGS=0.
8716 * Fixed up the GNU-style build files enough so that they work in some
8717 obvious cases (thanks to Maarten Thibaut).
8718 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
8719 Bright).
8720
8721
8722 == [6.0alpha7] 2001-04-19 ==
8723
8724 * Added GC_finalizer_notifier.  Fixed GC_finalize_on_demand.  (The variable
8725 actually wasn't being tested at the right points.  The build-time flag
8726 was.)
8727 * Added Tom Tromey's S390 Linux patch.
8728 * Added code to push GC_finalize_now in GC_push_finalizer_structures
8729 (thanks to Matthew Flatt).
8730 * Added GC_push_gc_structures() to push all GC internal roots.
8731 * Integrated some FreeBSD changes from Matthew Flatt.
8732 * It looks like USRSTACK is not always correctly defined under Solaris.
8733 Hacked gcconfig.h to attempt to work around the problem.  The result
8734 is not well tested.  (Thanks again to Matthew Flatt for pointing this out.)
8735 * Added Ji-Yong Chung's win32 threads and C++ fixes.
8736 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
8737 It was causing build problems with gas, and it's not clear this is
8738 better than the pthreads alternative on this platform.
8739 * Some MINGW32 fixes from Hubert Garavel.
8740 * Added initial Hitachi SH4 port from Kaz Kojima.
8741 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
8742 * Made include/gc_mark.h more public and separated out the really private
8743 pieces.  This is probably still not quite sufficient for clients that
8744 want to supply their own kind of type information.  But it's a start.
8745 This involved lots of identifier renaming to make it namespace clean.
8746 * Added GC_dont_precollect for clients that need complete control over
8747 the root set.
8748 * GC_is_visible didn't do the right thing with gcj objects.  (Not that
8749 many people are likely to care, but ...)
8750 * Don't redefine read with GC_USE_LD_WRAP.
8751 * Initial port to LINUX/HP_PA.  Incremental collection and threads are not
8752 yet supported.  (Incremental collection should work if you have the
8753 right kernel.  Threads may work with a sufficiently patched pthread
8754 library.)
8755 * Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
8756 many places (thanks to Benjamin Lerman).
8757 * Made win32_threads.c more tolerant of detaching a thread that it didn't
8758 know about (thanks to Paul Nash).
8759 * Added Makefile.am and configure.in from gcc to the distribution, with
8760 minimal changes.  For the moment, those are just placeholders.  In the
8761 future, we're planning to switch to a GNU-style build environment for
8762 Un*x-like systems, though the old Makefile will remain as a backup.
8763 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
8764 option.
8765 * Redistributed some functions between malloc.c and mallocx.c, so that
8766 simple statically linked apps no longer pull in mallocx.o.
8767 * Changed large object allocation to clear the first and last few words
8768 of each block before releasing the lock.  Otherwise the marker could see
8769 objects with nonsensical type descriptors.
8770 * Fixed a couple of subtle problems that could result in not recognizing
8771 interior pointers from the stack.  (I believe these were introduced
8772 in 6.0alpha6.)
8773 * GC_debug_free_inner called GC_free, which tried to reacquire the
8774 allocator lock, and hence deadlocked.  (DBG_HDRS_ALL probably never worked
8775 with threads.)
8776 * Fixed several problems with back traces.  Accidental references to a free
8777 list could cause the free list pointer to be overwritten by a back pointer.
8778 There seemed to be some problems with the encoding of root and finalizer
8779 references.
8780
8781
8782 == [6.0alpha6] ==
8783
8784 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
8785 and __data_start are not defined by earlier versions of glibc.  This might
8786 need to be fixed on other platforms as well.
8787 * Changed the way the stack base and backing store base are found on IA64.
8788 This should now remain reliable on future kernels.  But since it relies
8789 on /proc, it will no longer work in the simulated NUE environment.
8790 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
8791 on the OS.  On non-Unix systems, rand() should be used instead.  Handled
8792 small RAND_MAX (thanks to Peter Ross for pointing this out).
8793 * Fixed the cord make rules to create the cord subdirectory, if necessary
8794 (thanks to Doug Moen).
8795 * Changed fo_object_size calculation in finalize.c.  Turned finalization
8796 of non-heap object into a no-op.  Removed anachronism from GC_size()
8797 implementation.
8798 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
8799 It was missed in a previous renaming (thanks to Vladimir Tsichevski
8800 for pointing this out).
8801 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
8802 * Added GC_no_dls hook for applications that want to register their own
8803 roots.
8804 * Integrated Kjetil Matheussen's Amiga changes.
8805 * Added FREEBSD_STACKBOTTOM.  Changed the X86/FreeBSD port to use it
8806 (thanks to Matthew Flatt).
8807 * Added pthread_detach interception for platforms supported by linux_threads.c
8808 and irix_threads.c.
8809 * Changed the USE_MMAP code to check for the case in which we got the
8810 high end of the address space, i.e. mem_ptr + mem_sz == 0.  It appears
8811 that this can happen under Solaris 7.  It seems to be allowed by what
8812 I would claim is an oversight in the mmap specification.  (Thanks to
8813 Toshio Endo for pointing out the problem.)
8814 * Cleanup of linux_threads.c.  Some code was originally cloned from
8815 irix_threads.c and now unnecessary.  Some comments were obviously wrong.
8816 * (Mostly) fixed a longstanding problem with setting of dirty bits from
8817 a signal handler.  In the presence of threads, dirty bits could get lost,
8818 since the getting of a bit in the bit vector was not atomic with respect
8819 to other updates.  The fix is 100% correct only for platforms for which
8820 GC_test_and_set is defined.  The goal is to make that all platforms with
8821 thread support.  Matters only if incremental GC and threads are both
8822 enabled.
8823 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
8824 initialization time, instead of build-time option.  This is a
8825 nontrivial, high risk change.  It should slow down the code measurably
8826 only if MERGE_SIZES is not defined, which is a very nonstandard
8827 configuration.
8828 * Added doc/README.environment, and implemented what it describes.  This
8829 allows a number of additional configuration options to be set through
8830 the environment.  It documents a few previously undocumented options.
8831 * Integrated Eric Benson's leak testing improvements.
8832 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
8833 This became less and less useful as processors enforce stricter alignment.
8834 And it hadn't been tested in ages, and was thus probably broken anyway.
8835
8836
8837 == [6.0alpha5] ==
8838
8839 * Changed the definition of GC_pause in linux_threads.c to use a volatile
8840 asm.  Some versions of gcc apparently optimize away writes to local volatile
8841 variables.  This caused poor locking behavior starting at about
8842 4 processors.
8843 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
8844 to linux_threads.c.
8845 The first two calls could be used to generally avoid sending GC signals to
8846 blocked threads, avoiding both premature wakeups and unnecessary overhead.
8847 * Fixed a serious bug in thread-local allocation.  At thread termination,
8848 GC_free could get called on small integers.  Changed the code for thread
8849 termination to more efficiently return left-over free-lists.
8850 * Integrated Kjetil Matheussen's BeOS support.
8851 * Rearranged the directory structure to create the doc and tests
8852 subdirectories.
8853 * Sort of integrated Eric Benson's patch for OSF1.  This provided basic
8854 OSF1 thread support by suitably extending hpux_irix_threads.c.  Based
8855 on earlier email conversations with David Butenhof, I suspect that it
8856 will be more reliable in the long run to base this on linux_threads.c
8857 instead.  Thus I attempted to patch up linux_threads.c based on Eric's code.
8858 The result is almost certainly broken, but hopefully close enough that
8859 someone with access to a machine can pick it up.
8860 * Integrated lots of minor changes from the NetBSD distribution.  (These
8861 were supplied by David Brownlee.  I'm not sure about the original
8862 authors.)
8863 * Hacked a bit more on the HP/UX thread-support in linux_threads.c.  It
8864 now appears to work in the absence of incremental collection.  Renamed
8865 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
8866 support HPUX there.
8867 * Changed gc.h to define _REENTRANT in cases in which it should already
8868 have been defined. It is still safer to also define it on the command
8869 line.
8870
8871
8872 == [6.0alpha4] ==
8873
8874 * Moved up the detection of mostly full blocks to the initiation of the
8875 sweep phase.  This eliminates some lock contention in the PARALLEL_MARK case,
8876 as multiple threads try to look at mostly full blocks concurrently.
8877 * Restored the code in GC_malloc_many that grabs a prefix of the global
8878 free list.  This avoids the case in which every GC_malloc_many call
8879 tries and fails to allocate a new heap block, and the returns a single
8880 object from the global free list.
8881 * Some minor fixes in new_hblk.c.  (Attempted to build free lists in order
8882 of increasing addresses instead of decreasing addresses for cache performance
8883 reasons.  But this seems to be only a very minor gain with -DEAGER_SWEEP,
8884 and a loss in other cases.  So the change was backed out.)
8885 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
8886 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
8887 large numbers of mmaps (thanks to Eric Benson).  Also fixed that code to
8888 deal with short reads.
8889 * Added GC_get_total_bytes().
8890 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
8891 (This should also now be easy for the other supported threads packages.
8892 But the code is tricky enough that I'm hesitant to do it without being able
8893 to test.  Everything allocated in the GC thread support itself should be
8894 explicitly deallocated.)
8895 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
8896
8897
8898 == [6.0alpha3] 2000-09-26 ==
8899
8900 * Fixed the /proc/self/maps code to not seek, since that apparently is not
8901 reliable across all interesting kernels.
8902 * Fixed some compilation problems in the absence of PARALLEL_MARK
8903 (introduced in alpha2).
8904 * Fixed an algorithmic problem with PARALLEL_MARK.  If work needs to
8905 be given back to the main mark "stack", the BOTTOM entries of the local
8906 stack should be given away, not the top ones.  This has substantial
8907 performance impact, especially for > 2 processors, from what I can tell.
8908 * Extracted gc_lock.h from gc_priv.h.  This should eventually make it a
8909 bit easier to avoid including gc_priv.h in clients.
8910 * Moved all include files to include/ and removed duplicate links to the
8911 same file.  The old scheme was a bad idea because it was too easy to get the
8912 copies out of sync, and many systems don't support hard links.
8913 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
8914 the process, although I tried to update them appropriately.
8915 * Removed the partial support for a copied nursery.  It's not clear that
8916 this would be a tremendous win, since we don't consistently lose to
8917 generational copying collectors.  And it would significantly complicate
8918 many things.  May be reintroduced if/when it really turns out to win.
8919 * Removed references to IRIX_JDK_THREADS, since I believe there never
8920 were and never will be any clients.
8921 * Added some code to linux_threads.c to possibly support HPUX threads
8922 using the Linux code.  Unfortunately, it doesn't work yet, and is
8923 currently disabled.
8924 * Added support under Linux/X86 for saving the call chain, both in (debug)
8925 objects for client debugging, and in GC_arrays._last_stack for GC
8926 debugging.  This was previously supported only under Solaris.  It is
8927 not enabled by default under X86, since it requires that code be compiled
8928 to explicitly gave frame pointers on the call stack.  (With gcc this
8929 currently happens by default, but is often turned off explicitly.)
8930 To turn it on, define SAVE_CALL_CHAIN.
8931
8932
8933 == [6.0alpha2] ==
8934
8935 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
8936 for which that's expensive.
8937 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
8938 * Added a missing volatile to OR_WORD and renamed the parameter to
8939 GC_compare_and_swap so it's not a C++ reserved word (thanks to
8940 Toshio Endo for pointing out both of those).
8941 * Changed Linux dynamic library registration code to look at /proc/self/maps
8942 instead of the rld data structures when REDIRECT_MALLOC is defined.
8943 Otherwise some of the rld data data structures may be prematurely garbage
8944 collected.
8945 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
8946 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
8947 Temporarily added some backward compatibility definitions.  Renamed
8948 USE_LD_WRAP to GC_USE_LD_WRAP.
8949 * Many MACOSX POWERPC changes, some additions to the gctest output, and
8950 a few minor generic bug fixes (thanks to Dietmar Planitzer).
8951
8952
8953 == [6.0alpha1] ==
8954
8955 * Added HP/PA prefetch support.
8956 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
8957 the reliability of generating pointer backtrace information, e.g. in
8958 the Bigloo environment.
8959 * Added parallel marking support (-DPARALLEL_MARK).  This currently
8960 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
8961 to other platforms.  This is intended to be a lighter-weight (less
8962 new code, probably not as scalable) solution than the work by Toshio Endo
8963 et al, at the University of Tokyo.  A number of their ideas were
8964 reused, though the code wasn't, and the underlying data structure
8965 is significantly different.  In particular, we keep the global mark
8966 stack as a single shared data structure, but most of the work is done
8967 on smaller thread-local mark stacks.
8968 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
8969 with -DPARALLEL_MARK.
8970 * Added full support for thread local allocation under Linux
8971 (-DTHREAD_LOCAL_ALLOC).  This is a thin veneer on GC_malloc_many, and
8972 should be easily portable to other platforms, especially those that
8973 support pthreads.
8974 * CLEAR_DOUBLE was not always getting invoked when it should have been.
8975 * GC_gcj_malloc and friends used different out of memory handling than
8976 everything else, probably because I forgot about one when I implemented
8977 the other.  They now both call GC_oom_fn(), not GC_oom_action().
8978 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
8979 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
8980 GC_arrays, and separately registered the first two as excluded roots.
8981 This makes code compiled with gc_inl.h less dependent on the
8982 collector version.  (It would be nice to remove the inclusion of
8983 gc_priv.h by gc_inl.h completely, but we're not there yet.  The
8984 locking definitions in gc_priv.h are still referenced.)
8985 This change was later conditioned on SEPARATE_GLOBALS, which
8986 is not defined by default, since it involves a performance hit.
8987 * Register GC_obj_kinds separately as an excluded root region.  The
8988 attempt to register it with GC_arrays was usually failing.  (This wasn't
8989 serious, but seemed to generate some confusion.)
8990 * Moved backptr.h to gc_backptr.h.
8991
8992
8993 == [5.4] ==
8994
8995 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
8996 Shawn Wagner for actually testing this).
8997 * Fixed GC_is_thread_stack in solaris_threads.c.  It forgot to return a value
8998 in the common case.
8999 * Fixed another silly syntax problem in GC_double_descr (thanks to
9000 Fergus Henderson for finding it).
9001 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
9002
9003
9004 == [5.3] 2000-09-24 ==
9005
9006 * Fixed _end declaration for OSF1.
9007 * There were lots of spurious leak reports in leak detection mode, caused
9008 by the fact that some pages were not being swept, and hence unmarked
9009 objects weren't making it onto free lists.  (This bug dated back to 5.0.)
9010 * Fixed a typo in the liblinuxgc.so Makefile rule.
9011 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
9012 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
9013
9014
9015 == [5.2] ==
9016
9017 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
9018 was defined as a macro.  This prevented the collector from building on
9019 Irix.
9020 * We quietly assumed that indirect mark descriptors were never 0.
9021 Our own typed allocation interface violated that.  This could result
9022 in segmentation faults in the marker with typed allocation.
9023 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
9024 Ben Hutchings for the patch).
9025 * Taught the collector about VC++ handling array operator new (thanks to
9026 Ben Hutchings for the patch).
9027 * The two copies of gc_hdrs.h had diverged.  Made one a link to the other
9028 again.
9029
9030
9031 == [5.1] ==
9032
9033 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
9034 * Fixed a typo in GC_double_descr in typd_mlc.c.
9035 This probably could result in objects described by array descriptors not
9036 getting traced correctly (thanks to Ben Hutchings for pointing this out).
9037 * The block nearly full tests in reclaim.c were not correct for 64 bit
9038 environments.  This could result in unnecessary heap growth under unlikely
9039 conditions.
9040
9041
9042 == [5.0] ==
9043
9044 * Fixed threadlibs.c for linux threads.  -DUSE_LD_WRAP was broken and
9045 -ldl was omitted.  Fixed Linux stack finding code to handle
9046 -DUSE_LD_WRAP correctly.
9047 * Added MSWIN32 exception handler around marker, so that the collector
9048 can recover from root segments that are unmapped during the collection.
9049 This caused occasional failures under Windows 98, and may also be
9050 an issue under Windows NT/2000.
9051
9052
9053 == [5.0alpha7] ==
9054
9055 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
9056 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
9057 accept it.
9058 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
9059 linked into every executable.
9060 * Added PREFETCH to bitmap marker.  Changed it to use the header cache.
9061 * GC_push_marked sometimes pushed one object too many, resulting in a
9062 segmentation fault in GC_mark_from_mark_stack.  This was probably an old
9063 bug.  It finally showed up in gctest on win32.
9064 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
9065 when SMALL_CONFIG was defined.  This was no doubt a major performance bug for
9066 the default win32 configuration.
9067 * Removed -DSMALL_CONFIG from NT_MAKEFILE.  It seemed like an anachronism now
9068 that the average PC has 64MB or so.
9069 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
9070 from the libgcj tree.  Turned on dynamic loading support for Linux/PPC.
9071 * Changed the stack finding code to use environ on HP/UX (thanks
9072 to Gustavo Rodriguez-Rivera for the suggestion).  This should
9073 probably be done on other platforms, too.  Since I can't test those, that'll
9074 wait until after 5.0.
9075
9076
9077 == [5.0alpha6] ==
9078
9079 * GC_malloc_explicitly_typed and friends sometimes failed to
9080 initialize first word.
9081 * Added allocation routines and support in the marker for mark descriptors
9082 in a type structure referenced by the first word of an object.  This was
9083 introduced to support gcj, but hopefully in a way that makes it
9084 generically useful.
9085 * Added GC_requested_heapsize, and inhibited collections in non-incremental
9086 mode if the actual used heap size is less than what was explicitly
9087 requested.
9088 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
9089 attribute pointer.  Solaris thread support used the wrong default thread
9090 stack size (thanks to Melissa O'Neill for the patch).
9091 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
9092 This usually doesn't matter, but it was certainly an accident waiting
9093 to happen ...
9094 * Added GC_register_finalizer_no_order and friends to gc.h.  They're
9095 needed by Java implementations.
9096 * Integrated a fix for a win32 deadlock resulting from clock() calling
9097 malloc (thanks to Chris Dodd).
9098 * Integrated Hiroshi Kawashima's port to Linux/MIPS.  This was designed
9099 for a handheld platform, and may or may not be sufficient for other
9100 machines.
9101 * Fixed a va_arg problem with the %c specifier in cordprnt.c.  It appears
9102 that this was always broken, but recent versions of gcc are the first to
9103 report the (statically detectable) bug.
9104 * Added an attempt at a more general solution to dlopen races/deadlocks.
9105 GC_dlopen now temporarily disables collection.  Still not ideal, but ...
9106 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
9107 prefetch instructions.  May improve performance measurably, but I'm not
9108 sure the code will run correctly on processors that don't support the
9109 instruction.  Won't build except with very recent gcc.
9110 * Added caching for header lookups in the marker.  This seems to result
9111 in a barely measurable performance gain.  Added support for interleaved
9112 lookups of two pointers, but unconfigured that since the performance
9113 gain is currently near zero, and it adds to code size.
9114 * Changed Linux DATASTART definition to check both data_start and
9115 __data_start, since nothing else seems to be portable.
9116 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
9117 wrapping mechanism.  Probably currently useful only on Linux.
9118 * Moved some variables for the scratch allocator into GC_arrays (suggested
9119 by Martin Hirzel).
9120 * Fixed a win32 threads bug that caused the collector to not look for
9121 interior pointers from one of the thread stacks without
9122 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
9123 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
9124 * Changed the alpha port to use the generic register scanning code instead
9125 of alpha_mach_dep.s.  Alpha_mach_dep.s doesn't look for pointers in fp
9126 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
9127 for helping debug this).  Changed the IA64 code to
9128 do something similar for similar reasons.
9129
9130
9131 == [5.0alpha4] 1999-10-30 ==
9132
9133 * Added protection fault handling patch for Linux/M68K from Fergus
9134 Henderson and Roman Hodek.
9135 * Removed the tests for SGI_SOURCE in new_gc_alloc.h.  This was causing that
9136 interface to fail on non-SGI platforms.
9137 * Changed the Linux stack finding code to use /proc, after changing it
9138 to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook).
9139 * Added HP/UX incremental GC support and HP/UX 11 thread support.
9140 Thread support is currently still flaky.
9141 * Added basic Linux/IA64 support.
9142 * Integrated Anthony Green's PicoJava support.
9143 * Integrated Scott Ananian's StrongARM/NetBSD support.
9144 * Fixed some fairly serious performance bugs in the incremental
9145 collector.  These have probably been there essentially forever.
9146 (Mark bits were sometimes set before scanning dirty pages.
9147 The reclaim phase unnecessarily dirtied full small object pages.)
9148 * Changed the reclaim phase to ignore nearly full pages to avoid
9149 touching them.
9150 * Limited GC_black_list_spacing to roughly the heap growth increment.
9151 * Changed full collection triggering heuristic to decrease full GC
9152 frequency by default, but to explicitly trigger full GCs during
9153 heap growth.  This doesn't always improve things, but on average it's
9154 probably a win.
9155 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
9156 bug report and fix).
9157
9158
9159 == [5.0alpha3] 1999-09-15 ==
9160
9161 (Also known as 4.15alpha3.)
9162 * Added some highly incomplete code to support a copied young generation.
9163 Comments on nursery.h are appreciated.
9164 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
9165 so the same effect could be obtained with a runtime switch.   This is
9166 a step towards standardizing on a single dynamic GC library.
9167 * Significantly changed the way leak detection is handled, as a consequence
9168 of the above.
9169
9170
9171 == [5.0alpha2] 1999-07-23 ==
9172
9173 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
9174 * Added -DKEEP_BACK_PTRS and backptr.h interface.  (The implementation
9175 idea came from Alan Demers.)
9176
9177
9178 == [5.0alpha1] 1999-06-30 ==
9179
9180 (Also known as 4.15alpha1.)
9181 * Reworked large block allocator.  Now uses multiple doubly linked free
9182 lists to approximate best fit.
9183 * Changed heap expansion heuristic.  Entirely free blocks are no longer
9184 counted towards the heap size.  This seems to have a major impact on
9185 heap size stability; the old version could expand the heap way too
9186 much in the presence of large block fragmentation.
9187 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
9188 This is mainlyt for collector debugging.
9189 * added -DUSE_MUNMAP to allow the heap to shrink.  Supported on only
9190 a few UNIX-like platforms for now.
9191 * added GC_dump_regions() for debugging of fragmentation issues.
9192 * Changed PowerPC pointer alignment under Linux to 4.
9193 * Changed the Linux/Alpha port to walk the data segment backwards until
9194 it encounters a SIGSEGV.  The old way to find the start of the data
9195 segment broke with a recent release.
9196 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
9197 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
9198 * allochblk sometimes cleared the wrong block for debugging purposes
9199 when it dropped blacklisted blocks.  This could result in spurious
9200 error reports with GC_DEBUG.
9201 * added MACOS X Server support (thanks to Andrew Stone).
9202 * Changed the Solaris threads code to ignore stack limits > 8 MB with
9203 a warning.  Empirically, it is not safe to access arbitrary pages
9204 in such large stacks.  And the dirty bit implementation does not
9205 guarantee that none of them will be accessed.
9206 * Integrated Martin Tauchmann's Amiga changes.
9207 * Integrated James Dominy's OpenBSD/SPARC port.
9208
9209
9210 == [4.14] 1999-04-16 ==
9211
9212 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
9213
9214
9215 == [4.14alpha2] 1999-03-26 ==
9216
9217 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
9218 Recycling the mark stack during expansion could result in a size
9219 zero heap segment, which confused things.  (This was probably also an
9220 issue with the normal config and huge pages.)
9221 * Did more work to make sure that callee-save registers were scanned
9222 completely, even with the setjmp-based code.  Added USE_GENERIC_PUSH_REGS
9223 macro to facilitate testing on machines I have access to.
9224 * Added code to explicitly push register contents for win32 threads.
9225 This seems to be necessary.  (Thanks to Pierre de Rop.)
9226
9227
9228 == [4.14alpha1] 1999-03-10 ==
9229
9230 * Fixed GC_print_source_ptr to not use a prototype.
9231 * generalized CYGWIN test.
9232 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
9233 Rauli Ruohonen).
9234 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
9235 values could fail to be scanned if the register was saved and
9236 reused in a GC frame.  This showed up in verbose mode with gctest
9237 compiled with an unreleased SGI compiler.  I vaguely recall an old
9238 bug report that may have been related.  The bug was probably quite old.
9239 (The problem was that the stack scanning could be deferred until
9240 after the relevant frame was overwritten, and the new save location
9241 might be outside the scanned area.  Fixed by more eager stack scanning.)
9242 * PRINT_BLACK_LIST had some problems.  A few source addresses were garbage.
9243 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
9244 Gary Leavens).
9245 * GC_try_to_collect was broken with the non-incremental collector.
9246 * gc_cleanup destructors could pass the wrong address to
9247 GC_register_finalizer_ignore_self in the presence of multiple
9248 inheritance (thanks to Darrell Schiebel).
9249 * Changed PowerPC Linux stack finding code.
9250
9251
9252 == [4.13] 1999-02-19 ==
9253
9254 * Fixed a crucial bug in the Watcom port.  There was a redundant declaration
9255 of GC_push_one in gc_priv.h.
9256 * Added FINALIZE_ON_DEMAND.
9257 * Fixed some pre-ANSI cc problems in test.c.
9258 * Removed getpagesize() use for Solaris.  It seems to be missing in one
9259 or two versions.
9260 * Fixed bool handling for SPARCCompiler version 4.2.
9261 * Fixed some files in include that had gotten unlinked from the main
9262 copy.
9263 * Some RS/6000 fixes (missing casts).  (Thanks to Toralf Foerster.)
9264 * Fixed several problems in GC_debug_realloc, affecting mostly the
9265 FIND_LEAK case.
9266 * GC_exclude_static_roots contained a buggy unsigned comparison to
9267 terminate a loop (thanks to Wilson Ho).
9268 * CORD_str failed if the substring occurred at the last possible position.
9269 (Only affects cord users.)
9270 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
9271 os_dep.c code for dealing with various Linux versions.
9272 * Added workaround for Irix pthreads sigaction bug and possible signal
9273 misdirection problems.
9274
9275
9276 == [4.13alpha3] 1998-12-08 ==
9277
9278 * Fixed MSWIN32 recognition test, which interfered with cygwin.
9279 * Removed unnecessary gc_watcom.asm from distribution.  Removed
9280 some obsolete README.win32 text.
9281 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
9282 for code for retrieving the fault address in a signal handler).
9283 Changed Linux signal handler context argument to be a pointer.
9284 * Took care of some new warnings generated by the 7.3 SGI compiler.
9285 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
9286 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
9287
9288
9289 == [4.13alpha2] 1998-08-08 ==
9290
9291 * Fixed more Linux threads problems.
9292 * Changed default GC_free_space_divisor to 3 with new large block allocation
9293 (thanks to Matthew Flatt for some measurements that suggest the old
9294 value sometimes favors space too much over time).
9295 * More CYGWIN32 fixes.
9296 * Integrated Tyson Dowd's Linux-M68K port.
9297 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
9298 * Integrated Christoffe Raffali's Linux-SPARC changes.
9299 * Allowed for one more GC fixup iteration after a full GC in incremental
9300 mode.  Some quick measurements suggested that this significantly
9301 reduces pause times even with smaller GC_RATE values.
9302 * Moved some more GC data structures into GC_arrays.  This decreases
9303 pause times and GC overhead, but makes debugging slightly less convenient.
9304 * Fixed namespace pollution problem ("excl_table").
9305 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
9306 that slightly.
9307 * Added some win32 threads fixes.
9308 * Integrated Ivan Demakov and David Stes' Watcom fixes.
9309 * Various other minor fixes contributed by many people.
9310 * Renamed config.h to gcconfig.h, since config.h tends to be used for
9311 many other things.
9312 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
9313 * Fixed up some of the dynamic library Makefile targets for consistency
9314 across platforms.
9315 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
9316 on Solaris.
9317 * Added code to test.c to test thread creation a bit more.
9318 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
9319 * Fixed Solaris 2.7 stack base finding problem.  (This may actually
9320 have been done in an earlier alpha release.)
9321
9322
9323 == [4.13alpha1] 1998-02-17 ==
9324
9325 * Changed RS6000 STACKBOTTOM.
9326 * Integrated Patrick Beard's Mac changes.
9327 * Alpha1 didn't compile on Irix m.n, m < 6.
9328 * Replaced Makefile.dj with a new one from Gary Leavens.
9329 * Added Andrew Stitcher's changes to support SCO OpenServer.
9330 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
9331 pointers.
9332 * Added code to debug allocator to keep track of return address
9333 in GC_malloc caller, thus giving a bit more context.
9334 * Changed default behavior of large block allocator to more
9335 aggressively avoid fragmentation.  This is likely to slow down the
9336 collector when it succeeds at reducing space cost.
9337 * Integrated Fergus Henderson's CYGWIN32 changes.  They are untested,
9338 but needed for newer versions.
9339 * USE_MMAP had some serious bugs.  This caused the collector to fail
9340 consistently on Solaris with -DSMALL_CONFIG.
9341 * Added Linux threads support (thanks to Fergus Henderson).
9342
9343
9344 == [4.12] 1997-08-26 ==
9345
9346 * Fixed ElfW definition in dyn_load.c.
9347 This prevented the dynamic library support from compiling on some
9348 older ELF Linux systems.
9349 * Fixed UTS4 port (which I apparently mangled during the integration).
9350 (Thanks to Alistair Crooks.)
9351 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
9352 Fixed in gc_priv.h.
9353 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
9354 The current state of things should suffice for at least some
9355 applications.
9356 * Changed the out of memory retry count handling.  (This matters only
9357 if GC_max_retries > 0, which is no longer the default.)
9358 * If a /proc read failed repeatedly, GC_written_pages was not updated
9359 correctly (thanks to Peter Chubb for diagnosing this).
9360 * Under unlikely circumstances, the allocator could infinite loop in
9361 an out of memory situation (thanks to Kenjiro Taura for
9362 identifying the problem and supplying a fix).
9363 * Fixed a syntactic error in the DJGPP code.  Also fixed a test program
9364 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
9365 * Atomic uncollectible objects were not treated correctly by the
9366 incremental collector.  This resulted in weird log statistics and
9367 occasional performance problems (thanks to Peter Chubb for pointing this out).
9368 * Fixed some problems resulting from compilers that don't define
9369 __STDC__.  In this case void * and char * were used inconsistently
9370 in some cases.  (Void * should not have been used at all.  If
9371 you have an ANSI superset compiler that does not define __STDC__,
9372 please compile with -D__STDC__=0.  Thanks to Manuel Serrano and others
9373 for pointing out the problem.)
9374 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
9375 Also fixed some other IRIX_THREADS problems which may or may not have
9376 had observable symptoms.
9377 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
9378 Philippe Queinnec).
9379 * SEGV fault handlers sometimes did not get reset correctly (thanks
9380 to David Pickens).
9381 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
9382 This probably needs more work to become functional.
9383 * Fixed struct sigcontext_struct in os_dep.c for compilation under
9384 Linux 2.1.X (thanks to Fergus Henderson).
9385 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
9386 (by Kristian Kristensen).  These may still not be right, but it is
9387 it is likely to work more often than what was there before.  They may
9388 even be exactly right.
9389 * Added a #include <string.h> to test_cpp.cc.  This appears to help
9390 with HP/UX and gcc (thanks to Assar Westerlund).
9391 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
9392 kernels.  This was a problem related to page unaligned heap segments.
9393 Changed the code to page align heap sections on all platforms.
9394 (I had mistakenly identified this as a kernel problem earlier.
9395 It was not.)
9396 * Version 4.11 did not make allocated storage executable, except on
9397 one or two platforms, due to a bug in a #if test (thanks to David Grove
9398 for pointing this out).
9399 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
9400 * Added GC_exclude_static_roots.
9401 * Fixed the object size mapping algorithm.  This shouldn't matter,
9402 but the old code was ugly.
9403 * Heap checking code could die if one of the allocated objects was
9404 larger than its base address.  (Unsigned underflow problem.  Thanks
9405 to Clay Spence for isolating the problem.)
9406 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
9407 to Fred Stearns).
9408 * Added Fergus Henderson's patches for improved robustness with large
9409 heaps and lots of blacklisting.
9410 * Added Peter Chubb's changes to support Solaris Pthreads, to support
9411 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
9412 through /proc, to add malloc_typed_ignore_off_page, and a few other
9413 minor features and bug fixes.
9414 * The Solaris 2 port should not use sbrk.  I received confirmation from
9415 Sun that the use of sbrk and malloc in the same program is not
9416 supported.  The collector now defines USE_MMAP by default on Solaris.
9417 * Replaced the djgpp makefile with Gary Leavens' version.
9418 * Fixed MSWIN32 detection test.
9419 * Added Fergus Henderson's patches to allow putting the collector into
9420 a DLL under GNU win32.
9421 * Added Ivan V. Demakov's port to Watcom C on X86.
9422 * Added Ian Piumarta's Linux/PowerPC port.
9423 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
9424 Brian Burton).  This is of course unsafe, and may be controversial.
9425 On the other hand, it seems to be needed often enough that it's worth
9426 adding as a standard facility.
9427 * Add Lars Farm's suggestions on building the collector for MacOS.
9428
9429
9430 == [4.12alpha2] ==
9431
9432 (Changes not specified.)
9433
9434
9435 == [4.11] 1996-12-03 ==
9436
9437 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
9438 environment.  It appeared to not handle a call while a collection was in
9439 progress, and was otherwise too conservative.
9440 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
9441 code.
9442 * Added Patrick Beard's Mac fixes, with substantial completely untested
9443 modifications.
9444 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
9445 fault addresses (as on an UltraSPARC running Solaris 2.5).  Note that this
9446 was not a problem in the default configuration, which uses PROC_VDB.
9447 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
9448 Fergus Henderson for tracking this down and supplying a patch).
9449 * The write command for "de" was completely broken for large files.
9450 I used the easiest portable fix, which involved changing the semantics
9451 so that f.new is written instead of overwriting f.  That's safer anyway.
9452 * Added README.solaris2 with a discussion of the possible problems of
9453 mixing the collector's sbrk allocation with malloc/realloc.
9454 * Changed the data segment starting address for SGI machines.  The
9455 old code failed under IRIX6.
9456 * Required double word alignment for MIPS.
9457 * Various minor fixes to remove warnings.
9458 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
9459 In particular, the collector could try to fork a thread with the
9460 world stopped as part of GC_thr_init.  It also failed to deal with
9461 the case in which the original thread terminated before the whole
9462 process did.
9463 * Added -DNO_EXECUTE_PERMISSION.  This has a major performance impact
9464 on the incremental collector under Irix, and perhaps under other
9465 operating systems.
9466 * Added some code to support allocating the heap with mmap.  This may
9467 be preferable under some circumstances.
9468 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
9469 * Integrated James Clark's win32 threads support, and made a number
9470 of changes to it (many of which suggested by Pontus Rydin).  This is still
9471 not 100% solid.
9472 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
9473 370-class machine.
9474 * Fixed a serious bug in explicitly typed allocation.  Objects requiring
9475 large descriptors where handled in a way that usually resulted in
9476 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
9477 for helping to track this down).
9478 * Added partial support for GNU win32 development (thanks to
9479 Fergus Henderson).
9480 * Added optional support for Java-style finalization semantics (thanks to
9481 Patrick Bridges).  This is recommended only for Java implementations.
9482 * GC_malloc_uncollectable faulted instead of returning 0 when out of
9483 memory (thanks to Daniel R. Grayson for noticing).
9484 * Calls to GC_base before the collector was initialized failed on a
9485 DEC Alpha (thanks to Matthew Flatt).
9486 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
9487 (thanks to Jeremy Fitzhardinge).
9488 * GC_debug_realloc failed for uncollectible objects (thanks to
9489 Jeremy Fitzhardinge).
9490 * Explicitly typed allocation could crash if it ran out of memory (thanks to
9491 Jeremy Fitzhardinge).
9492 * Added minimal support for a DEC Alpha running Linux.
9493 * Fixed a problem with allocation of objects whose size overflowed
9494 ptrdiff_t.  (This now fails unconditionally, as it should.)
9495 * Added the beginning of Irix pthread support.
9496 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
9497 * Added SGI-style STL allocator support (gc_alloc.h).
9498 * Fixed a serious bug in README.solaris2.
9499 Multi-threaded programs must include
9500 gc.h with SOLARIS_THREADS defined.
9501 * Changed GC_free so it actually deallocates uncollectible objects (thanks
9502 to Peter Chubb for pointing out the problem).
9503 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
9504 * Changed the Borland cc configuration so that the assembler is not
9505 required.
9506 * Fixed a bug in the C++ test that caused it to fail in 64-bit
9507 environments.
9508
9509
9510 == [4.10t3] 1996-11-18 ==
9511
9512 Some changes related to threads support.
9513
9514
9515 == [4.10] 1996-02-19 ==
9516
9517 * Fixed a typo around a call to GC_collect_or_expand in alloc.c.  It broke
9518 handling of out of memory.  (Thanks to Patrick C. Beard for noticing.)
9519
9520
9521 == [4.9] 1996-02-12 ==
9522
9523 * More README.debugging fixes.
9524 * Objects ready for finalization, but not finalized in the same GC
9525 cycle, could be prematurely collected.  This occasionally happened
9526 in test_cpp.
9527 * Too little memory was obtained from the system for very large
9528 objects.  That could cause a heap explosion if these objects were
9529 not contiguous (e.g. under PCR), and too much of them was blacklisted.
9530 * Due to an improper initialization, the collector was too hesitant to
9531 allocate blacklisted objects immediately after system startup.
9532 * Moved GC_arrays from the data into the bss segment by not explicitly
9533 initializing it to zero.  This significantly
9534 reduces the size of executables, and probably avoids some disk accesses
9535 on program startup.  It's conceivable that it might break a port that I
9536 didn't test.
9537 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
9538 occurred a while ago.
9539
9540
9541 == [4.8] 1995-11-20 ==
9542
9543 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
9544 gcc to fail on other platforms.
9545
9546
9547 == [4.7] 1995-11-18 ==
9548
9549 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
9550 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
9551 * Fixed a serious bug for machines with non-word-aligned pointers.
9552 (Thanks to Patrick C. Beard for pointing out the problem.  The collector
9553 should fail almost any conceivable test immediately on such machines.)
9554
9555
9556 == [4.6] 1995-11-09 ==
9557
9558 * Added Linux ELF support (thanks to Arrigo Triulzi).
9559 * GC_base crashed if it was called before any other GC_ routines.
9560 This could happen if a gc_cleanup object was allocated outside the heap
9561 before any heap allocation.
9562 * The heap expansion heuristic was not stable if all objects had finalization
9563 enabled.  Fixed finalize.c to count memory in finalization queue and
9564 avoid explicit deallocation.  Changed alloc.c to also consider this count.
9565 (This is still not recommended.  It's expensive if nothing else.  Thanks
9566 to John Ellis for pointing this out.)
9567 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
9568 this out).
9569 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
9570 pointing this out).  The current workaround is ugly, but expected to be
9571 temporary.
9572 * Fixed a formatting problem for SPARC stack traces.
9573 * Fixed some '=='s in os_dep.c that should have been assignments.
9574 Fortunately these were in code that should never be executed anyway (thanks
9575 to Fergus Henderson).
9576 * Fixed the heap block allocator to only drop blacklisted blocks in small
9577 chunks.  Made BL_LIMIT self adjusting.  (Both of these were in response
9578 to heap growth observed by Paul Graham.)
9579 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
9580 Patrick C. Beard).
9581 * Significantly updated README.debugging.
9582 * Fixed some problems with longjmps out of signal handlers, especially under
9583 Solaris.  Added a workaround for the fact that siglongjmp doesn't appear to
9584 do the right thing with -lthread under Solaris.
9585 * Added MSDOS/djgpp port (thanks to Mitch Harris).
9586 * Added "make reserved_namespace" and "make user_namespace".  The
9587 first renames ALL "GC_xxx" identifiers as "_GC_xxx".  The second is the
9588 inverse transformation.  Note that doing this is guaranteed to break all
9589 clients written for the other names.
9590 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
9591 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1).  This is
9592 a serious bug on machines with pointer alignment of less than a word.
9593 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
9594 end of the object correctly.  Caused failures of the C++ test on a DEC Alpha
9595 with g++.
9596 * gc_inl.h still had problems.  Partially fixed.  Added warnings at the
9597 beginning to hopefully specify the remaining dangers.
9598 * Added DATAEND definition to config.h.
9599 * Fixed some of the .h file organization.  Fixed "make floppy".
9600
9601
9602 == [4.5] 1995-06-14 ==
9603
9604 * Fixed many minor and one major README bugs (thanks to Franklin Chen
9605 for pointing out many of them).
9606 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
9607 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
9608 help from Bruno Haible).
9609 * Altered SPARC recognition tests in gc.h and config.h (mostly as
9610 suggested by Fergus Henderson).
9611 * Added basic incremental GC support for win32, as implemented by
9612 Windows NT and Windows 95.  GC_enable_incremental is a no-op
9613 under win32s, which doesn't implement enough of the VM interface.
9614 * Added -DLARGE_CONFIG.
9615 * Fixed GC_..._ignore_off_page to also function without
9616 -DALL_INTERIOR_POINTERS.
9617 * (Hopefully) fixed RS/6000 port.  (Only the test was broken.)
9618 * Fixed a performance bug in the non-incremental collector running
9619 on machines supporting incremental collection with MPROTECT_VDB
9620 (e.g. SunOS 4, DEC AXP).  This turned into a correctness bug under
9621 win32s with win32 incremental collection.  (Not all memory protection
9622 was disabled.)
9623 * Fixed some ppcr related bit rot.
9624 * Caused dynamic libraries to be unregistered before re-registering.
9625 The old way turned out to be a performance bug on some machines.
9626 * GC_root_size was not properly maintained under MSWIN32.
9627 * Added -DNO_DEBUGGING and GC_dump.
9628 * Fixed a couple of bugs arising with SOLARIS_THREADS +
9629 REDIRECT_MALLOC.
9630 * Added NetBSD/M68K port (thanks to Peter Seebach).
9631 * Fixed a serious realloc bug.  For certain object sizes, the collector
9632 wouldn't scan the expanded part of the object.  (Thanks to Clay Spence
9633 for noticing the problem, and helping me to track it down.)
9634
9635
9636 == [4.4] 1995-02-18 ==
9637
9638 * ASM_CLEAR_CODE was erroneously defined for HP
9639 PA machines, resulting in a compile error.
9640 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
9641 * Gc_cleanup objects didn't work if they were created on
9642 the stack.  Fixed.
9643 * One copy of Gc_cpp.h in the distribution was out of
9644 synch, and failed to document some known compiler
9645 problems with explicit destructor invocation.  Partially
9646 fixed.  There are probably other compilers on which
9647 gc_cleanup is miscompiled.
9648 * Fixed Makefile to pass C compiler flags to C++ compiler.
9649 * Added Mac fixes.
9650 * Fixed os_dep.c to work around what appears to be
9651 a new and different VirtualQuery bug under newer
9652 versions of win32S.
9653 * GC_non_gc_bytes was not correctly maintained by
9654 GC_free.  Fixed (thanks to James Clark).
9655 * Added GC_set_max_heap_size.
9656 * Changed allocation code to ignore blacklisting if it is preventing
9657 use of a very large block of memory.  This has the advantage
9658 that naive code allocating very large objects is much more
9659 likely to work.  The downside is you might no
9660 longer find out that such code should really use
9661 GC_malloc_ignore_off_page.
9662 * Changed GC_printf under win32 to close and reopen the file
9663 between calls.  FAT file systems otherwise make the log file
9664 useless for debugging.
9665 * Added GC_try_to_collect and GC_get_bytes_since_gc.  These
9666 allow starting an abortable collection during idle times.
9667 This facility does not require special OS support.  (Thanks to
9668 Michael Spertus of Geodesic Systems for suggesting this.  It was
9669 actually an easy addition.  Kumar Srikantan previously added a similar
9670 facility to a now ancient version of the collector.  At the time
9671 this was much harder, and the result was less convincing.)
9672 * Added some support for the Borland development environment (thanks
9673 to John Ellis and Michael Spertus).
9674 * Removed a misfeature from checksums.c that caused unexpected
9675 heap growth (thanks to Scott Schwartz).
9676 * Changed finalize.c to call WARN if it encounters a finalization cycle.
9677 WARN is defined in gc_priv.h to write a message, usually to stdout.
9678 In many environments, this may be inappropriate.
9679 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
9680 naming convention.
9681 * Added GC_set_warn_proc to intercept warnings.
9682 * Fixed Amiga port (thanks to Michel Schinz).
9683 * Fixed a bug in mark.c that could result in an access to unmapped
9684 memory from GC_mark_from_mark_stack on machines with unaligned
9685 pointers.
9686 * Fixed a win32 specific performance bug that could result in scanning of
9687 objects allocated with the system malloc.
9688 * Added REDIRECT_MALLOC.
9689
9690
9691 == [4.3] 1994-12-23 ==
9692
9693 * Fixed SPARC alignment problem with GC_DEBUG.
9694 * Fixed Solaris threads /proc workaround.  The real
9695 problem was an interaction with mprotect.
9696 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
9697 * Slightly improved allocator space utilization by
9698 fixing the GC_size_map mechanism.
9699 * Integrated some Sony News and MIPS RISCos 4.51
9700 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
9701 Inc., Japan).
9702 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
9703 * Added GC_same_obj and friends.  Changed GC_base
9704 to return 0 for pointers past the end of large objects.
9705 Improved GC_base performance with ALL_INTERIOR_POINTERS
9706 on machines with a slow integer mod operation.
9707 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
9708 for preprocessor.
9709 * changed the default on most UNIX machines to be that
9710 signals are not disabled during critical GC operations.
9711 This is still ANSI-conforming, though somewhat dangerous
9712 in the presence of signal handlers. But the performance
9713 cost of the alternative is sometimes problematic.
9714 Can be changed back with a minor Makefile edit.
9715 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
9716 following my own naming convention.  Added the function
9717 CORD_to_const_char_star.
9718 * Fixed a gross bug in GC_finalize.  Symptom: occasional
9719 address faults in that function (thanks to Anselm Baird-Smith).
9720 * Added port to ICL DRS6000 running DRS/NX.  Restructured
9721 things a bit to factor out common code, and remove obsolete
9722 code.  Collector should now run under SUNOS5 with either
9723 mprotect or /proc dirty bits.  (Thanks to Douglas Steel.)
9724 * More bug fixes and workarounds for Solaris 2.X.  (These were
9725 mostly related to putting the collector in a dynamic library,
9726 which didn't really work before.  Also SOLARIS_THREADS
9727 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
9728 * Fixed a serious performance bug on the DEC Alpha.  The text
9729 segment was getting registered as part of the root set.
9730 (Amazingly, the result was still fast enough that the bug
9731 was not conspicuous.) The fix works on OSF/1, version 1.3.
9732 Hopefully it also works on other versions of OSF/1 ...
9733 * Fixed a bug in GC_clear_roots.
9734 * Fixed a bug in GC_generic_malloc_words_small that broke
9735 gc_inl.h (reported by Antoine de Maricourt).
9736 * Fixed some problems with cord/de under Linux.
9737 * Fixed some cord problems, notably with CORD_riter4.
9738 * Added DG/UX port (thanks to Ben A. Mesander).
9739 * Added finalization registration routines with weaker ordering
9740 constraints.  (This is necessary for C++ finalization with
9741 multiple inheritance, since the compiler often adds self-cycles.)
9742 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
9743 * Completely rewritten the documentation in the interface gc_c++.h
9744 (later renamed gc_cpp.h) making it both clearer and more precise (done by
9745 John Ellis).
9746 * The definition of accessibility now ignores pointers from a finalizable
9747 object (an object with a clean-up function) to itself (done by John Ellis).
9748 This allows objects with virtual base classes to be finalizable by the
9749 collector.  Compilers typically implement virtual base classes using
9750 pointers from an object to itself, which under the old definition of
9751 accessibility prevented objects with virtual base classes from ever
9752 being collected or finalized.
9753 * gc_cleanup now includes gc as a virtual base.  This was enabled by
9754 the change in the definition of accessibility (by John Ellis).
9755 * Added support for operator new[] (by John Ellis).  Since most compilers
9756 don't yet support operator new[], it is conditionalized on
9757 -DOPERATOR_NEW_ARRAY.  The code is untested, but its trivial and looks
9758 correct.
9759 * The test program test_gc_c++ (later renamed test_cpp.cc)
9760 tries to test for the C++-specific functionality not tested by the
9761 other programs.
9762 * Added unistd.h include to misc.c.  (Needed for ppcr.)
9763 * Added PowerMac port (thanks to Patrick C. Beard).
9764 * Fixed "srcdir"-related Makefile problems.  Changed things so
9765 that all externally visible include files always appear in the
9766 include subdirectory of the source.  Made gc.h directly
9767 includable from C++ code (thanks to Per Bothner).
9768 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
9769 * Renamed C++ related files so they could live in a FAT
9770 file system (thanks to Charles Fiterman).
9771 * Changed Windows NT Makefile to include C++ support in
9772 gc.lib.  Added C++ test as Makefile target.
9773
9774
9775 == [4.2] 1994-08-03 ==
9776
9777 * Multiple bug fixes/workarounds in the Solaris threads version.
9778 (It occasionally failed to locate some register contents for
9779 marking.  It also turns out that thr_suspend and friends are
9780 unreliable in Solaris 2.3.  Dirty bit reads appear
9781 to be unreliable under some weird
9782 circumstances.  My stack marking code
9783 contained a serious performance bug.  The new code is
9784 extremely defensive, and has not failed in several CPU
9785 hours of testing.  But no guarantees ...)
9786 * Added MacOS support.  (Thanks to Patrick C. Beard.
9787 David Chase suggested several improvements.)
9788 * Fixed several syntactic bugs in gc_c++.h and friends.  (These
9789 didn't bother g++, but did bother most other compilers.)
9790 Fixed gc_c++.h finalization interface.
9791 * 64 bit alignment for allocated objects was not guaranteed in a
9792 few cases in which it should have been.
9793 * Added GC_malloc_atomic_ignore_off_page.
9794 * Added GC_collect_a_little.
9795 * Added some prototypes to gc.h.
9796 * Some other minor bug fixes (notably in Makefile).
9797 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
9798 * Fixed AmigaDOS port (thanks to Michel Schinz).
9799 * Fixed the DATASTART definition under Solaris.  There
9800 was a 1 in 16K chance of the collector missing the first
9801 64K of static data (and thus crashing).
9802 * Fixed some blatant anachronisms in the README file.
9803 * Fixed PCR-Makefile for upcoming PPCR release.
9804
9805
9806 == [4.1] 1994-05-20 ==
9807
9808 * Changed finalization implementation to guarantee that
9809 finalization procedures are called outside of the allocation
9810 lock, making direct use of the interface a little less dangerous.
9811 MAY BREAK EXISTING CLIENTS that assume finalizers
9812 are protected by a lock.  Since there seem to be few multi-threaded
9813 clients that use finalization, this is hopefully not much of
9814 a problem.
9815 * Fixed a gross bug in CORD_prev.
9816 * Fixed a bug in blacklst.c that could result in unbounded
9817 heap growth during startup on machines that do not clear
9818 memory obtained from the OS (e.g. win32S).
9819 * Ported de editor to win32/win32S.  (This is now the only
9820 version with a mouse-sensitive UI.  Thanks to Rob Haack for the
9821 implementation based on the generic Windows application template.)
9822 * Added GC_malloc_ignore_off_page to allocate large arrays
9823 in the presence of ALL_INTERIOR_POINTERS.
9824 * Changed GC_call_with_alloc_lock to not disable signals in
9825 the single-threaded case.
9826 * Reduced retry count in GC_collect_or_expand for garbage
9827 collecting when out of memory.
9828 * Made uncollectible allocations bypass black-listing, as they
9829 should.
9830 * Fixed a bug in typed_test in test.c that could cause (legitimate)
9831 GC crashes.
9832 * Fixed some potential synchronization problems in finalize.c
9833 * Fixed a real locking problem in typd_mlc.c.
9834 * Worked around an AIX 3.2 compiler feature that results in
9835 out of bounds memory references.
9836 * Partially worked around an IRIX5.2 beta problem (which may
9837 or may not persist to the final release).
9838 * Fixed a bug in the heap integrity checking code that could
9839 result in explicitly deallocated objects being identified as
9840 smashed.  Fixed a bug in the dbg_mlc stack saving code
9841 that caused old argument pointers to be considered live.
9842 * Fixed a bug in CORD_ncmp (and hence CORD_str).
9843 * Repaired the OS2 port, which had suffered from bit rot
9844 in 4.0.  Worked around what appears to be CSet/2 V1.0
9845 optimizer bug.
9846 * Fixed a Makefile bug for target "c++".
9847
9848
9849 == [4.0] 1994-04-07 ==
9850
9851 * Added support for Solaris threads (which was possible
9852 only by reimplementing some fraction of Solaris threads,
9853 since Sun doesn't currently make the thread debugging
9854 interface available).
9855 * Added non-threads win32 and win32S support.
9856 * (Grudgingly, with suitable muttering of obscenities) renamed
9857 files so that the collector distribution could live on a FAT
9858 file system.  Files that are guaranteed to be useless on
9859 a PC still have long names.  Gc_inline.h and gc_private.h
9860 still exist, but now just include  gc_inl.h and gc_priv.h.
9861 * Fixed a really obscure bug in finalization that could cause
9862 undetected mark stack overflows.  (I would be surprised if
9863 any real code ever tickled this one.)
9864 * Changed finalization code to dynamically resize the hash
9865 tables it maintains.  (This probably does not matter for well-
9866 -written code.  It no doubt does for C++ code that overuses
9867 destructors.)
9868 * Added typed allocation primitives.  Rewrote the marker to
9869 accommodate them with more reasonable efficiency.  This
9870 change should also speed up marking for GC_malloc allocated
9871 objects a little.  See gc_typed.h for new primitives.  (Thanks to
9872 Zhong Shao performed much of the experimentation that led to the
9873 current typed allocation facility.)
9874 * Improved debugging facilities slightly.  Allocation time
9875 stack traces are now kept by default on SPARC/SUNOS4.  (Thanks to
9876 Scott Schwartz.)
9877 * Added better support for small heap applications.
9878 * Significantly extended cord package.  Fixed a bug in the
9879 implementation of lazily read files.  Printf and friends now
9880 have cord variants.  Cord traversals are a bit faster.
9881 * Made ALL_INTERIOR_POINTERS recognition the default.
9882 * Fixed de so that it can run in constant space, independent
9883 of file size.  Added simple string searching to cords and de.
9884 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
9885 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
9886 Tim Bingham at DEC).
9887 * Changed argument to GC_expand_hp to be expressed
9888 in units of bytes instead of heap blocks.  (Necessary
9889 since the heap block size now varies depending on
9890 configuration.  The old version was never very clean.)
9891 * Added GC_get_heap_size().  The previous "equivalent"
9892 was broken.
9893 * Restructured the Makefile a bit.
9894 * Added FreeBSD port (provided by Jeffrey Hsu).
9895
9896
9897 == [3.7] 1994-03-15 ==
9898
9899 * Added a workaround for an HP/UX compiler bug.
9900 * Fixed another stack clearing performance bug.  Reworked
9901 that code once more.
9902
9903
9904 == [3.6] 1994-01-14 ==
9905
9906 * fixed a bug in the mark stack growth code that was introduced
9907 in 3.4.
9908 * fixed Makefile to work around DEC AXP compiler tail recursion
9909 bug.
9910
9911
9912 == [3.5] ==
9913
9914 * Minor collections now mark from roots only once, if that
9915 doesn't cause an excessive pause.
9916 * The stack clearing heuristic was refined to prevent anomalies
9917 with very heavily recursive programs and sparse stacks.
9918 * Fixed a bug that prevented mark stack growth in some cases.
9919 GC_objects_are_marked should be set to TRUE after a call
9920 to GC_push_roots and as part of GC_push_marked, since
9921 both can now set mark bits.  I think this is only a performance
9922 bug, but I wouldn't bet on it.  It's certainly very hard to argue
9923 that the old version was correct.
9924 * Fixed an incremental collection bug that prevented it from
9925 working at all when HBLKSIZE != getpagesize()
9926 * Changed dynamic_loading.c to include gc_priv.h before testing
9927 DYNAMIC_LOADING.  SunOS dynamic library scanning
9928 must have been broken in 3.4.
9929 * Object size rounding now adapts to program behavior.
9930 * Added a workaround (provided by Manuel Serrano and
9931 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
9932 that I had incorrectly assumed to have been squished.
9933 The collector was broken if the text segment size was within
9934 32 bytes of a multiple of 8K bytes, and if the beginning of
9935 the data segment contained interesting roots.  The workaround
9936 assumes a demand-loadable executable.  The original may have
9937 have "worked" in some other cases.
9938 * Added dynamic library support under IRIX5.
9939 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
9940 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
9941
9942
9943 == [3.4] ==
9944
9945 * Fixed a performance bug in GC_realloc.
9946 * Updated the amiga port.
9947 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
9948 * Added cord library.
9949 * Added trivial performance enhancement for
9950 ALL_INTERIOR_POINTERS (do not scan last word).
9951
9952
9953 == [3.3] 1993-10-02 ==
9954
9955 * PCR-specific bugs (thanks to Neil Sharman).
9956 * Missing locking in GC_free, redundant FASTUNLOCK
9957 in GC_malloc_stubborn, and 2 bugs in
9958 GC_unregister_disappearing_link (pointed out by Neil Sharman).
9959 * Common symbols allocated by the SunOS4.X dynamic loader
9960 were not included in the root set.
9961 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
9962 * Merged Amiga port from Jesper Peterson (untested).
9963 * Merged NeXT port from Thomas Funke (significantly
9964 modified and untested).  (Also thanks to Brian D. Carlstrom for
9965 the supplied the NeXT ports.)
9966
9967
9968 == [3.2] ==
9969
9970 Fixed a serious and not entirely repeatable bug in
9971 the incremental collector.  It appeared only when dirty bit info
9972 on the roots was available, which is normally only under Solaris.
9973 It also added GC_general_register_disappearing_link, and some
9974 testing code.  Interface.c disappeared.
9975
9976
9977 == [3.1] ==
9978
9979 * A workaround for a SunOS 4.X SPARC C compiler
9980 misfeature that caused problems when the collector was turned into
9981 a dynamic library.
9982 * A fix for a bug in GC_base that could result in a memory fault.
9983 * A fix for a performance bug (and several other misfeatures) pointed
9984 out by Dave Detlefs and Alan Dosser.
9985 * Use of dirty bit information for static data under Solaris 2.X.
9986 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
9987 * Incremental collection on more platforms.
9988 * A more refined heap expansion policy.  Less space usage by default.
9989 * Various minor enhancements to reduce space usage, and to reduce
9990 the amount of memory scanned by the collector.
9991 * Uncollectible allocation without per object overhead.
9992 * More conscientious handling of out-of-memory conditions.
9993 * Fixed a bug in debugging stubborn allocation.
9994 * Fixed a bug that resulted in occasional erroneous reporting of smashed
9995 objects with debugging allocation.
9996 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
9997
9998
9999 == [3.0] ==
10000
10001 Added generational/incremental collection and stubborn objects.
10002
10003
10004 == [2.6] 1993-04-27 ==
10005
10006 (Changes not specified.)
10007
10008
10009 == [2.5] ==
10010
10011 * Removed an explicit call to exit(1)
10012 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
10013 arguments are always supplied.  The OS/2 C compiler gets confused if
10014 the number of actuals and the number of formals differ.  (ANSI C
10015 doesn't require this to work.  The ANSI sanctioned way of doing things
10016 causes too many compatibility problems.)
10017
10018
10019 == [2.4] 1993-01-26 ==
10020
10021 Added GC_free_space_divisor as a tuning knob, added
10022 support for OS/2 and linux, and fixed the following bugs:
10023 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
10024 fail to be considered for marking.
10025 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
10026 bss sections of the dynamic library.  This could result in a bad memory
10027 reference if the actual length was a multiple of a page.  (Observed on
10028 Sun 3.  Can probably also happen on a Sun 4.)
10029 (Thanks to Robert Brazile for pointing out that the Sun 3 version
10030 was broken.  Dynamic library handling is still broken on Sun 3s
10031 under 4.1.1U1, but apparently not 4.1.1.  If you have such a machine,
10032 use -Bstatic.)
10033
10034
10035 == [2.3] ==
10036
10037 * Added ALL_INTERIOR_POINTERS.
10038 * Missing declaration of etext in the A/UX version.
10039 * Some PCR root-finding problems.
10040 * Blacklisting was not 100% effective, because the plausible future
10041 heap bounds were being miscalculated.
10042 * GC_realloc didn't handle out-of-memory correctly.
10043 * GC_base could return a nonzero value for addresses inside free blocks.
10044 * test.c wasn't really thread safe, and could erroneously report failure
10045 in a multi-threaded environment.  (The locking primitives need to be
10046 replaced for other threads packages.)
10047 * GC_CONS was thoroughly broken.
10048 * On a SPARC with dynamic linking, signals stayed disabled while the
10049 client code was running (thanks to Manuel Serrano).
10050
10051
10052 == [2.2] ==
10053
10054 * GC_realloc could fail to extend the size of the object for certain large
10055 object sizes.
10056 * A blatant subscript range error in GC_printf, which unfortunately
10057 wasn't exercised on machines with sufficient stack alignment constraints.
10058 * GC_register_displacement did the wrong thing if it was called after
10059 any allocation had taken place.
10060 * The leak finding code would eventually break after 2048 byte
10061 byte objects leaked.
10062 * interface.c didn't compile.
10063 * The heap size remained much too small for large stacks.
10064 * The stack clearing code behaved badly for large stacks, and perhaps
10065 on HP/PA machines.
10066
10067
10068 == [2.1] ==
10069
10070 * The first stable version since 1.9.
10071 * Added support for PPCR.
10072
10073
10074 == [2.0] ==
10075
10076 * Introduced a consistent naming convention for collector
10077 routines and added support for registering dynamic library data segments
10078 in the standard mark_roots.c (original code supporting the SunOS dynamic
10079 loader provided by Bill Janssen).  Most of the data structures were revamped.
10080 The treatment of interior pointers was completely changed.  Finalization
10081 was added.  Support for locking was added.  Object kinds were added.
10082 We added a black listing facility to avoid allocating at addresses known
10083 to occur as integers somewhere in the address space.  Much of this
10084 was accomplished by adapting ideas and code from the PCR collector.
10085 The test program was changed and expanded.
10086
10087
10088 == [1.9] 1992-01-29 ==
10089
10090 * fixed a major bug in gc_realloc.
10091
10092
10093 == [1.8] ==
10094
10095 * added ULTRIX support in gc_private.h.  (Robert Brazile originally supplied
10096 the ULTRIX code.  Alan Dosser and Regis Cridlig subsequently provided updates
10097 and information on variation between ULTRIX systems.)
10098
10099
10100 == [1.5] ==
10101
10102 * ensure 8 byte alignment for objects allocated on a sparc based machine.
10103
10104
10105 == [1.4] ==
10106
10107 * Does not use compile time determined values
10108 for the stack base.  This no longer works on Sun 3s, since Sun 3/80s use
10109 a different stack base.  We now use a straightforward heuristic on all
10110 machines on which it is known to work (incl. Sun 3s) and compile-time
10111 determined values for the rest.  There should really be library calls
10112 to determine such values.
10113
10114
10115 == [1.3] ==
10116
10117 * Fixed spurious
10118 assembly language assignments to TMP_SP.  Only the assignment in the PC/RT
10119 code is necessary.  On other machines, with certain compiler options,
10120 the assignments can lead to an unsaved register being overwritten.
10121 Known to cause problems under SunOS 3.5 WITHOUT the -O option.  (With
10122 -O the compiler recognizes it as dead code.  It probably shouldn't,
10123 but that's another story.)
10124 The SPARC-specific code was originally contributed by Mark Weiser.
10125 The Encore Multimax modifications were supplied by Kevin Kenny.
10126 The adaptation to the IBM PC/RT is largely
10127 due to Vernon Lee, on machines made available to Rice by IBM.
10128 Much of the HP specific code and a number of good suggestions for improving
10129 the generic code are due to Walter Underwood.
10130 Parag Patel supplied the A/UX code.
10131 Manuel Serrano supplied linux and Sony News specific code.