Workaround 'NULL==*flh is always true' cppcheck style warning in allocobj
[platform/upstream/libgc.git] / 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 debug messages on thread suspend/resume (Win32)
9 * Add testing of GC_CALLOC/MALLOC_EXPLICITLY_TYPED (gctest)
10 * Adjust formatting of numbered lists in README.md to match other .md files
11 * Adjust highlighting of API prototypes in gcinterface.md
12 * Adjust macro def/usage for AVR32, CRIS, NETBSD, OPENBSD, SH4 in gcconfig.h
13 * Adjust printf calls in gctest check_heap_stats so that each has new-line
14 * Allow incremental GC on Cygwin
15 * Allow memory unmapping in case of MPROTECT_VDB
16 * Build cord.lib by Makefile.direct, NT_MAKEFILE, OS2_MAKEFILE, WCC_MAKEFILE
17 * Build gc as a shared multi-threaded library by default (CMake)
18 * Build gccpp library by Makefile.direct, NT_MAKEFILE and WCC_MAKEFILE
19 * Build shared libraries by default (WCC_MAKEFILE)
20 * Check real-symbols are already initialized in pthread_join/detach
21 * Collapse multiple includes of windows.h (code refactoring)
22 * Comments reformatting in mark.c to properly delimit sentences
23 * Compile de test GUI app with resources (CMake)
24 * Compile gc.c unless building static libraries (NT_MAKEFILE, WCC_MAKEFILE)
25 * Compile msvc_dbg.c by CMake script (MS VC)
26 * Define STATIC macro to static by default
27 * Do not build tests by default (Makefile.direct and other Makefiles)
28 * Do not build the tests by default (CMake)
29 * Do not define GC_write_cs for Xbox One target
30 * Eliminate 'checking if unsigned i < 0' cppcheck FP in is_heap_base
31 * Eliminate 'hash_val value is never used' cppcheck false positive
32 * Eliminate 'stop variable is always 0' compiler warning in print_callers
33 * Eliminate 'struct member os_callback is never used' cppcheck warning
34 * Enable CMake-based build for Borland and Watcom compilers
35 * Enable compilation without C runtime (Win32)
36 * Enable mprotect-based incremental GC for Linux/arm and Linux/aarch64
37 * Enable true incremental collection even if parallel marker is on
38 * Fix HOST determination in CMake script
39 * Generate cordtest and de executable files in GC base folder
40 * Get rid of some non-ELF ifdefs (code refactoring)
41 * Move QNX and Emscripten macro definitions to proper place in gcconfig.h
42 * New API function to get size of object debug header
43 * New API standalone functions to acquire and release the allocator lock
44 * New macro (CONSOLE_LOG) to enable logging to console on Win32
45 * New macro (GCTEST_PRINT_VERBOSE) to enable verbose logging in test.c only
46 * New macro (NO_MSGBOX_ON_ERROR) to avoid message box on GC abort (Win32)
47 * Pass -D GC_DLL -fvisibility=hidden if default configure build is requested
48 * Print pid of child processes if verbose logging (gctest)
49 * Refine flags field comment in pthread_support.h
50 * Reformat code of GC_push_roots
51 * Reformat gc.man (wrap long lines)
52 * Reformatting and code refactoring of CMake script
53 * Remove 'current users' section from overview.md
54 * Remove 'distributed ports', 'scalable versions' sections from overview.md
55 * Remove Borland-specific Makefile and gc.mak script
56 * Remove Linux-specific commands for building cord/de from Makefile.direct
57 * Remove Win32 main_thread static variable if threads discovery is disabled
58 * Remove dash characters comprising prefix of some verbose logs (gctest)
59 * Remove dependency on user32.dll import library from static libgc (Win32)
60 * Remove documentation specific to particular old BDWGC releases
61 * Remove gcmt-dll generation, rename libgc-lib.a to libgc.a (CMake)
62 * Remove goto statement in print_callers (code refactoring)
63 * Remove redundant GC_with_callee_saves_pushed call in multi-threaded builds
64 * Remove redundant check of GC_free argument in register_finalizer
65 * Remove redundant type casts in backgraph HEIGHT_UNKNOWN/IN_PROGRESS
66 * Remove unused STACK_GRAN macro definitions (code refactoring)
67 * Remove unused sparc_sunos4_mach_dep.s file
68 * Rename cord/cord test executable to de (CMake)
69 * Rename gc64.dll to gc.dll and gc[64]_dll.lib to gc.lib in NT_MAKEFILE
70 * Rename gc68060.lib to gc.lib, cord/cord68060.lib to cord.lib in SMakefile
71 * Rename make_as_lib option to enable_static in NT_MAKEFILE and WCC_MAKEFILE
72 * Rename nothreads option to disable_threads in NT_MAKEFILE
73 * Replace "msecs" with "ms" in all comments and messages
74 * Replace 'stack base' with 'stack bottom' in the documentation
75 * Replace _M_AMD64 macro with _M_X64 (code refactoring)
76 * Replace push_one calls with push_many_regs one for Win32 thread context
77 * Report time with a nanosecond precision where available
78 * Set GC_collecting hint for GC_collect_a_little_inner calls (pthreads)
79 * Simplify logged message in scratch_recycle
80 * Simplify loops of collect_a_little/stopped_mark invoking mark_some
81 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (CMake)
82 * Support header files installation (CMake)
83 * Support most configure options in CMake script
84 * Suppress warnings in test_tinyfl() of gctest reported by Watcom C complier
85 * Turn off C++ API by default, export it in gccpp library (CMake)
86 * Update README.cmake regarding Unix, C++ and tests
87 * Update libgc.so version info to differentiate against v8.0.x
88 * Update the ASCII diagrams describing the tree structure for pointer lookups
89 * Update the documentation to match the current GC implementation
90 * Upgrade cmake_minimum_required(version) to 3.1
91 * Use CreateThread without GC_ prefix in gctest (code refactoring)
92 * Use KB/MB/GB abbreviations uniformly across entire documentation
93 * Use atomic primitives for Sony PlayStation Portable 2 and PS4
94 * Use better precision Windows timers
95 * Workaround various cppcheck false positives
96
97
98 == [8.0.6] (not released yet) ==
99
100 * Add support of OpenBSD/aarch64
101 * Allow GC_PAUSE_TIME_TARGET environment variable values smaller than 5 ms
102 * Avoid compiler warning about unused d in GC_CALLOC/MALLOC_EXPLICITLY_TYPED
103 * Define OS_TYPE and DATAEND for UWP targets
104 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
105 * Do not use Manual VDB mode if C malloc is redirected
106 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
107 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
108 * Eliminate 'possible loss of data' BCC and MS VC warnings
109 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
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 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
115 * Fix 'ISO C++17 does not allow dynamic exception spec' clang-8 error
116 * Fix 'condition pred!=NULL is always true' compiler warning
117 * Fix 'external linkage required for var because of dllimport' error on MinGW
118 * Fix 'ulong undefined' compilation error on AIX
119 * Fix 'wrong finalization data' gctest failure on Windows
120 * Fix MPROTECT_VDB definition for single-threaded GC builds
121 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
122 * Fix build for OS X (CMake)
123 * Fix building of shared library with C++ support on MinGW
124 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
125 * Fix configure message about 'AIX gcc optimization fix'
126 * Fix cordtest build in SMakefile.amiga
127 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
128 * Fix gc_allocator.h compilation by Clang
129 * Fix incorrect markup formatting in documentation
130 * Fix mmap(PROT_NONE) failure on AIX
131 * Fix printf format specifier in simple_example.md
132 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
133 * Fix subexpression widening in memhash() of disclaim_weakmap_test
134 * Fix test_cpp failure caused by arbitrary link order (Win32)
135 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
136 * Fix various typos mostly in documentation files
137 * Fix word size, data start and alignment for OpenBSD/mips64(el)
138 * Prevent GetThreadContext failure (Windows)
139 * Prevent WARN of incompatible incremental GC if default or manual VDB
140 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
141 * Refactoring of WoW64 workaround (Win32)
142 * Refine GC_INIT documentation about its multiple invocation
143 * Refine GC_parallel documentation in gc.h
144 * Refine do_blocking() documentation in gc.h
145 * Remove a misleading comment about Solaris in gc.h
146 * Remove gcmt-lib generation by CMake
147 * Support MSYS builds by CMake and configure
148 * Update documentation about the incremental collector support
149 * Workaround 'expression is only useful for its side effects' WCC warning
150 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
151
152
153 == [8.0.4] 2019-03-02 ==
154
155 * Avoid a full GC when growing finalizer tables if in incremental mode
156 * Avoid potential race in hb_sz access between realloc and reclaim_block
157 * Avoid test.o rebuild on tests folder timestamp change (Makefile.direct)
158 * Avoid unexpected heap growth in gctest caused by GC_disable
159 * Ensure result of every variant of MS_TIME_DIFF has unsigned long type
160 * Fix 'duplicate symbol' error for tests using multiple static libs (OS X)
161 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
162 * Fix 'unexpected mark stack overflow' abort in push_all_stack
163 * Fix 'wrong __data_start/_end pair' error on Android
164 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
165 * Fix GetThreadContext stale register values use if WoW64 (Win32)
166 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
167 * Fix thread_info() count argument value (OS X)
168 * Support de_win.c compilation by Makefile.direct (cord/de)
169
170
171 == [8.0.2] 2018-12-23 ==
172
173 * Abort with appropriate message if executable pages cannot be allocated
174 * Add initial testing of GC_enable/disable, MALLOC[_ATOMIC]_IGNORE_OFF_PAGE
175 * Add paths to filenames mentioned in the copyright section in README
176 * Add test using disclaim notifiers to implement a weak map
177 * Adjust #error messages format
178 * Allow to force executable pages allocation in gctest
179 * Avoid potential 'macro redefinition' errors for config.h macros
180 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
181 * Check result of pthread_mutex_unlock in specific.c
182 * Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
183 * Default to non-executable memory allocation across all make scripts
184 * Define GC_ATOMIC_UNCOLLECTABLE and JAVA_FINALIZATION in all make scripts
185 * Do not prevent GC from looking at environment variables (BCC_MAKEFILE)
186 * Do not use 'ifndef AO_CLEAR' in mark, pthread_support and gctest
187 * Do not use spin locks if AO test-and-set is emulated (pthreads)
188 * Document HANDLE_FORK macro optional usage in Makefile.direct
189 * Document assertion in the setters that used to return old value
190 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
191 * Eliminate 'casting signed to bigger unsigned int' CSA warning
192 * Eliminate 'different const qualifiers' MS VC warnings in cordbscs
193 * Eliminate 'function is never used' cppcheck warning for calloc/realloc
194 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
195 * Eliminate 'pointer targets differ in signedness' compiler warning (Win32)
196 * Eliminate 'struct member is never used' cppcheck warnings in os_dep
197 * Eliminate 'uninitialized var' cppcheck false positive in mach_dep, os_dep
198 * Eliminate 'unreferenced formal parameter' compiler warning in msvc_dbg
199 * Eliminate redundant check in backwards_height
200 * Fix 'USE_MUNMAP macro redefinition' error for NaCl
201 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
202 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
203 * Fix 'too wide non-owner permissions are set for resource' code defect
204 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
205 * Fix GC_register_disclaim_proc for leak-finding mode
206 * Fix a deadlock in write_fault_handler if AO_or is emulated
207 * Fix comment typo in CMakeLists.txt
208 * Fix concurrent bitmap update in GC_dirty
209 * Fix deadlocks in write and suspend handlers if AO test-and-set is emulated
210 * Fix executable memory allocation in GC_unix_get_mem
211 * Fix hbp overflow in GC_install_counts
212 * Fix linkage with a system libatomic_ops shared library
213 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
214 * Fix marking of finalizer closure object
215 * Fix marks and hb_n_marks consistency when disclaim returns true
216 * Fix memory allocation on GCF (Linux/x64)
217 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
218 * Fix test_cpp assertion violation in find-leak mode
219 * Fix tests linkage with internal atomic_ops.o
220 * Fix unneeded end_stubborn_change/ptr_store_and_dirty in disclaim_test
221 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
222 * New macro to suppress printing of leaked objects
223 * Pass -Wall -Wextra -Wpedantic to g++ if supported (configure)
224 * Prefix internal durango_get_mem symbol with 'GC_'
225 * Prevent double inclusion of javaxfc.h and private/specific.h
226 * Print relevant message in tests not appropriate for leak detection mode
227 * Reduce scope of local variables in GC_remove_all_threads_but_me
228 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
229 * Refine documentation in gc_disclaim.h
230 * Remove extra USE_MMAP definition for Interix
231 * Remove redundant header double-inclusion checks in the private headers
232 * Remove strlen calls with a constant string argument in msvc_dbg
233 * Specify register_disclaim_proc and finalized_malloc argument as non-null
234 * Support UWP/arm64 target
235 * Test marking of finalizer closure object in disclaim_test
236 * Turn off leak detection mode explicitly in cord/de
237 * Turn off parallel marker, thread-local allocation if used AO ops emulated
238 * Turn on gcj functionality in BCC, DMC, NT, OS/2, WCC makefiles
239 * Turn on memory unmapping in BCC/DMC/NT/WCC makefiles and Makefile.direct
240 * Update NO_EXECUTE_PERMISSION documentation
241 * Update documentation about arm64 ABI in gcconfig.h
242 * Use AO_or in async_set_pht_entry_from_index if available
243 * Use GC_WORD_MAX macro across all C source files
244 * Use macro to operate on a flag residing in GC_stop_count
245 * Use standalone private macro to guard against ptr_t redefinition
246 * Workaround '#error' cppcheck messages in backgraph and private headers
247 * Workaround 'AST broken' syntax error reported by cppcheck in GC_mark_some
248 * Workaround 'GC_dump function is never used' cppcheck warning
249 * Workaround 'local address assignment to a global variable' CSA warning
250 * Workaround 'local variable end shadows outer symbol' cppcheck warnings
251 * Workaround 'local variable obj_displ shadows outer symbol' cppcheck warning
252 * Workaround 'nonlocal var will use ptr to local var' cppcheck false positive
253 * Workaround 'pointer addition with NULL pointer' cppcheck error in msvc_dbg
254 * Workaround 'potential non-terminated string' false positive in cordbscs
255 * Workaround 'value of _MAX_PATH is unknown' cppcheck warning
256 * Workaround cppcheck warnings regarding CLOCKS_PER_SEC, REDIRECT_REALLOC
257
258
259 == [8.0.0] 2018-09-05 ==
260
261 * Accept Android platform by both CMake and configure
262 * Access finalize_now atomically to avoid TSan warning without no-sanitize
263 * Acknowledge thread restart from suspend_handler (NetBSD)
264 * Add a sanity check that load_acquire and store_release are available
265 * Add AO primitives implementation to GC based on C11 atomic intrinsic
266 * Add assertion for suspend_ack_sem in start_world
267 * Add assertion to allocobj that live unmarked object cannot be reclaimed
268 * Add assertions about held lock when accessing all_bottom_indices
269 * Add assertions to ensure ADD_CALL_CHAIN is called holding the lock
270 * Add assertions to finalize and threads support for MANUAL_VDB needs
271 * Add basic calculation of the total full-collection time
272 * Add check that gc_cpp operator delete is called (test_cpp)
273 * Add debug logging to new_thread about GC_threads hash table collisions
274 * Add GC prefix to _MSVC_DBG_H macro
275 * Add initial RISC-V support
276 * Add Makefile target to run all tests without test-driver
277 * Add test_atomic_ops to perform minimal testing of used atomic primitives
278 * Add two-argument alloc_size attribute to calloc_explicitly_typed (GCC)
279 * Align IRIX/OSF1_THREADS definition in gc_config_macros.h with gcconfig.h
280 * Allocate non-executable memory by default (CMake)
281 * Allow compilation of PROC_VDB code on Linux host (GC_NO_SYS_FAULT_H)
282 * Allow configure --with-libatomic-ops=none to use GCC atomic intrinsics
283 * Allow custom N_LOCAL_ITERS and ENTRIES_TO_GET values
284 * Allow disabling of dynamic loading in CMake script and configure
285 * Allow disabling of main static data registration in CMake and configure
286 * Allow disabling of threads discovery in CMake script and configure
287 * Allow gc_assertions enabling in CMake script
288 * Allow gc_debug, redirect_malloc, large_config options in CMake script
289 * Allow GC_NETBSD_THREADS_WORKAROUND macro manual definition
290 * Allow mmap enabling in CMake script and configure
291 * Allow passing -D DEFAULT_VDB to CFLAGS
292 * Allow subthreadcreate_test to be compiled with zero NTHREADS
293 * Allow to turn on spin locking even if thread-local allocations are used
294 * Always include gc_atomic_ops.h unless threads are disabled
295 * Avoid 'Unexpected heap growth' in 64-bit multi-threaded gctest if n_tests=1
296 * Avoid duplication of code handling pthreads case in configure
297 * Avoid potential data race during apply_to_each_object(reset_back_edge)
298 * Avoid potential data race during GC_dump execution
299 * Avoid potential race between malloc_kind and mark_thread_local_fls_for
300 * Avoid potential race between realloc and clear_hdr_marks/reclaim_generic
301 * Avoid potential race in print_static_roots called by dyld_image_add/remove
302 * Avoid potential race in SET_MARK_BIT_EXIT_IF_SET if parallel marking
303 * Avoid potential race when accessing size_map table
304 * Avoid potential race when storing oh_back_ptr during parallel marking
305 * Avoid SIGSEGV during GC_INIT on some Android devices
306 * Build only shared libraries by default (configure)
307 * Change pointer arguments of push_all[_eager]/conditional API to void* type
308 * Change type of hb_sz field (of hblkhdr) from size_t to word
309 * Check consistency of descr, adjust, clear arguments of GC_new_kind
310 * Check that GC_WIN32_PTHREADS is not specified for Cygwin
311 * Check thread_local is initialized before accessing thread_key
312 * Collapse multiple BCOPY_EXISTS macro definitions
313 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
314 * Collapse multiple page_was_dirty, remove_protection, read_dirty definitions
315 * Compile checksums.c only if --enable-checksums is given (configure)
316 * Consistently define WIN32_LEAN_AND_MEAN/NOSERVICE before include windows.h
317 * Convert .html files to Markdown format
318 * Convert code of .c files to valid C++ code
319 * Decide between memory unmapping and mprotect-based dirty bits at runtime
320 * Declare t local variable in the block where the variable is used
321 * Define ABORT() using _CrtDbgBreak (if available) on Windows host
322 * Define CLANG/GNUC_PREREQ macros to check gcc/clang minimum version
323 * Define DYNAMIC_LOADING for Darwin unless IGNORE_DYNAMIC_LOADING
324 * Define GC_ASSERT(x) as C assert(x) for external clients of gc_inline.h
325 * Define GC_PREFETCH_FOR_WRITE to __builtin_prefetch in gc_inline.h (GCC)
326 * Define GC_THREADS instead of GC_x_THREADS in Makefiles
327 * Define macro to specify the environment file name extension (Win32/WinCE)
328 * Define static resend_lost_signals(), restart_all() in pthread_stop_world
329 * Detect sigsetjmp() availability by configure
330 * Determine whether to use compiler TLS for kFreeBSD at compile time
331 * Do not call BCOPY and BZERO if size is zero
332 * Do not call sem_getvalue in stop_world if one thread exists
333 * Do not call set_handle_fork(1) in gctest if pthread_atfork not supported
334 * Do not compile pcr_interface.c and real_malloc.c except by PCR-Makefile
335 * Do not declare dl_iterate_phdr as weak for kFreeBSD
336 * Do not include windows.h when compiling gc_cpp.cc
337 * Do not install gc_allocator.h, gc_disclaim.h unless the features enabled
338 * Do not merge dynamic root with the existing static one in add_roots_inner
339 * Do not print n_rescuing_pages value if incremental collections disabled
340 * Do not push cpsr and frame pointer on Darwin/arm and Darwin/arm64
341 * Do not rebuild_root_index unless remove_root_at_pos is called
342 * Do not specify version info for test libraries (Automake)
343 * Do not use alternate thread library on Solaris
344 * Do not use asm in GC_pause
345 * Do not use PKG_CHECK_MODULES in configure
346 * Do not use system clock consistently if NO_CLOCK
347 * Do not use x86 asm in PUSH_CONTENTS_HDR for NaCl
348 * Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
349 * Document STACK_NOT_SCANNED macro in gcconfig.h (Emscripten)
350 * Eliminate 'comparison is always false' code defect in get_maps
351 * Eliminate 'GC_DEBUG redefined' compiler warning in smashtest
352 * Eliminate 'potential unsafe sign check of a bitwise operation' code defect
353 * Enable alternative finalization interface (DISCLAIM) in all makefiles
354 * Enable compilation for Cygwin with MPROTECT_VDB
355 * Enable handle-fork and memory unmapping by default
356 * Enable mprotect-based incremental GC for Win64 (GCC)
357 * Expose API to control rate and max prior attempts of collect_a_little
358 * Expose API to control the minimum bytes allocated before a GC occurs
359 * Fix 'comparison of 255 with expr of type bool' error in gc_atomic_ops.h
360 * Fix 'doc' files installation folder
361 * Fix build of cord tests as C++ files (Makefile.direct)
362 * Fix comment typos in backgraph.c, de.c, gcconfig.h
363 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
364 * Fix start_world not resuming all threads on Darwin
365 * Fix test_cpp failure in case GC_DEBUG is defined
366 * Group common defines for POSIX platforms in configure and CMake scripts
367 * Guard against USE_PTHREAD_LOCKS and USE_SPIN_LOCK are both defined
368 * Handle pthread restart signals loss if retry_signals
369 * Hide value stored to thread-specific entries for a test purpose
370 * Implement FindTopOfStack(0) for ARM and AArch64 (Darwin)
371 * Implement memory unmapping for Sony PS/3
372 * Imply configure --single-obj-compilation if --disable-static
373 * Include malloc.c in extra/gc.c after include gc_inline.h
374 * Increase MAX_HEAP_SECTS (10 times) for large-config
375 * Initial single-threaded support of Interix subsystem
376 * Initial support of Nintendo, Orbis, Sony PSP2, WinRT, Xbox One
377 * Initial support of TIZEN platform
378 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
379 * Make extend_size_map() static (code refactoring)
380 * Make subthreadcreate test compilable even without libatomic_ops
381 * Match GC_FAST_MALLOC_GRANS formal and actual arguments where possible
382 * Move de_win compiled resource files to cord/tests
383 * Move pcr_interface.c, real_malloc.c to 'extra' folder
384 * New API function (GC_dump_named) to produce named dumps
385 * New API function (GC_is_incremental_mode)
386 * New API function (get_expl_freed_bytes_since_gc)
387 * New API function (get_size_map_at) to get content of size_map table
388 * New API to stop and start the GC world externally
389 * New API to turn on manual VDB at runtime
390 * New field (expl_freed_bytes_since_gc) in public prof_stats_s
391 * New macro ALWAYS_SMALL_CLEAR_STACK to avoid clearing large stack sections
392 * New public API (PTR_STORE_AND_DIRTY) to simplify store-and-dirty operation
393 * Pass CFLAGS_FOR_PIC value to CFLAGS in Makefile.direct
394 * Print time passed since GC initialization in GC_dump
395 * Public API (GC_deinit) to allow Win32 critical sections deletion
396 * Reduce probability of collision in threads hashtable for 64-bit targets
397 * Reduce the default MUNMAP_THRESHOLD value to 2 for Sony PS/3
398 * Refactoring of USE_MMAP/USE_MMAP_ANON pairs definition in gcconfig.h
399 * Reformat code and comments in gc_allocator.h
400 * Remove 'dist' target from Makefile.direct
401 * Remove a redundant check of __cplusplus in Symbian-specific .cpp files
402 * Remove Android-specific code in gcconfig.h for M68K
403 * Remove C++ WeakPointer and CleanUp API which lacks implementation
404 * Remove DGUX_THREADS macro which duplicates GC_DGUX386_THREADS (configure)
405 * Remove done_init static variable from fnlz_mlc.c
406 * Remove duplicate definition of ALIGNMENT macro for OpenBSD/arm
407 * Remove duplicated sample code in leak.md
408 * Remove EMX_MAKEFILE (add EMX support to Makefile.direct)
409 * Remove GC code fragment (which already merged) from README.Mac
410 * Remove GC_GNU_THREADS macro (HURD)
411 * Remove GENERAL_MALLOC internal macro
412 * Remove HIGH_BIT macro duplicating SIGNB
413 * Remove lint-specific code
414 * Remove Makefile KandRtest target (that supported K&R C compiler)
415 * Remove MIN_WORDS macro from gc_priv.h
416 * Remove multi-line macros (FOR_EACH_PRED, ITERATE_DL_HASHTBL_*, PUSH_OBJ)
417 * Remove name of optional arguments of operator new and new[] in gc_cpp.h
418 * Remove notes that K&R C compiler is unsupported
419 * Remove PUSH_CONTENTS_HDR multi-line macro
420 * Remove redundant check that clear_fl_marks argument is non-null
421 * Remove redundant THREADS macro checks in alloc.c and gc_priv.h
422 * Remove stubborn objects allocation code completely, remove stubborn.c
423 * Remove unnecessary argument casts in add_roots_inner calls
424 * Remove unnecessary type casts in n_set_marks
425 * Remove unused USE_GENERIC macro definition and description
426 * Remove version info in 'de' cord test application
427 * Replace GC_MALLOC(sizeof T) with GC_NEW(T) in tests
428 * Replace GC_NO_RETRY_SIGNALS environment variable with GC_RETRY_SIGNALS=0
429 * Replace some FIXME items with TODO ones
430 * Run command passed to if_not_there directly from Makefile.direct
431 * Same type casts for GC_PTR_STORE arguments regardless of GC_DEBUG
432 * Skip grungy_pages update when mark state invalid to speedup read_dirty
433 * Skip typed_test in gctest if NO_TYPED_TEST macro is defined
434 * Support configure --disable-thread-local-alloc option (similar for CMake)
435 * Support enable_checksums option in CMake script
436 * Support Haiku multi-threaded build by CMake
437 * Support threads for DragonFly in configure
438 * Turn on 'atomic uncollectable' functionality by default (CMake)
439 * Turn on GC assertions in NT_MAKEFILE for debug builds
440 * Turn on gcj, disclaim and java finalization by default (CMake)
441 * Turn on incremental collection in gctest also if DEFAULT_VDB or MANUAL_VDB
442 * Turn on incremental mode in cordtest and cord/de
443 * Turn on incremental mode in disclaim_test, test_cpp and staticroots test
444 * Turn on parallel marker by default for all multi-threaded builds
445 * Update GC compilation and usage notes for Win32
446 * Update shared libraries version info to differentiate against v7.6
447 * Update top_index entry pointer only when the entry is constructed fully
448 * Use __builtin_expect in SIZET_SAT_ADD macro
449 * Use __declspec(allocator) for malloc-like prototypes (MS VS 2015+)
450 * Use __int64 instead of 'long long' in LONG_MULT if appropriate
451 * Use __thread keyword for Android NDK r12b+ Clang (arm)
452 * Use atomic allocation for leafs in reverse_test (gctest)
453 * Use atomic load/store for the concurrently accessed variables in GC_lock
454 * Use C11 static_assert if available
455 * Use compiler atomic intrinsics by default if available (configure)
456 * Use EXPECT FALSE for mark_from code documented as executed rarely
457 * Use heap-allocated memory for local mark stack of non-marker thread
458 * Use HOST_ANDROID define instead of PLATFORM_ANDROID
459 * Use include gc.h with the angle brackets in the man page synopsis
460 * Use longjmp in fault_handler_openbsd if siglongjmp unavailable (OpenBSD)
461 * Use MARK_BIT_PER_GRANULE instead of MARK_BIT_PER_OBJ where appropriate
462 * Use noexcept specifier in gc_allocator and gc_cpp if C++11
463 * Use same macro (NTHREADS) across all tests to specify number of threads
464 * Use sigsetjmp() in setjmp_t tool if available
465 * Use thread-local allocations for all multi-threaded builds
466 * Use THREAD_EQUAL consistently to compare pthread_t values
467 * Workaround 'bad pointer arithmetic' false waring in check_annotated_obj
468 * Workaround Clang optimizer bug crashing clear_stack_inner on OS X 10.8
469 * Workaround Thread Sanitizer (TSan) false positive warnings
470
471
472 == [7.6.14] (not released yet) ==
473
474 * Add support of OpenBSD/aarch64
475 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
476 * Eliminate 'GC_old_bus_handler defined but not used' compiler warning
477 * Eliminate 'comparing signed and unsigned values' BCC warning in cordtest
478 * Eliminate 'possible loss of data' BCC and MS VC warnings
479 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
480 * Eliminate 'unused function GC_add_map_entry' compiler warning
481 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
482 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
483 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
484 * Fix 'ulong undefined' compilation error on AIX
485 * Fix MPROTECT_VDB definition for single-threaded GC builds
486 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
487 * Fix compiling by Makefile.direct on OpenBSD/UltraSparc
488 * Fix configure message about 'AIX gcc optimization fix'
489 * Fix cordtest build in SMakefile.amiga
490 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
491 * Fix gc_allocator.h compilation by Clang
492 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
493 * Fix printf format specifier in simple_example.html
494 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
495 * Fix test_cpp failure caused by arbitrary link order (Win32)
496 * Fix test_cpp failure when gc_cpp resides in a dll (Borland, Watcom)
497 * Fix various typos mostly in documentation files
498 * Fix word size, data start and alignment for OpenBSD/mips64(el)
499 * Prevent GetThreadContext failure (Windows)
500 * Prevent WARN of incompatible incremental GC if default or manual VDB
501 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
502 * Refactoring of WoW64 workaround (Win32)
503 * Remove a misleading comment about Solaris in gc.h
504 * Workaround 'expression is only useful for its side effects' WCC warning
505 * Workaround fread fail after enable_incremental if malloc redirected (Linux)
506
507
508 == [7.6.12] 2019-03-01 ==
509
510 * Eliminate 'assigned value never used' compiler warning in test_cpp WinMain
511 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
512 * Fix 'undefined reference to __data_start' linker error (Android/aarch64)
513 * Fix 'unexpected mark stack overflow' abort in push_all_stack
514 * Fix 'wrong __data_start/_end pair' error on Android
515 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
516 * Fix GetThreadContext stale register values use if WoW64 (Win32)
517 * Fix executable memory allocation in GC_unix_get_mem
518 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
519 * Fix thread_info() count argument value (OS X)
520 * Update NO_EXECUTE_PERMISSION documentation
521
522
523 == [7.6.10] 2018-12-13 ==
524
525 * Add paths to filenames mentioned in the copyright section in README
526 * Call real pthread_sigmask instead of its wrapper in start_mark_threads
527 * Eliminate 'casting signed to bigger unsigned int' CSA warning
528 * Eliminate 'non-virtual destructor for class with inheritors' CSA warning
529 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
530 * Fix 'too wide non-owner permissions are set for resource' code defect
531 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
532 * Fix GC_VSNPRINTF in cordprnt for DJGPP and MS VC for WinCE
533 * Fix GC_register_disclaim_proc for leak-finding mode
534 * Fix a deadlock in write_fault_handler if AO_or is emulated
535 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
536 * Fix concurrent bitmap update in GC_dirty
537 * Fix delete operator redirection if gc_cpp is built as .dll (Cygwin, MinGW)
538 * Fix hbp overflow in GC_install_counts
539 * Fix linkage with a system libatomic_ops shared library
540 * Fix lock assertion violation in get_index if GC_ALWAYS_MULTITHREADED
541 * Fix marking of finalizer closure object
542 * Fix marks and hb_n_marks consistency when disclaim returns true
543 * Fix memory allocation on GCF (Linux/x64)
544 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
545 * Fix start_world not resuming all threads on Darwin
546 * Fix test_cpp assertion violation in find-leak mode
547 * Fix tests linkage with internal atomic_ops.o
548 * Fix unneeded end_stubborn_change in disclaim_test
549 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
550 * New macro to suppress printing of leaked objects
551 * Prevent double inclusion of javaxfc.h and private/specific.h
552 * Reduce scope of local variables in GC_remove_all_threads_but_me
553 * Refine HIDE_POINTER documentation for the case of the leak-finding mode
554 * Refine documentation in gc_disclaim.h
555 * Test marking of finalizer closure object in disclaim_test
556 * Update documentation about arm64 ABI in gcconfig.h
557 * Use AO_or in async_set_pht_entry_from_index if available
558 * Use include gc.h with the angle brackets in the man page synopsis
559
560
561 == [7.6.8] 2018-08-12 ==
562
563 * Add cpu, make_as_lib, nothreads options to NT_MAKEFILE
564 * Add NetBSD/aarch64 and initial RISC-V support
565 * Adjust formatting of configure help messages and config.h comments
566 * Avoid multiple 'getcontext failed' warnings if getcontext is broken
567 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
568 * Collapse multiple NT_*_MAKEFILE scripts into a single NT_MAKEFILE
569 * Do not call GC_dirty_inner unless GC_incremental
570 * Do not use NULL in gc_inline.h
571 * Eliminate 'cast between incompatible function types' compiler warning
572 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
573 * Eliminate 'condition is always true' cppcheck warning in init_gcj_malloc
574 * Eliminate 'declaration of var hides global declaration' compiler warning
575 * Eliminate 'language extension used' Clang warning in gc.h
576 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
577 * Eliminate 'ptr arithmetic with NULL' cppcheck warning in alloc_mark_stack
578 * Eliminate 'scope of var can be reduced' cppcheck warning in pthread_join
579 * Eliminate 'switch statement contains no case label' compiler warning
580 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
581 * Eliminate duplicate clear_mark_bit call when removing disappearing link
582 * Fast fail on invalid CPU parameter passed to NT_MAKEFILE
583 * Fix 'collecting from unknown thread' abort in leak-finding mode
584 * Fix 'pointer arithmetic with NULL' code defect in print_callers
585 * Fix Borland version in documentation to match that in BCC_MAKEFILE
586 * Fix comment about inv_sz computation in setup_header
587 * Fix comments style in configure.ac and Makefile.am
588 * Fix compilation by digimars.mak (DMC)
589 * Fix compilation by WCC makefile
590 * Fix compilation of darwin_stop_world for iOS 8+
591 * Fix cords for MANUAL_VDB
592 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
593 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
594 * Fix gctest in leak-finding mode
595 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
596 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
597 * Fix mark stack overflow checking in push_selected
598 * Fix missing GC_dirty calls for GC-allocated objects used internally
599 * Fix missing GC_dirty invocation from debug_end_stubborn_change
600 * Fix MSWIN32 macro redefinition (WCC)
601 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
602 * Fix new and delete operators definition for DigitalMars compiler
603 * Fix NT_MAKEFILE for VS 2017
604 * Fix potential null dereference in GC_CONS
605 * Fix register_dynamic_libraries on Windows 10
606 * Fix result computation in n_set_marks
607 * Fix return type in GC_set_warn_proc API documentation
608 * Fix tests for GC compiled with MANUAL_VDB
609 * Fix the build for Emscripten
610 * Fix typo in comment for CORD_ec_flush_buf prototype
611 * Fix typos in ChangeLog and generic_malloc
612 * Fix UNTESTED for multi-threaded API functions in gctest
613 * Fix VirtualQuery call in case of malloc failure (Win32)
614 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
615 * Keep pointer to the start of previous entry in remove_specific_after_fork
616 * Move de_win compiled resource files to cord/tests
617 * Never return null by C++ GC allocators and gc_cpp operator new
618 * Perform thread_suspend in loop as it may be interrupted (Darwin)
619 * Really abort if failed to read /proc for library registration (Linux)
620 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
621 * Remove duplicate local variable in reclaim_block
622 * Remove information how to send bugs from README.cords file
623 * Remove libatomic_ops license information
624 * Remove unused USE_GENERIC macro definition and description
625 * Suppress 'functions containing switch are not expanded inline' bcc warning
626 * Suppress 'non-member operator new/delete may not be inline' VC++ warning
627 * Turn on incremental collection in gctest also if MANUAL_VDB
628 * Update copyright information in alloc.c, gc.c/h and the documentation
629 * Update EXTRA_DIST in Makefile, Win32/64 docs after NT_*_MAKEFILE removal
630 * Update NT_MAKEFILE usage information in README files for Win32 and Win64
631 * Workaround 'class C does not have a copy constructor' cppcheck warning
632 * Workaround 'function nested_sp is never used' cppcheck style warning
633 * Workaround 'opposite expression on both sides of &' cppcheck style warning
634 * Workaround 'template-id not supported in this context' compiler error (WCC)
635
636
637 == [7.6.6] 2018-04-20 ==
638
639 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
640 * Eliminate 'boolean result used in bitwise operation' cppcheck warning
641 * Eliminate 'there is pointer arithmetic with NULL' cppcheck warning
642 * Explicitly unblock GC signals on GC initialization
643 * Fix 'scope of var can be reduced' cppcheck err in enqueue_all_finalizers
644 * Fix 'undefined reference to __builtin_unwind_init' linker error (ArmCC)
645 * Fix arguments delimiter in pcr_interface.c (PCR)
646 * Fix assertion violation in DllMain of win32_threads
647 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
648 * Fix data race during apply_to_each_object(reset_back_edge)
649 * Fix dbg_mlc.c/o file name in documentation
650 * Fix gctest with musl libc on s390x
651 * Fix include gc_gcj.h in thread_local_alloc.c
652 * Fix man section number (3)
653 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
654 * Fix missing new-line in ABORT_ARG<n> definition
655 * Fix missing SIGBUS handler setup for kFreeBSD
656 * Fix null dereference in print_callers on backtrace_symbols failure
657 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
658 * Fix the collector hang when it is configured with --enable-gc-debug
659 * Fix thread_suspend fail for threads registered from key destructor (OS X)
660 * Fix type of local variables receiving result of PHT_HASH
661 * Fix typo in AIX macro name
662 * Fix typo in comment in specific.h
663 * Fix unbounded heap growth in case of intensive disappearing links usage
664 * Remove API symbols renaming in WCC_MAKEFILE
665 * Support Haiku/amd64 and Haiku/x86 hosts
666 * Support threads for DragonFly in configure
667 * Workaround 'address of auto-variable returned' cppcheck error
668 * Workaround gctest hang on kFreeBSD (if thread-local allocations are on)
669
670
671 == [7.6.4] 2018-01-26 ==
672
673 * Add note of set_free_space_divisor, set_warn_proc ABI change after gc-7.1
674 * Change compiler invocation example in gc.man to use dynamic libgc
675 * Delete dont_ar_* build intermediate files on make clean (Makefile.direct)
676 * Do not declare dl_iterate_phdr as weak for DragonFly
677 * Fix 'cords' parallel build in Makefile.direct
678 * Fix 'undeclared identifier USRSTACK' compiler error on OpenBSD-6.2
679 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
680 * Fix GC allocation mutex in child after a fork
681 * Fix global operator delete definition for C++14 in gc_cpp
682 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
683 * Fix libgc version which was changed in linkage breaking way
684 * Fix missing EOLn output in threadlibs tool
685 * Fix threadlibs tool to output '-lpthread' for DragonFly
686 * Prevent DATASTART redefinition for NaCl
687 * Remove obsolete advice about linking with _DYNAMIC=0 (Linux)
688
689
690 == [7.6.2] 2017-12-23 ==
691
692 * Add assertion that no hb_n_marks underflow occurs
693 * Add minimal testing of GC_MALLOC_[ATOMIC_]WORDS and GC_CONS (gctest)
694 * Add minimal testing of GC_set_bit (gctest)
695 * Add more cases to huge_test to cover sizes close to word-type maximum
696 * Add testing of new[]/delete[] (test_cpp)
697 * Adjust AO_HAVE_x check to match AO_fetch_and_add primitive variant used
698 * Adjust code indentation of calloc_explicitly_typed
699 * Align local_mark_stack in help_marker explicitly
700 * Allow custom TRACE_ENTRIES value
701 * Allow gctest and thread_leak_test with zero NTHREADS
702 * Avoid data race in finalized_count (gctest)
703 * Code refactoring of divide-by-HBLKSIZE occurrences
704 * Code refactoring of huge_test
705 * Code refactoring of tests/subthread_create regarding AO add primitive
706 * Compile thread_local_alloc only if multi-threaded build (Makefile.am)
707 * Delete preprocessor output on make clean (Makefile.direct)
708 * Disable implicit multi-threaded mode for Win32 to avoid LOCK crash
709 * Do not disable parallel mark for WRAP_MARK_SOME
710 * Do not enable mprotect-based incremental mode if unmapping is on (gctest)
711 * Do not install documentation if configure --disable-docs (new option)
712 * Do not use tkill (Android)
713 * Document base and size of objects allocated by finalized_malloc
714 * Document configure 'syntax error' issue in README
715 * Eliminate 'address of local variable returned' static analyzer warning
716 * Eliminate 'array vs singleton' code defect in typed_test (gctest)
717 * Eliminate 'assigned value never used' CSA warning in min_bytes_allocd
718 * Eliminate 'boolean result used in bitwise op' cppcheck false warning
719 * Eliminate 'C-style pointer casting' cppcheck style warnings in test
720 * Eliminate 'checking if unsigned variable is <0' cppcheck style warning
721 * Eliminate 'class member var with name also defined in parent' warning
722 * Eliminate 'comparison is always false' static analyzer warning in finalize
723 * Eliminate 'Condition 0==datastart always false' cppcheck warning (dyn_load)
724 * Eliminate 'condition is always true' cppcheck style warning
725 * Eliminate 'constructor with 1 argument is not explicit' cppcheck warning
726 * Eliminate 'CORD_*printf is never used' cppcheck style warnings (cordtest)
727 * Eliminate 'dereference of null' CSA false warning in array_mark_proc
728 * Eliminate 'function result not used' code defect in GC_mark_local
729 * Eliminate 'GC_collecting is set but never used' code defect (Win32)
730 * Eliminate 'GC_record_fault is never used' cppcheck style warning
731 * Eliminate 'integer shift by a negative amount' code defect in finalize
732 * Eliminate 'label not used' cppcheck false warnings in GC_mark_X
733 * Eliminate 'memory leak' code defect for scratch-allocated memory
734 * Eliminate 'memory leak' code defect in remove_specific
735 * Eliminate 'non-null arg compared to null' warning in toggleref_add (GCC)
736 * Eliminate 'non-reentrant function strtok called' cppcheck warning (POSIX)
737 * Eliminate 'possible integer underflow' code defect (cord-de)
738 * Eliminate 'potential overflow' static analyzer warning in test
739 * Eliminate 'printf format specifies type void*' GCC pedantic warnings
740 * Eliminate 'scope of variable can be reduced' cppcheck warnings
741 * Eliminate 'suspicious pointer subtraction' cppcheck warning (gc_cpp)
742 * Eliminate 'this statement may fall through' GCC warnings
743 * Eliminate 'unnecessary comparison of static strings' cppcheck warning
744 * Eliminate 'unsafe vsprintf is deprecated' compiler warning
745 * Eliminate 'unused formal parameter' compiler warnings in C++ code (MS VC)
746 * Eliminate 'unused variable' compiler warning in remove_all_threads_but_me
747 * Eliminate 'use of vulnerable sprintf' code defect in de_win test (cord)
748 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
749 * Eliminate 'value of CLOCK_TYPE unknown' cppcheck info message
750 * Eliminate 'value of DATASTART2 unknown' cppcheck info messages
751 * Eliminate 'value of GC_PTHREAD_EXIT_ATTRIBUTE unknown' cppcheck messages
752 * Eliminate 'value of GC_RETURN_ADDR_PARENT unknown' cppcheck info messages
753 * Eliminate 'value of NEED_FIXUP_POINTER unknown' cppcheck info messages
754 * Eliminate 'write to memory that was const-qualified' code analyzer warning
755 * Eliminate all 'scope of variable can be reduced' cppcheck style warnings
756 * Eliminate CSA warning about incorrect cast applied to HBLK_OBJS
757 * Eliminate CSA warning about narrowing cast in CleanUp of test_cpp
758 * Eliminate CSA warning of non-virtual destructor in test_cpp base class
759 * Eliminate CSA warning of staticroot that can be a local variable (tests)
760 * Eliminate CSA warning of unmodified non-const static var (disclaim_test)
761 * Eliminate redundant local variable in register_finalizer
762 * Eliminate TSan (Thread Sanitizer) warnings in gctest
763 * Eliminate UBSan warning of overflow during descr subtraction in mark_from
764 * Eliminate unreachable PROC/DEFAULT_VDB GC_printf calls in gctest main()
765 * Eliminate unsigned fl_builder_count underflow in mark_thread
766 * Enable GC_is_tmp_root for all platforms
767 * Execute more single-threaded GC tests by CMake
768 * Expand tabs to spaces in de_win.rc (tests)
769 * Export GC_dump_finalization/regions()
770 * Export GC_is_tmp_root() and GC_print_trace[_inner]()
771 * Export GC_print_free_list()
772 * Fix '32-bit value shift followed by expansion to 64-bit' code defect
773 * Fix 'GC_written_pages never read' code defect (GWW_VDB)
774 * Fix 'label cannot be reached' static analyzer warning in disclaim_test
775 * Fix 'size of tv is unknown' error in brief_async_signal_safe_sleep (musl)
776 * Fix 'syntax error' reported by cppcheck for mach_dep
777 * Fix 'unknown type name GC_INNER' compilation error (FreeBSD)
778 * Fix 'variable assigned a value that is never used' cppcheck style warnings
779 * Fix 'void pointers in calculations: behavior undefined' cppcheck warning
780 * Fix assertion violation about disabled cancel in try_to_collect_inner
781 * Fix atomic_ops build in Makefile.direct for Solaris
782 * Fix Clang static analyzer warning about not found gc_priv.h in extra files
783 * Fix compilation error in get_main_stack_base (Emscripten)
784 * Fix compilation for winpthreads if HANDLE_FORK
785 * Fix compilation if configured with --enable-werror on OS X
786 * Fix cord/de build in Makefile.direct (Linux)
787 * Fix data race in a list referenced by A.aa (gctest)
788 * Fix data race in collectable_count (gctest)
789 * Fix data race in do_local_mark when comparing active_count to helper_count
790 * Fix data race in GC_suspend/resume_thread
791 * Fix data race in last_stop_count access (suspend_handler_inner)
792 * Fix data race in make_descriptor when setting explicit_typing_initialized
793 * Fix data race in mark_thread when updating mark_no
794 * Fix data race when getting object size in explicitly-typed allocators
795 * Fix deadlock in GC_suspend_thread
796 * Fix gctest failure for Darwin if CPPCHECK is defined
797 * Fix lack of barriers to synchronize memory for suspend_handler
798 * Fix marking of disclaim-reachable objects in the incremental mode
799 * Fix message of VDB implementation used if MPROTECT_VDB+GWW_VDB (gctest)
800 * Fix missing started_thread_while_stopped call from mark_some if GCC/Clang
801 * Fix null dereference in GC_stack_range_for if not DARWIN_DONT_PARSE_STACK
802 * Fix page calculation in checksums
803 * Fix parallel build in Makefile.direct
804 * Fix test_cpp and c++ parallel build in Makefile.direct
805 * Fix typo in comment of GC_mark_some
806 * Fix typos in cdescr.html and README.sgi
807 * Make GC_INIT optional for clients even if thread-local allocations enabled
808 * Match uclinux pattern in configure
809 * Move conditional GC_need_to_lock setting to gc_locks.h (refactoring)
810 * Move README.QUICK from DOC_FILES to OTHER_FILES in Makefile.direct
811 * New API function (GC_is_init_called) to check if BDWGC is initialized
812 * New target (check-cpp) in Makefile.direct
813 * Prevent abort in register_data_segments for Symbian and Emscripten
814 * Prevent multiple 'Caught ACCESS_VIOLATION in marker' per collection
815 * Print realloc_count value in gctest
816 * Put invariant name in quotes to make mark_state comments clearer
817 * Refine configure messages when checking for compiler option support
818 * Remove extraneous semicolons after AC_MSG_WARN (configure)
819 * Remove page_was_dirty and remove_protection duplicate definitions
820 * Remove unnecessary type casts of printf arguments to unsigned long
821 * Remove unused ALIGN_DOUBLE, USE_GENERIC_PUSH_REGS macros (TILE-Gx/Pro)
822 * Rename 'test' to 'check' target in Makefile.direct
823 * Replace deprecated rewind to fseek in cordxtra
824 * Report gcc/clang pedantic warnings (configure)
825 * Skip thread suspend/resume API testing for Tru64 (OSF1)
826 * Support AddressSanitizer (Clang/GCC) and MemorySanitizer (Clang)
827 * Support GC_init (and get_stack_base) from non-main thread on FreeBSD/NetBSD
828 * Suppress 'tainted string passed to vulnerable operation' false defects
829 * Suppress 'taking address of label non-standard' GCC/Clang pedantic warning
830 * Test GC initialization from non-main thread on FreeBSD and NetBSD
831 * Test GCJ object creation with length-based descriptor (gctest)
832 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
833 * Update README regarding make cords with Makefile.direct
834 * Update README to use autogen.sh on build from the source repository
835 * Update shared libraries version info to differentiate against v7.4
836 * Use mprotect instead of mmap in GC_unmap() on Cygwin
837 * Use same style of include gc.h in documentation
838 * Workaround '!GC_page_size is always false' cppcheck style warning
839 * Workaround '#error' cppcheck error messages
840 * Workaround '32-bit value shift by >31 bits is undefined' cppcheck warnings
841 * Workaround 'array compared to 0', 'untrusted loop bound' false defects
842 * Workaround 'bad address arithmetic' static analysis tool false positive
843 * Workaround 'checking if unsigned value is negative' cppcheck warning
844 * Workaround 'checking unsigned value is negative' code defect in mark_from
845 * Workaround 'comparison of identical expressions' false code defects
846 * Workaround 'Condition 0!=GETENV() is always false' cppcheck style warnings
847 * Workaround 'condition is always false' cppcheck warning in get_next_stack
848 * Workaround 'condition is always true' cppcheck style warnings in GC_init
849 * Workaround 'function is never used' cppcheck style warnings
850 * Workaround 'insecure libc pseudo-random number generator used' code defect
851 * Workaround 'int shift by negative amount' false code defect in finalize
852 * Workaround 'local variable size too big' static analyzer warning
853 * Workaround 'memory leak: result' cppcheck false error (POSIX)
854 * Workaround 'null pointer dereference' false positive in push_next_marked
855 * Workaround 'obsolescent bcopy, bzero called' cppcheck warnings (POSIX)
856 * Workaround 'obsolescent usleep called' cppcheck warning (POSIX)
857 * Workaround 'obsolete function alloca() called' cppcheck warnings
858 * Workaround 'passing untyped NULL to variadic function' cppcheck warning
859 * Workaround 'pointer used before comparison to null' code defect (pthread)
860 * Workaround 'possible null pointer dereference' cppcheck warnings
861 * Workaround 'potential multiplication overflow' code defect in de_win (cord)
862 * Workaround 'redundant assignment of *result to itself' cppcheck warning
863 * Workaround 'resource leak' false positives in alloc_MS, bl/envfile_init
864 * Workaround 'same expression on both sides of ==' cppcheck style warning
865 * Workaround 'same expression on both sides of OR' cppcheck style warning
866 * Workaround 'struct member is never used' cppcheck style warnings
867 * Workaround 'tainted int used as loop bound' static analysis tool warning
868 * Workaround 'Uninitialized variable' cppcheck errors
869 * Workaround 'unused variable' cppcheck style warnings
870 * Workaround 'va_list used before va_start' cppcheck error in cord
871 * Workaround 'value of macro unknown' cppcheck info messages
872 * Workaround 'value of REDIRECT_MALLOC/FREE unknown' cppcheck info messages
873 * Workaround 'value of SIGBUS unknown' cppcheck info messages
874 * Workaround 'value of WINAPI unknown' cppcheck info messages
875 * Workaround 'variable hides enumerator with same name' cppcheck warnings
876 * Workaround 'variable reassigned before old value used' cppcheck warnings
877 * Workaround 'waiting while holding lock' code defect in stop_world (Unix)
878 * Workaround false 'uninitialized var use' code defect (initsecondarythread)
879
880 Also, includes 7.4.6 changes
881
882
883 == [7.6.0] 2016-08-02 ==
884
885 * ABORT_ARGn log details at INFO level (Android)
886 * Add 'pragma message' to gc.h to detect inconsistent WIN64/_WIN64 (MS VC)
887 * Add API function to calculate total memory in use by all GC blocks
888 * Add API function to set/modify GC log file descriptor (Unix)
889 * Add alloc_size attribute to GC_generic_malloc
890 * Add alt-stack registration support
891 * Add assertion for GC_new_kind boolean arguments
892 * Add assertion on lock status to GC_alloc_large and its callers
893 * Add build scripts for VC 9 (Win32/64)
894 * Add build system plumbing for building with -Werror
895 * Add incremental GC support for Darwin/arm64
896 * Add profiling callback events to indicate start/end of reclaim phase
897 * Add support for enumerating the reachable objects in the heap
898 * Add toggle-ref support (following Mono GC API)
899 * Added instructions to README.md for building from git
900 * Adjust code indentation of malloc/calloc/str[n]dup
901 * Allow fork() automatic handling on Android with API level 21+
902 * Allow specific TLS attributes for GC_thread_key
903 * Allow thread local allocations from within pthread TLS destructors
904 * Allow to force GC_dump_regularly set on at compilation
905 * Altera NIOS2 support
906 * Change 'cord' no-argument functions declaration style to ANSI C
907 * Check DATASTART is less than DATAEND even assertions off
908 * Check for execinfo.h by configure
909 * Code refactoring of GC_push_finalizer/thread/typed_structures
910 * Code refactoring regarding 'data start' definition for FreeBSD
911 * Consistently set type of DATASTART/END to ptr_t (code refactoring)
912 * Consistently use int[] type for '_end' symbol (code refactoring)
913 * Consistently use outermost parentheses for DATASTART/END, STACKBOTTOM
914 * Define GC_LINUX_THREADS, NO_EXECUTE_PERMISSION in configure for NaCl
915 * Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
916 * Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
917 * Do no declare kernel_id field of GC_Thread_Rep for 64-bit Android
918 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
919 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
920 * Document GC_register_my_thread returned value
921 * Dump the block information in CSV format
922 * Eliminate redundant *flh check for null in GC_allocobj
923 * Enable atomic-uncollectable in operator new in gc_cpp.h
924 * Enable build with musl libc
925 * Enable gc.h inclusion by client without implicit include windows.h (Win32)
926 * Enable huge_test for Win64 (and LLP64 target)
927 * Enable thread-local storage for Android Clang
928 * Enable thread-local storage usage for GC_malloc/calloc_explicitly_typed
929 * Export GC_push_all_eager, GC_push_finalizer_structures
930 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
931 * Fix assertion in GC_mark_from for non-heap regions
932 * Fix compilation for Android clang/arm with bfd linker
933 * Fix integer shift undefined behavior in GC_init_explicit_typing
934 * Fix missing new-line and redundant trailing dot in WARN messages
935 * Fix STACKBOTTOM for Solaris 11/x86
936 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
937 * Fix unchecked fork() result in gctest (Unix, Cygwin)
938 * Fix user-defined signals drop by marker threads
939 * Fix various typos in comments and documentation
940 * FreeBSD/arm support improvement
941 * GC_make_descriptor code refactoring (eliminate two local variables)
942 * GC_malloc[_atomic] global and thread-local generalization with kind
943 * GC_malloc_[atomic_]uncollectable generalization
944 * GC_scratch_alloc code refactoring (and WARN message improvement)
945 * Group all compact fields of GC_arrays to fit in single page
946 * Handle load_segs overflow in register_dynlib_callback gracefully
947 * Harmonize OSX/iOS configuration; enable compiling for iPhone simulator
948 * Implement event callbacks for profiling (following Mono GC API)
949 * Implement the finalization extension API
950 * Implement thread suspend/resume API (Linux threads only)
951 * Improve documentation for disappearing links in gc.h
952 * Make heap growth more conservative after GC_gcollect_and_unmap call
953 * Mark fo_head, finalize_now with a single GC_push_all call (refactoring)
954 * Move MessageBox invocation code from GC_abort to a separate routine (Win32)
955 * NaCl/arm initial support; NaCl runtime fixes for other CPUs
956 * New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
957 * New macro (NO_WINMAIN_ENTRY) to prefer main() instead of WinMain in test
958 * New macro (REDIRECT_MALLOC_IN_HEADER) to enable source-level redirection
959 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
960 * Re-implement GC_finalized_malloc using GC_malloc_kind
961 * Refactoring of android_thread_kill/pthread_kill calls
962 * Refactoring of GC_Xobjfreelist (use single array to keep free lists)
963 * Refactoring of thread-local *_freelists (use single array of free lists)
964 * Refine description in README how to build from source repository
965 * Refine GC_free_space_divisor comment regarding its initial value
966 * Reformat code of gc_cpp.cc/h
967 * Remove 'opp' local variable in GC_malloc_X
968 * Remove 'sig' argument of GC_suspend_handler_inner (code refactoring)
969 * Remove code commented out by 'ifdef UNDEFINED'
970 * Remove hb_large_block field (use 1 extra bit of hb_flags instead)
971 * Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
972 * Remove redundant casts in GC_generic_or_special_malloc and similar
973 * Remove unsupported FreeBSD/ia64 case from gcconfig.h file
974 * Remove unused GC_gcjdebugobjfreelist
975 * Rename ATOMIC_UNCOLLECTABLE to GC_ATOMIC_UNCOLLECTABLE
976 * Replace non-API occurrences of GC_word to word (code refactoring)
977 * Return GC_UNIMPLEMENTED instead of abort in GC_get_stack_base (OS/2)
978 * Show WoW64 warning message if running 32-bit on Win64 (enabled by macro)
979 * Standalone profiling callback for threads suspend/resume
980 * Support (add machine description for) TILE-Gx and TILEPro targets
981 * Support build for Android 64-bit (arm64, mips64, x86_64)
982 * Support FreeBSD/aarch64, FreeBSD/mips
983 * Support iOS7 64-bit (AArch64) and iOS8+ 32/64-bit (Darwin)
984 * Support MinGW build in scripts
985 * Turn off sigsetjmp workaround for Android/x86 starting from NDK r8e
986 * Use magic header on objects to improve disclaim_test
987 * Workaround 'sa_sigaction member missing' compiler error (Android/x32)
988 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
989 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
990
991 Also, includes 7.4.4 changes
992
993
994 == [7.4.20] (not released yet) ==
995
996 * Do not hold GC_fault_handler_lock when in Sleep (Windows)
997 * Eliminate 'static GC_sysinfo definition has incomplete type' Clang warning
998 * Eliminate 'unused function GC_add_map_entry' compiler warning
999 * Eliminate 'while clause does not guard' GCC warning in GC_parse_map_entry
1000 * Fix OS_TYPE and USE_MMAP_ANON definitions for Cygwin/x64
1001 * Fix configure message about 'AIX gcc optimization fix'
1002 * Fix cordtest build in SMakefile.amiga
1003 * Prevent GetThreadContext failure (Windows)
1004 * Refactoring of WoW64 workaround (Win32)
1005
1006 Also, includes 7.2o changes
1007
1008
1009 == [7.4.18] 2019-03-01 ==
1010
1011 * Fix 'wrong __data_start/_end pair' error on Android
1012 * Fix thread_info() count argument value (OS X)
1013
1014 Also, includes 7.2n changes
1015
1016
1017 == [7.4.16] 2018-12-13 ==
1018
1019 * Fix 'collecting from unknown thread' abort in leak-finding mode for Win32
1020 * Fix 'undefined reference to GC_incremental' linker error in pthread_start
1021 * Fix GC_register_disclaim_proc for leak-finding mode
1022 * Fix concurrent bitmap update in GC_dirty
1023 * Fix marking of finalizer closure object
1024 * Fix marks and hb_n_marks consistency when disclaim returns true
1025 * Fix missing curses.h in cord/de when compiling manually (MS VC, MinGW)
1026 * Refine documentation in gc_disclaim.h
1027
1028 Also, includes 7.2m changes
1029
1030
1031 == [7.4.14] 2018-08-11 ==
1032
1033 * Cleanup BCC Makefile (remove absolute GC paths, fix del cmd, update clean)
1034 * Do not call GC_dirty_inner unless GC_incremental
1035 * Eliminate 'cast between incompatible function types' compiler warning
1036 * Eliminate 'comparing signed and unsigned values' compiler warnings (bcc)
1037 * Eliminate 'language extension used' Clang warning in gc.h
1038 * Eliminate 'possibly incorrect assignment in CORD_vsprintf' compiler warning
1039 * Eliminate 'switch statement contains no case label' compiler warning
1040 * Eliminate 'variable might be uninitialized' warning in win32_start_inner
1041 * Eliminate duplicate clear_mark_bit call when removing disappearing link
1042 * Fix 'collecting from unknown thread' abort in leak-finding mode
1043 * Fix compilation by digimars.mak (DMC) and by WCC makefile
1044 * Fix cords for MANUAL_VDB
1045 * Fix dependency on gc_cpp source in BCC_MAKEFILE and NT_MAKEFILE
1046 * Fix gctest in leak-finding mode
1047 * Fix missing GC_dirty calls for GC-allocated objects used internally
1048 * Fix missing GC_dirty invocation from debug_end_stubborn_change
1049 * Fix multi-threaded gctest for the case of NTHREADS is set to zero
1050 * Fix typos in ChangeLog and generic_malloc
1051 * Keep pointer to the start of previous entry in remove_specific_after_fork
1052 * New API function (GC_is_init_called) to check if BDWGC is initialized
1053 * Remove code duplication in gcj_malloc and malloc_explicitly_typed
1054 * Remove duplicate local variable in reclaim_block
1055 * Remove libatomic_ops license information from README
1056 * Workaround 'dynamic exception specifications deprecated in C++11' warning
1057
1058 Also, includes 7.2l changes
1059
1060
1061 == [7.4.12] 2018-04-19 ==
1062
1063 * Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
1064 * Fix comment for debug_generic_malloc_inner[_ignore_off_page]
1065 * Fix gctest with musl libc on s390x
1066 * Fix missing new-line in ABORT_ARG<n> definition
1067 * Fix null pointer dereference in get_private_path_and_zero_file (Symbian)
1068 * Fix type of local variables receiving result of PHT_HASH
1069 * Remove API symbols renaming in WCC_MAKEFILE
1070
1071 Also, includes 7.2k changes
1072
1073
1074 == [7.4.10] 2018-01-22 ==
1075
1076 * Fix error code in abort message if sem_wait failed in start_world (NetBSD)
1077 Also, includes 7.2j changes
1078
1079
1080 == [7.4.8] 2017-12-22 ==
1081
1082 * Eliminate 'this statement may fall through' GCC warnings
1083 * Eliminate 'value exceeds maximum object size' GCC warning in huge_test
1084 * Fix data race in make_descriptor when setting explicit_typing_initialized
1085 * Fix marking of disclaim-reachable objects in the incremental mode
1086 * Update comment in finalized_disclaim to match FINALIZER_CLOSURE_FLAG
1087 Also, includes 7.2i changes
1088
1089
1090 == [7.4.6] 2017-10-26 ==
1091
1092 * Add configure --enable-gcov option (enable code coverage analysis)
1093 * Add configure check whether to define NO_GETCONTEXT
1094 * Adjust GC_memalign comment
1095 * Allow HAVE_DL_ITERATE_PHDR to be defined by client (musl)
1096 * Allow PKG_CHECK_MODULES in configure.ac to be commented out easily
1097 * Avoid busy waiting in mark_thread while GC_parallel is false
1098 * Better document minimum value of size argument for typed allocations
1099 * Change type of THREAD_TABLE_INDEX result to int in win32_threads.c
1100 * Consistently use 'msec' instead of 'ms' in comments in pthread_support
1101 * Do not define amiga_get_mem, MacTemporaryNewPtr unless really used (extra)
1102 * Do not produce .tar.bz2 distribution file (configure)
1103 * Do not require libatomic_ops for single-threaded builds (configure)
1104 * Do not warn of missing PT_GNU_RELRO segment when custom DSO filter used
1105 * Document GWW_VDB in gcdescr.html
1106 * Eliminate 'cast to void* from int' compiler warnings (Darwin/x64)
1107 * Eliminate 'conditional expression is always true' code defect in GC_init
1108 * Eliminate 'FP divide-by-zero' static analyzer warning
1109 * Eliminate 'incompatible function pointer' warning in mark_some (MinGW/x86)
1110 * Eliminate 'ISO C forbids an empty translation unit' GCC pedantic warning
1111 * Eliminate 'ISO C forbids object to function pointer conversion' warning
1112 * Eliminate 'locally defined symbol imported' MS linker warnings (cord)
1113 * Eliminate 'null dereference' code defect warning in register_finalizer
1114 * Eliminate 'possible loss of data' compiler warnings (MS VC)
1115 * Eliminate 'printf format specifier mismatch' compiler warning (tools)
1116 * Eliminate 'type defaults to int in declaration' warning (REDIRECT_MALLOC)
1117 * Eliminate 'value stored is never read' warning of Clang static analyzer
1118 * Eliminate duplicate log messages in GC_mark_from
1119 * Eliminate most of collisions in GC_threads on Linux/x64
1120 * Ensure GC initialized when atfork_prepare is called by client
1121 * Fix 'arg parameter might be clobbered by setjmp' compiler warning
1122 * Fix 'bogus LR' detection in FindTopOfStack (Darwin)
1123 * Fix 'execvp argument incompatible pointer type' compiler warning (tools)
1124 * Fix 'GetVersion deprecated' compiler warning in os_dep (MS VC)
1125 * Fix 'incompatible pointer' compiler warning in GC_init_dyld (OS X 64-bit)
1126 * Fix 'incompatible ptr-to-int conversion' compiler warning in push_all_stack
1127 * Fix 'ISO C90 does not support %lf, %lg gnu_printf formats' GCC warnings
1128 * Fix 'ISO C90 forbids mixed declarations and code' compiler warning
1129 * Fix 'missing libc-version.h' build error (uClibc/x86[_64])
1130 * Fix 'replacement operator delete cannot be inline' GCC warning (Cygwin)
1131 * Fix 'variable unused' compiler warning in FirstDLOpenedLinkMap
1132 * Fix 'zero-size array is extension' Clang warning in os_dep (Linux/x86)
1133 * Fix (adjust) GC_scratch_alloc actual argument type
1134 * Fix deadlock in GC_help_marker caused by use of mark_cv of parent process
1135 * Fix finalize.c compilation in 'strict ANSI' mode
1136 * Fix GC shared library tests failure related to dl_iterate_phdr (musl)
1137 * Fix gc.h compliance to strict ANSI (pthreads)
1138 * Fix GC_bytes_allocd incrementation in case of allocation failure
1139 * Fix GC_jmp_buf multiple definition
1140 * Fix GC_noop6 definition to avoid its calls to be optimized away
1141 * Fix gctest failure if PARALLEL_MARK (musl)
1142 * Fix gctest thread stack overflow (musl-gcc)
1143 * Fix initsecondarythread_test runtime failure if GC compiled w/o threads
1144 * Fix lack of 2 trailing zeros in _MSC_VER numbers
1145 * Fix local variable declarations in disclaim_bench
1146 * Fix missing #error pragma
1147 * Fix missing .exe for disclaim test filenames in Makefile (MinGW)
1148 * Fix missing atomic/[un]collectable/realloc_count increments in gctest
1149 * Fix missing new-line and redundant trailing dot in WARN messages
1150 * Fix missing new-line at format strings end in subthread_create test
1151 * Fix mixed include of GC public header and gc_priv.h in disclaim bench/test
1152 * Fix potential overflow in decrement when computing GC_markers_m1
1153 * Fix printf format specifiers in extra files (cppcheck warnings)
1154 * Fix pthread_start compilation if single-obj-compilation (Linux)
1155 * Fix register_finalizer call in disclaim_bench for GC_DEBUG
1156 * Fix static assertion violation in LONG_MULT for 64-bit targets
1157 * Fix tag collision between ENABLE_DISCLAIM and KEEP_BACK_PTRS
1158 * Fix thread id leaks in subthread_create and threadkey_test
1159 * Fix threaded tests runtime crash if GC_NO_THREAD_REDIRECTS supplied
1160 * Fix tools/setjmp_t to prevent nested_sp inlining
1161 * Fix typo in CHECK_GCLIB_VERSION name (test)
1162 * Fix typos in comments/documentation (ews4800, extend_size_map, push_roots)
1163 * Fix unchecked fork() result in gctest (Unix, Cygwin)
1164 * Improve detection of internal libatomic_ops (configure)
1165 * Move libraries version info to the beginning of Makefile.am
1166 * Prevent abort in register_data_segments for Symbian
1167 * Process all PT_LOAD segments before PT_GNU_RELRO segments (Glibc)
1168 * Refine Makefile.direct comment about multi-threaded GC build
1169 * Refine README about library source downloading
1170 * Refine should_invoke_finalizers documentation
1171 * Remove all generated files by NT_X64_THREADS_MAKEFILE 'clean' target
1172 * Remove non-existent configure option in simple_example.html
1173 * Replace C++ style comments to C ones, remove commented out code (extra)
1174 * Support CFLAGS_EXTRA to pass extra user-defined compiler flags (configure)
1175 * Support CFLAGS_EXTRA when checking for inline and dladdr (configure)
1176 * Suppress 'tainted string passed to vulnerable operation' false defects
1177 * Suppress MS VC warnings about unused param, const condition (NT_MAKEFILE)
1178 * Update bdwgc mailing list online archive link in documentation
1179 * Update shared libraries version info to differentiate against v7.2
1180 * Use AC_DEFINE for defining NO_GETCONTEXT in configure
1181 * Workaround 'index out of bounds' UBSan false warning in push_marked
1182 * Workaround 'mmap() resource handle leak' static analyzer warning
1183 * Workaround 'redundant assignment of *result to itself' cppcheck warning
1184 * Workaround 'resource leak' error reported by cppcheck (tools, test)
1185 Also, includes 7.2h changes
1186
1187
1188 == [7.4.4] 2016-05-25 ==
1189
1190 * Allow GC_FAST_MALLOC_GRANS() multiple use in a function
1191 * Also enable the TSX workaround for i386 (Linux)
1192 * Avoid unstructured procfs on Solaris
1193 * Change cord/de main() declaration style from K-R to ANSI C
1194 * Change no-argument functions declaration style to ANSI C (cord)
1195 * Do not include sigcontext.h and asm/sigcontext.h
1196 * Eliminate 'divide by zero' compiler warning in cordtest
1197 * Eliminate warning about 64-bit pointer-to-int cast (Win64/pthreads-w32)
1198 * Eliminate warnings detected by Cppcheck in cord de[_win]
1199 * Fix 'comparison of non-null parameter is always false' warning (Clang)
1200 * Fix 'CORD_iter5 unused result' code defect in cordxtra
1201 * Fix 'GC_generic_malloc_inner_ignore_off_page not used' compiler warning
1202 * Fix 'implicit declaration of vsnprintf' GCC warning (if strict ANSI mode)
1203 * Fix 'signed-to-bigger-unsigned value assignment' in GC_init_size_map
1204 * Fix 'signed-to-bigger-unsigned value assignment' warning for hb_map
1205 * Fix 'signed-to-bigger-unsigned value assignment' warning in GC_setpagesize
1206 * Fix 'statement unreachable' compiler warning in GC_mark_from
1207 * Fix 'statement unreachable' compiler warning in memalign
1208 * Fix 'unused label' compiler warning in cord/de
1209 * Fix 'value truncated' compiler warning in CORD_cat (MS VC)
1210 * Fix 'variable unused' warning in GC_save_callers
1211 * Fix 'visibility attribute not supported' GCC warning (IBM AIX)
1212 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1213 * Fix Cygwin64 build
1214 * Fix GC_REALLOC to call GC_FREE if new size is zero and pointer is non-NULL
1215 * Fix Makefile.direct for Cygwin
1216 * Fix __alloc_size__ availability detection (Clang)
1217 * Fix abort message in GC_move_long_link
1218 * Fix and code refactoring of lock elision workaround (Linux/x64)
1219 * Fix assertion on mark_lock_holder for non-unique NUMERIC_THREAD_ID
1220 * Fix data race in GC_init_explicit_typing
1221 * Fix gc.mak regarding msvc_dbg and test (MSVC)
1222 * Fix missing error handling of pthread_attr_init/getstacksize
1223 * Fix missing error handling of pthreads_mutex_init and cond_wait
1224 * Fix missing numeric casts in cord
1225 * Fix potential left shift overflows in finalize.c (64-bit targets)
1226 * Fix pthreads-win32 name in comments and documentation
1227 * Fix setup_mark_lock missing prototype
1228 * Fix unchecked fcntl() result
1229 * Fix unchecked pointer dereference in check_ints (gctest)
1230 * Fix unchecked pthread_join() result in threadkey_test
1231 * Fix unchecked sigdelset() result in pthread_support
1232 * Fix undefined PTRFREE/NORMAL in gc_inline.h
1233 * Prefix PREFETCH_FOR_WRITE with GC_ as used in gc_inline.h public header
1234 * Relax mark_mutex attribute needed to disable elision (Linux/x64)
1235 * Remove (deprecate) TODO file
1236 * Remove code duplication in GC_realloc
1237 * Remove duplicate new-line in OUT_OF_MEMORY message (cord)
1238 * Remove references to missing linux_threads.c from documentation
1239 * Revert "Move asm machine-dependent files to 'src' folder" (partly)
1240 * Support Android API level 21
1241 * Update compiler options in gc.mak (Win32)
1242 * Use mmap instead of sbrk (Hurd)
1243 * Workaround 'comparison is always false' GCC warning in GC_FAST_MALLOC_GRANS
1244 * Workaround 'identical expr on both sides of bitwise op' warning
1245 * Workaround Linux NTPL lock elision bug
1246 * Workaround false warning about unreachable code path
1247 * Workaround invalid '_end' symbol on Android clang 3.5+
1248 Also, includes 7.2g changes
1249
1250
1251 == [7.4.2] 2014-06-03 ==
1252
1253 * Add config option to use STGRTMIN-based signals for thread suspend/resume
1254 * Allow parallel mark to be enabled on powerpc-linux systems
1255 * Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
1256 * Fix 'Array subscript is above array bounds' GCC warning in GC_new_kind/proc
1257 * Fix 'attribute declaration must precede definition' warning (clang-3.1)
1258 * Fix (enable) Cygwin-64 build
1259 * Fix GC_finalized_malloc failure on disclaim_test
1260 * Fix GC_sig_suspend initialization when non-constant SIGRTMIN used
1261 * Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
1262 * Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
1263 * Fix data roots registration for Android/x86 and NDK ARM 'gold' linker
1264 * Fix find stackbottom on BlueGene P/Q systems
1265 * Fix machdep .lo files path in configure (SPARC, IA-64)
1266 * Fix ok_init assignment (missing cast) in GC_new_kind_inner
1267 * Fix typos in names in AUTHORS and ChangeLog files
1268 * Remove barrett_diagram file duplicated by tree.html
1269 * Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram
1270 * Restore contribution information for ancient releases in ChangeLog
1271 Also, includes 7.2f changes
1272
1273
1274 == [7.4.0] 2013-11-17 ==
1275
1276 * Add 'bytes reclaimed' counters to public GC_prof_stats_s
1277 * Add AArch64 (64-bit ARM) target support
1278 * Add GC_LONG_REFS_NOT_NEEDED ifdefs to exclude long link functionality
1279 * Add GC_get_prof_stats[_unsafe]() to GC public API
1280 * Add GC_push_all/conditional() to GC public API
1281 * Add assertion on number_of_objs to GC_extend_size_map
1282 * Add assertion to GC_enable() ensuring no counter underflow
1283 * Add assertion to LOCK definition that lock is not already held
1284 * Add assertion to LONG_MULT and remove useless assert in PUSH_CONTENTS_HDR
1285 * Add double-lock assertion to GC_acquire_mark_lock
1286 * Add manual POSIX fork handling support (Android)
1287 * Add note about 'pkg-config' solving problem with autoconf 2.68 or older
1288 * Add public GC_set/get_abort_func to replace default GC_on_abort
1289 * Add public GC_start_mark_threads() to allow parallel marker in fork child
1290 * Add public setter and getter for GC_push_other_roots
1291 * Add support of Android logger
1292 * Add tests for GC_register/move/unregister_long_link
1293 * Add thread suspend/resume signals public setters (POSIX threads)
1294 * Added long weakref support
1295 * Adjust GC_dont_expand/gc/precollect and GC_print_stats type to match gc.h
1296 * Adjust README.md title and references to doc .html files in it
1297 * Adjust build scripts to enable additional test library in staticrootstest
1298 * Adjust logged messages in start_mark_threads and GC_thr_init
1299 * Adjust printf format specifiers in GC_print_trace
1300 * Allow not to rely on __data_start value (Linux)
1301 * Allow pthread_kill error code logging in GC_suspend/resume (debugging)
1302 * Allow to compile GC_inner_start_routine aside from extra/gc.c
1303 * Allow to omit libc atexit() call
1304 * Avoid LOCK/UNLOCK hard-coding in gc_locks.h for PS3 target
1305 * Better document GC_warn_proc in gc.h
1306 * Call GC_on_abort (with NULL argument) on exit(1)
1307 * Call GC_stats/verbose_log_printf instead of GC_log_printf if print_stats
1308 * Change policy regarding version numbers ("micro" part instead of "alpha")
1309 * Changed C99-style designated init of GC_dl_hashtbl struct to use C89-style
1310 * Check GC_base result in GC_print_all_smashed_proc
1311 * Check that SIG_SUSPEND and SIG_THR_RESTART are different (Pthreads)
1312 * Check traceable_allocator.allocate result before dereference in test_cpp
1313 * Code refactoring of GC_x_printf (move shared code to macro)
1314 * Convert readme to markdown
1315 * Default to use libc_stack_end in single-threaded GC on glibc targets
1316 * Define GC_VSNPRINTF internal macro in misc.c (code refactoring)
1317 * Define functions in darwin_semaphore.h as inline instead of static
1318 * Define old_bus_handler static variable only if used (Unix)
1319 * Detect dladdr() presence by configure
1320 * Disable find-leak GC_gcollect on GC abnormal EXIT
1321 * Do not define _setjmp/_longjmp macros in mach_dep.c
1322 * Do not duplicate android_log_write output to GC log file (Android)
1323 * Do not include sigcontext.h if NO_SIGCONTEXT_H (Linux)
1324 * Do not set GC_lock_holder by call_with_alloc_lock if assertions disabled
1325 * Do not use pthread_getattr_np if NO_PTHREAD_GETATTR_NP specified
1326 * Elaborate comment on dependencies in autogen.sh
1327 * Eliminate 'cast from int to pointer' warning in GC_exclude_static_roots
1328 * Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
1329 * Eliminate 'uninitialized variable use' warning in test_printf (cord)
1330 * Eliminate 'unused result' compiler warning in main() of test_cpp
1331 * Eliminate 'unused value' compiler warning in GC_stop_world (Pthreads)
1332 * Eliminate 'unused variable' compiler warning in start_mark_threads (HP/UX)
1333 * Eliminate Clang warning for GC_pthread_exit attribute
1334 * Eliminate GCC warning about uninitialized 'hhdr' in GC_allochblk_nth
1335 * Eliminate GCC warning in GC_get_main_stack_base (OpenBSD)
1336 * Eliminate GCC warnings in setjmp_t.c, test_cpp and cord 'de' app
1337 * Eliminate GC_first_nonempty atomic value reload in GC_mark_local assertion
1338 * Eliminate SIGBUS-related dead code in GC_write_fault_handler (Linux)
1339 * Eliminate warning and simplify expression in GC_init_explicit_typing
1340 * Enable 'force GC at every GC_malloc' debug-related functionality
1341 * Enable on-demand debug logging in GC_FindTopOfStack (Darwin)
1342 * Enable prefetch operations by default (GCC 3.0+)
1343 * Enable staticrootstest for the case of GC shared library build
1344 * Enable thread-local allocation support for Clang on Cygwin
1345 * Explicitly specify that Darwin, Linux and Solaris platforms have dladdr
1346 * Fix ABORT definition for mingw32ce (WinCE)
1347 * Fix AM_CONFIG_HEADER in configure for autoconf-2.69-1
1348 * Fix GC_CreateThread and GC_beginthreadex definition for Cygwin
1349 * Fix GC_INIT_CONF_ROOTS in gc.h for Android
1350 * Fix GC_INLINE definition to comply with ISO C90 standard (GCC)
1351 * Fix GC_remove_all_threads_but_me for Android (fork support)
1352 * Fix debug_register_displacement calls from GC_debug_generic_malloc_inner
1353 * Fix dyn_load.c compilation for Android 4.3
1354 * Fix make disclaim_test to link with new GNU ld linking rules
1355 * Improve GC error printing atomicity in GC_debug_X and GC_print_obj
1356 * Improve GC output atomicity in GC_print_obj, GC_print_all_errors
1357 * Improve debug-only messages of add/remove_roots and init_linux_data_start
1358 * Improve fork test logging in gctest
1359 * Improve logged messages about heap size and usage
1360 * Improve logging for Android differentiating messages by log level
1361 * Improve staticrootstest (add global data to library, add lib w/o GC_INIT)
1362 * Improve staticrootstest checks (tests)
1363 * Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
1364 * Include proper header file in 'tools' for configuration macros
1365 * Include pthread_np.h from pthread_stop_world.c on OpenBSD
1366 * Log error messages to stderr instead of stdout in tests
1367 * Make GC_generic_malloc_ignore_off_page() public
1368 * Make GC_mark_lock_holder variable static
1369 * Make GC_print_trace always thread-safe and remove 'lock' argument
1370 * Mark GC_started_thread_while_stopped() as GC_INNER
1371 * Minimize code duplication in GC_mark_and_push
1372 * Move 'include setjmp.h' from mach_dep.c to gc_priv.h
1373 * Move GC_OPENBSD_UTHREADS definition to private/gcconfig.h (OpenBSD)
1374 * Move GC_get_suspend/thr_restart_signal to misc.c for NaCl and OpenBSD
1375 * Move LOCK/UNLOCK from GC_unregister_disappearing_link_inner outer
1376 * Port BDWGC to Android/x86
1377 * Postpone the suspend signal in GC_dirty_init only if used to stop world
1378 * Prepend '#' symbol to GC number in logged messages
1379 * Prevent POSIX fork if mprotect_thread is started (Darwin)
1380 * Prevent abort on GC_err/warn_printf write failure
1381 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1382 * Put gc_cpp symbols into 'boehmgc' namespace if GC_NAMESPACE defined
1383 * Recognize GC_DONT_GC macro in gc.h (causes GC_INIT to turn off GC)
1384 * Recognize GC_SIG_SUSPEND and GC_SIG_THR_RESTART tuning macros in gc.h
1385 * Redirect WRITE to __android_log_write if GC_ANDROID_LOG (Android)
1386 * Refine comment of GC_is_heap_ptr and GC_thread_is_registered in gc.h
1387 * Register dynamic libraries via dl_iterate_phdr on Android and OpenBSD
1388 * Remove DebugBreak on WriteFile failure (Win32)
1389 * Remove GC_BUILD definition from build scripts
1390 * Remove abort on open log failure from GC_write (Win32)
1391 * Remove configure.ac outdated revision number
1392 * Remove nested EXPECT in GC_core_finalized_malloc
1393 * Remove nested always-false ifdef for HPUX and FREEBSD
1394 * Remove redundant GC_err_printf before abort
1395 * Remove unused UTHREAD_SP_OFFSET macro (OpenBSD)
1396 * Rename subthread_create to subthreadcreate_test (Makefile)
1397 * Replace GC_COND_LOG_PRINTF calls with WARN for allocation failure messages
1398 * Replace GC_log/err_printf() followed by ABORT with ABORT_ARGn()
1399 * Replace GC_stats_log_printf with GC_DBG/INFOLOG_PRINTF
1400 * Replace SIG_SUSPEND/THR_RESTART macros to variables in pthread_stop_world
1401 * Replace Win32 GC_delete_gc_thread with GC_delete_gc_thread_no_free
1402 * Replace conditional GC_log_printf calls with GC_COND/VERBOSE_LOG_PRINTF
1403 * Replace sprintf with defensive snprintf
1404 * Replace var-args GC_noop with GC_noop6 (to eliminate Clang warning)
1405 * Simplify LOCK/UNLOCK macro definition for static code analysis tools
1406 * Specify GC_malloc result is unused in some tests
1407 * Specify GC_pthread_join result is unused in threadkey_test
1408 * Specify LT_INIT in configure.ac
1409 * Start of port to QNX
1410 * Support rthreads introduced in OpenBSD 5.2+
1411 * Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
1412 * Tag GC malloc routines with alloc_size attribute for Clang 3.2+
1413 * Test NO_WRAP_MARK_SOME macro to suppress WRAP_MARK_SOME-specific code
1414 * Turn off GC_LOOP_ON_ABORT functionality if GC compiled with NO_DEBUGGING
1415 * Turn on world-stop delay logging at debug level by default for Android
1416 * Use EXPECT in GC_COND/VERBOSE_LOG_PRINTF
1417 * Use GC_log_printf for logging instead of GC_[err_]printf
1418 * Use compiler TLS for Android NDK gcc/arm
1419 * Use memcpy (BCOPY) instead of strcpy (to suppress GCC warning)
1420 * Use pthread API to operate thread-local data on Linux if no compiler TLS
1421 * Workaround 'ELF_DATA/EM_ALPHA redefined' warning in Android linker.h
1422 * Workaround 'unresolved __tls_get_addr' error for Android NDK Clang
1423 Also, includes 7.2e, 7.2d, 7.2c, 7.2b changes
1424
1425
1426 == [7.3alpha2] 2012-05-11 ==
1427
1428 * Add 'const' qualifier to pointer argument of some API functions
1429 * Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
1430 * Add GC_get_thr_restart_signal, GC_thread_is_registered to GC API
1431 * Add GC_is_heap_ptr, GC_move_disappearing_link to GC API
1432 * Add SHORT_DBG_HDRS macro template to configure
1433 * Add Symbian port to mainline (porting done by Djamel Magri)
1434 * Add TODO file
1435 * Add assertion ensuring proper alignment of 'pushed' GC symbols
1436 * Add assertion in GC_getspecific on qtid
1437 * Add assertion to GC_incremental_protection_needs, refine documentation
1438 * Add assertion to check GC_large_free_bytes by GC_finish_collection
1439 * Add configure option to compile all library .c files into single gc.o
1440 * Add cordtest to make check
1441 * Add disclaim callbacks for efficient finalization (ENABLE_DISCLAIM)
1442 * Add finalization.html to 'doc' folder
1443 * Add javaxfc.h to the installation set of GC header files (configure)
1444 * Add on-heap-resize event notification to API
1445 * Adjust GC_log_printf format specifiers (regarding signed/unsigned long)
1446 * Adjust GC_requested_heapsize on GC_init if GC_INITIAL_HEAP_SIZE given
1447 * Allow GC_exclude_static_roots() region start to be unaligned
1448 * Allow Win32 DllMain chaining on the client side
1449 * Allow to exclude finalization support by GC_NO_FINALIZATION macro
1450 * Allow to get memory via Win32 VirtualAlloc (USE_WINALLOC) on Cygwin
1451 * Avoid unnecessary GC_find_limit invocation if GC_no_dls
1452 * Avoid use of deprecated GC_dont_gc and GC_stackbottom in gctest
1453 * Cast pointers to word (instead of unsigned long) in specific.h
1454 * Changed the order in autogen.sh so ltmain exists in time for automake
1455 * Declare privately and use handy GC_base_C() for constant object pointers
1456 * Define GC_DLL if DLL_EXPORT at GC build (for Cygwin/MinGW)
1457 * Define GC_READ_ENV_FILE in configure for WinCE unless gc-debug is off
1458 * Do not compile backgraph.c unless configure '--enable-gc-debug'
1459 * Do not compile pthread_stop_world.c for Cygwin/Darwin (configure)
1460 * Do not install ancient new_gc_alloc.h broken for modern STL (configure)
1461 * Enable GC_MIN_MARKERS to set minimal number of pthread-based markers
1462 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1463 * Enable parallel mark by default in configure (Darwin/Linux/Solaris/Win32)
1464 * Export GC_is_marked, GC_clear/set_mark_bit (for mark-bit manipulation)
1465 * Extend thread-related debug messages
1466 * Fix 'configure --enable-cplusplus' for Cygwin/MinGW
1467 * Fix DATASTART (and other minor improvements) for NaCl target
1468 * Fix GC_setspecific to prevent garbage collection inside
1469 * Fix compiler warning in cordtest
1470 * Fix minor warnings reported by GCC with '-pedantic' option
1471 * Fix static data roots registration on Android (if GC is shared)
1472 * Implement GC_get_stack_base for Darwin for single-threaded mode
1473 * Improve GC_allochblk algorithm of block splitting when unmapping enabled
1474 * Improve GC_collect_or_expand algorithm for many finalizers registered case
1475 * In tests, print a message in case a test is a no-op
1476 * Instruct configure to hide internal libgc.so symbols if supported by GCC
1477 * Log amount of unmapped memory (if enabled) on marking-for-collection
1478 * Make __data_start a weak symbol to allow loading modules on mips
1479 * Move "cord" library tests to "cord/tests" folder
1480 * Move asm machine-dependent files to "src" folder
1481 * Move build tools sources to "tools" folder
1482 * Move cord_pos.h to public headers folder
1483 * Open log file in APPEND mode on Win32 (similar that on Unix/Cygwin)
1484 * Optimize some functions by moving pthread_self calls out of LOCK section
1485 * Place only major per-release changes description to ChangeLog (this file)
1486 * Prevent compiler warnings in GC_FindTopOfStack and GC_ports (Darwin)
1487 * Recognize GC_LOG_TO_FILE_ALWAYS macro to log to 'gc.log' by default
1488 * Remove all auto-generated files from the repo
1489 * Remove binary icon file for de_win
1490 * Remove cordtest from "cord" library
1491 * Remove duplicate MacOS_Test_config.h file
1492 * Remove gc_amiga_redirects.h (included internally) from public headers
1493 * Remove obsolete Makefile.DLL (superseded by Cygwin/MinGW configure)
1494 * Remove obsolete unused asm files for ALPHA, HPUX, SGI, RS6000, ULTRIX
1495 * Remove unsupported MMAP_STACKS (specific to Solaris threads)
1496 * Remove unused ancient SILENT, __STDC__, NO_SIGNALS macros
1497 * Replace ARGSUSED comment-based annotation with GCC 'unused' attribute
1498 * Replace GC_ms_entry declaration with opaque definition for public API
1499 * Replace long GC_markers global variable with int GC_markers_m1
1500 * Replace pointer relational comparisons with non-pointer ones
1501 * Replace printf PRIxMAX specifier with '%p' for thread id debug output
1502 * Require autoconf 2.61 instead of v2.64
1503 * Simplify autogen.sh (use autoreconf)
1504 * Split GC_abort with GC_on_abort and abort() invoked from ABORT
1505 * Support GC_ATTR_MALLOC for MS VisualStudio
1506 * Tag auxiliary malloc-like API functions with 'malloc' attribute
1507 * Tag deprecated variables in GC API
1508 * Tag must-be-non-null arguments of GC API functions
1509 * Turn on "extra" GCC warnings
1510 * Turn on unused-parameter checking for GCC
1511 * Update AUTHORS file
1512 * Use EXPECT for checking various 'initialized' boolean variables
1513 * Use USE_COMPILER_TLS on Cygwin
1514 * Use pthread_key for thread-local storage on FreeBSD
1515 * Use union of AO_t and word to favor strict-aliasing compiler optimization
1516 Also, includes 7.2 changes
1517
1518
1519 == [7.2o] (not released yet) ==
1520
1521 * Disable mprotect-based incremental GC if /proc roots are used (Linux)
1522 * Explicitly zero-initialize trace_buf (fix trace_buf initialization)
1523 * Fix 'ACCESS_VIOLATION in marker' GC warning on Win32 async thread start
1524 * Fix 'expected function body after declarator' clang error in gc_cpp.cc
1525 * Fix configure message about 'AIX gcc optimization fix'
1526 * Fix first_thread stack_base initialization if custom GC_stackbottom (Win32)
1527 * Fix fread failure after enable_incremental if malloc is redirected (Linux)
1528 * Fix incorrect define GC_OPENBSD_THREADS on sparc64
1529 * Fix printf format specifier in simple_example.html
1530 * Fix save_callers for multi-threaded case if built-in backtrace unavailable
1531 * Fix various typos mostly in documentation files
1532 * Fix word size, data start and alignment for OpenBSD/mips64(el)
1533 * Prevent WARN of incompatible incremental GC if default or manual VDB
1534 * Reduce a time period between GetExitCodeThread and SuspendThread (Win32)
1535 * Remove a misleading comment about Solaris in gc.h
1536
1537
1538 == [7.2n] 2019-03-01 ==
1539
1540 * Fix 'mprotect remapping failed' abort on NetBSD with PaX enabled
1541 * Fix 'unexpected mark stack overflow' abort in push_all_stack
1542 * Fix BSD_TIME variant of MS_TIME_DIFF for the case of a.tv_usec < b.tv_usec
1543 * Fix GetThreadContext stale register values use if WoW64 (Win32)
1544 * Fix executable memory allocation in GC_unix_get_mem
1545 * Fix invalid initializer of CLOCK_TYPE variables if BSD_TIME
1546
1547
1548 == [7.2m] 2018-12-11 ==
1549
1550 * Fix comment typos in CMakeLists.txt, backgraph.c, de.c, gcconfig.h
1551 * Fix hbp overflow in GC_install_counts
1552 * Fix start_world not resuming all threads on Darwin
1553 * Guard against potential buffer overflow in CORD_next and CORD_pos_fetch
1554
1555
1556 == [7.2l] 2018-08-10 ==
1557
1558 * Fix 'pointer arithmetic with NULL' code defect in print_callers
1559 * Fix Borland version in documentation to match that in BCC_MAKEFILE
1560 * Fix comment about inv_sz computation in setup_header
1561 * Fix comments style in configure.ac and Makefile.am
1562 * Fix GC_is_valid_displacement and GC_is_visible for non-small objects
1563 * Fix global operator delete definition for C++14 in gc_cpp
1564 * Fix infinite restarting of mark_some when a static root disappeared (Linux)
1565 * Fix large object base computation in PUSH_CONTENTS() if MARK_BIT_PER_OBJ
1566 * Fix mark stack overflow checking in push_selected
1567 * Fix MSWIN32 macro redefinition (WCC)
1568 * Fix potential null dereference in GC_CONS
1569 * Fix register_dynamic_libraries on Windows 10
1570 * Fix result computation in n_set_marks
1571 * Fix return type in GC_set_warn_proc API documentation
1572 * Fix typo in comment for CORD_ec_flush_buf prototype
1573 * Fix typos in ChangeLog
1574 * Fix VirtualQuery call in case of malloc failure (Win32)
1575 * Install gc.3 man page instead of copying gc.man to doc folder (configure)
1576 * Perform thread_suspend in loop as it may be interrupted (Darwin)
1577 * Workaround 'template-id not supported in this context' compiler error (WCC)
1578
1579
1580 == [7.2k] 2018-04-19 ==
1581
1582 * Fix arguments delimiter in pcr_interface.c (PCR)
1583 * Fix assertion violation in DllMain of win32_threads
1584 * Fix data race during apply_to_each_object(reset_back_edge)
1585 * Fix dbg_mlc.c/o file name in documentation
1586 * Fix include gc_gcj.h in thread_local_alloc.c
1587 * Fix man section number (3)
1588 * Fix missing GC_generic_malloc_words_small implementation in new_gc_alloc.h
1589 * Fix missing SIGBUS handler setup for kFreeBSD
1590 * Fix null dereference in print_callers on backtrace_symbols failure
1591 * Fix the collector hang when it is configured with --enable-gc-debug
1592 * Fix thread_suspend fail for threads registered from key destructor (OS X)
1593 * Fix typo in AIX macro name
1594 * Fix typo in comment in specific.h
1595
1596
1597 == [7.2j] 2018-01-21 ==
1598
1599 * Fix GC allocation mutex in child after a fork
1600 * Fix last_reclaimed..gc_no interval comparison to threshold in unmap_old
1601 * Fix libgc version which was changed in linkage breaking way
1602 * Fix missing EOLn output in threadlibs tool
1603
1604
1605 == [7.2i] 2017-12-21 ==
1606
1607 * Avoid data race in finalized_count (gctest)
1608 * Fix assertion violation about disabled cancel in try_to_collect_inner
1609 * Fix data race in a list referenced by A.aa (gctest)
1610 * Fix data race in do_local_mark when comparing active_count to helper_count
1611 * Fix data race in GC_init_explicit_typing
1612 * Fix data race in last_stop_count access (suspend_handler_inner)
1613 * Fix data race in mark_thread when updating mark_no
1614 * Fix data race when getting object size in explicitly-typed allocators
1615 * Fix lack of barriers to synchronize memory for suspend_handler
1616 * Fix typos in cdescr.html, extend_size_map and ews4800 doc, README.sgi
1617 * Prevent 'Unexpected heap growth' in single-threaded gctest (Linux/x64)
1618
1619
1620 == [7.2h] 2017-10-12 ==
1621
1622 * Add gctest as a test (CMake)
1623 * Change no-argument functions declaration style to ANSI C (extra files)
1624 * Do not allow SHORT_DBG_HDRS if KEEP_BACK_PTRS or MAKE_BACK_GRAPH
1625 * Ensure oom_fn callback executed on out-of-memory in calloc
1626 * Fix '~' operator application to unsigned values shorter than word
1627 * Fix 'context local variable might be clobbered by setjmp' compiler warning
1628 * Fix 'doc' files installation folder
1629 * Fix 'shift count >= width of type' compiler warning in GC_SQRT_SIZE_MAX
1630 * Fix ALL_INTERIOR_POINTERS name in comments and documentation
1631 * Fix AO_SRC_DIR target name in NT_*_MAKEFILE
1632 * Fix assertion in GC_mark_from for non-heap regions
1633 * Fix assertion in GC_steal_mark_stack for non-heap regions
1634 * Fix assertion violation in GC_repeat_read if --enable-redirect-malloc
1635 * Fix assertion violation in GC_wait_builder called from start_mark_threads
1636 * Fix assertion violation in mark_local checking GC_mark_stack_top
1637 * Fix assertion violation in return_single_freelist in child process
1638 * Fix bm_huge initialization for 64-bit targets (gctest)
1639 * Fix broken external links in documentation
1640 * Fix bytes count passed to add_to_our_memory in backgraph new_back_edges
1641 * Fix calloc_explicitly_typed in case of lb*n overflow
1642 * Fix CMake warning about CMP0054 by unquoting instances of HOST
1643 * Fix conditional expression in pos_fetch, next non-macro definitions (cord)
1644 * Fix configure --disable-munmap handling
1645 * Fix CORD_substr_closure for the case when CORD_from_fn returns C string
1646 * Fix crash in FirstDLOpenedLinkMap if app linked statically (Alpine Linux)
1647 * Fix double lock in pthread_detach (Cygwin, winpthreads)
1648 * Fix double multiplication of lb by n in calloc_explicitly_typed
1649 * Fix enable_parallel_mark condition in CMake script
1650 * Fix external libatomic_ops pkg-config-based detection
1651 * Fix gc_allocator.h file name in new_gc_alloc.h comment
1652 * Fix gc_backptr.h, gc_mark.h, GC_DS_TAGS names in documentation
1653 * Fix gc_cleanup destructor for non-heap objects (gc_cpp)
1654 * Fix GC_collect_or_expand to prevent allocation size value wrap-around
1655 * Fix GC_incremental declaration/definition type mismatch
1656 * Fix GC_mark_stack_top assertion violation properly in mark_local
1657 * Fix GC_remove_specific invocation from remove_all_threads_but_me
1658 * Fix GC_requested_heapsize increment in GC_init
1659 * Fix GC_setspecific to prevent garbage collection inside
1660 * Fix GC_SIZE_MAX definition (Linux/musl-gcc)
1661 * Fix GCJ support in CMake build script
1662 * Fix gctest crash if configure --enable-handle-fork on Darwin
1663 * Fix get_maps on proc maps file asynchronous growth
1664 * Fix hb_n_marks underflow in clear_fl_marks if MARK_BIT_PER_OBJ
1665 * Fix header filename in gcconfig.h comment
1666 * Fix infinite mark_some calls after memory mapping disappeared (Glibc)
1667 * Fix integer shift undefined behavior in GC_init_explicit_typing
1668 * Fix leak_test crash in print_callers if free() is redirected
1669 * Fix Makefile.direct recursive invocation
1670 * Fix malloc routines to prevent size value wrap-around (fix CVE-2016-9427)
1671 * Fix missing win32_threads.c compilation for Cygwin (CMake)
1672 * Fix MS VC warning about compiling unused checksums and thread_local_alloc
1673 * Fix name typos in GC_FAST_MALLOC_GRANS comment
1674 * Fix null dereference in reclaim_block if DONT_ADD_BYTE_AT_END
1675 * Fix OSF1 host pattern in CMakeLists.txt
1676 * Fix PCR-Makefile by removing compilation of a missing file
1677 * Fix potential data race in GC_SysVGetDataStart (SPARC)
1678 * Fix potential integer overflow in GC_find_limit_* functions
1679 * Fix printf arguments type in print_callers
1680 * Fix pthread_detach for threads not yet registered (Cygwin, winpthreads)
1681 * Fix pthread_join to avoid thread removal on failure (Cygwin, winpthreads)
1682 * Fix pthread_join when thread is registered in thread key destructor
1683 * Fix push_complex_descriptor to avoid unlimited global mark stack growth
1684 * Fix removal of dead threads in a child process
1685 * Fix SIGSEGV in GC_is_marked when gc_cleanup is used in leak-finding mode
1686 * Fix SIGSEGV in mark_from called from do_local_mark if WRAP_MARK_SOME
1687 * Fix Solaris/sparc detection in case of strict C compliance is enforced
1688 * Fix STACKBOTTOM for Solaris 11/x86
1689 * Fix storage class of local variable in register_dynamic_libraries (Irix)
1690 * Fix tools/setjmp_t hang (OS X)
1691 * Fix typed_test to prevent fails in malloc_explicitly_typed (64-bit)
1692 * Fix undefined HEAP_START in register_dynamic_libraries
1693 * Fix USE_CUSTOM_SPECIFIC mode (if manually enabled) for Win32
1694 * Fix USE_GET_STACKBASE_FOR_MAIN definition in gcconfig.h
1695 * Fix various typos in comments, documentation and printed messages
1696 * Handle load_segs overflow in register_dynlib_callback gracefully
1697 * Prevent misleading AC_MSG_ERROR/AS_IF errors reported in configure.ac
1698 * Replace (fix) 'objs' acronym in comments with 'objects' word
1699 * Revert "Skip GC_DS_PER_OBJECT objs with negative descriptor in GC_mark_from"
1700 * Update documentation about bugs reporting and new releases notification
1701 * Update Download information in GC overview document
1702 * Update shared libraries version info (v7.2)
1703 * Workaround a bug in winpthreads causing parallel marks deadlock (MinGW)
1704 * Workaround missing getcontext() in Docker osrf/ubuntu_32bit
1705
1706
1707 == [7.2g] 2016-05-23 ==
1708
1709 * Fix 'illegal option -xassembler-with-cpp' error (Oracle SunCC)
1710 * Fix 'implicit declaration of function' compiler warnings in cord/de
1711 * Fix CFLAGS in configure regarding -O flag passing to SunCC compiler
1712 * Fix FirstDLOpenedLinkMap for case libgc not 1st dynamically linked (NetBSD)
1713 * Fix GC initialization in cord de_win for Cygwin
1714 * Fix GC_get_stack_base if called before GC_init (Win32)
1715 * Fix OSX issue with pthread_attr_setstacksize failure
1716 * Fix Unicode Win32 API calls in cord de_win
1717 * Fix USE_COMPILER_TLS macro duplicate description in README
1718 * Fix cord de_win WndProc prototype parameters for 64-bit (Win64)
1719 * Fix file descriptor resource leak in GC_register_data_segments (OS/2)
1720 * Fix filename printing in cordtest
1721 * Fix missing cord_pos.h, ec.h among installed headers (Automake)
1722 * Fix missing GC_get_stack_base for Amiga
1723 * Fix missing msvc_dbg.h in dist_noinst_HEADERS (Automake)
1724 * Fix mistyped ARM_THREAD_STATE macro (Darwin/arm)
1725 * Fix null-pointer dereferences on out-of-memory in cord and tests
1726 * Fix potential multiplication overflow in check_heap_stats (gctest)
1727 * Fix race (and potential deadlock) at marker threads initialization
1728 * Fix signedness of char values passed to isspace, iscntrl, isxdigit
1729 * Fix typo (items numbering) in GC_finalize_all documentation
1730 * Fix typos in ERROR_FL, GC_malloc_uncollectable comments
1731 * Fix typos in gc_priv.h, in README for ews4800
1732 * Fix unresolved vsnprintf in misc.c and snprintf in cordtest (DJGPP, VC)
1733 * Fix various spelling errors
1734 * Fix vsprintf_args initialization/cleanup in CORD_vsprintf for EMX
1735 * Regenerate configure files using official libtool release (v2.4.2)
1736 * Remove documentation about obsolete GC_REDIRECT_TO_LOCAL
1737 * Skip GC_DS_PER_OBJECT objects with negative descriptor in GC_mark_from
1738 * windows-untested: Fix paths to msvc_dbg.c/h
1739
1740
1741 == [7.2f] 2014-06-03 ==
1742
1743 * Fix 'Bad signal in suspend_handler' abort on FreeBSD-9.2
1744 * Fix 'source file in a subdirectory' Automake warnings
1745 * Fix ABORT message in GC_restart_handler
1746 * Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
1747 * Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
1748 * Fix GC_alloc_large by bumping GC_collect_at_heapsize in GC_add_to_heap
1749 * Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
1750 * Fix GET_MEM argument rounding in GC_scratch_alloc and similar
1751 * Fix PARALLEL_MARK for Windows 7+
1752 * Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
1753 * Fix crash when using GC_malloc_many() as first allocation call
1754 * Fix mark stack excessive growth during parallel mark
1755 * Fix or remove broken URLs in documentation
1756 * Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)
1757 * Fix typo in GC_collect_or_expand comment
1758 * Fix typos in GC overview file, gc_config_macros.h, gc_cpp.h, README.changes
1759 * Regenerate configure files by automake 1.14.1, libtool 2.4.2.418
1760 * Update emails/links due to project site and ML transition
1761
1762
1763 == [7.2e] 2013-11-10 ==
1764
1765 * Add weak attribute to avoid __data_start undefined messages (s390x)
1766 * Add weak stubs for pthread_cancel API
1767 * Adjust 'pthread_[un]register_cancel undefined ref' workaround (Pthreads)
1768 * Append _test suffix to 'initsecondarythread' binary file names
1769 * Enable PARALLEL_MARK and THREAD_LOCAL_ALLOC for FreeBSD in configure
1770 * Fix 'stack section' pointer passed to push_all_stack_sections (Pthreads)
1771 * Fix GC_CreateThread 'dwStackSize' argument type for Win64
1772 * Fix GC_PTHREAD_PTRVAL definition for GC_PTHREADS_PARAMARK (Win32)
1773 * Fix GC_clear_stack by declaring 'dummy' local array as volatile
1774 * Fix GC_get_stack_base assembly code (Cygwin/Clang)
1775 * Fix GC_malloc_explicitly_typed_ignore_off_page for large allocations
1776 * Fix GC_marker_Id elements initialization (WinCE)
1777 * Fix GC_print_trace missing unlock
1778 * Fix GC_unix_mmap_get_mem for open of /dev/zero failure
1779 * Fix GC_win32_free_heap compilation error for Cygwin
1780 * Fix GC_win32_free_heap to prevent memory leak if USE_GLOBAL_ALLOC
1781 * Fix Win32 GC_write preventing potential infinite recursion at abort
1782 * Fix assertion violation in GC_mark_from prefetch loop
1783 * Fix collection of objects referenced only from GC_mark_stack_X variables
1784 * Fix dwSize argument of VirtualFree call in detect_GetWriteWatch (Win32)
1785 * Fix heap sections overflow for Win32/Cygwin with enabled parallel marker
1786 * Fix min_bytes_allocd preventing potential infinite loop in GC_allocobj
1787 * Fix missing tabs in SMakefile.amiga file
1788 * Fix null-pointer dereference in CORD_substr_closure
1789 * Fix old_segv/bus_act variables initialization for FreeBSD
1790 * Fix potential double fclose in test_extras (cordtest)
1791 * Fix pthread_attr_t resource leak in pthread_create
1792 * Fix race in GC_print_all_errors regarding GC_leaked
1793 * Fix sizeof in GC_push_thread_structures
1794 * Fix stackbottom/stack_end assignment in GC_call_with_gc_active
1795 * Fix tests makefile to link with new GNU ld linking rules
1796 * Fix typos in comments and documentation
1797 * Fix unportable '==' test operators in configure
1798 * Fix vsprintf_args cleanup in CORD_vsprintf
1799 * Merge FreeBSD New ports collection for boehm-gc v7.2d
1800 * Replace GC_DBG_RA with GC_DBG_EXTRAS macro
1801 * Replace deprecated [CXX]INCLUDES to AM_C[PP]FLAGS in configure.ac file
1802 * Use __builtin_extract_return_addr in GC_RETURN_ADDR_PARENT (gcc/x86)
1803
1804
1805 == [7.2d] 2012-08-09 ==
1806
1807 * Fix GC_call_with_stack_base to prevent its tail-call optimization
1808 * Fix all address-of-dummy operations by using GC_approx_sp() instead
1809 * Fix stop_info.stack_ptr assignment in GC_suspend_all for OpenBSD
1810 * Fix test_cpp (ensure the collector recognizes pointers to interiors)
1811 * Fix thread-related tests for pthreads-w32
1812 * test_cpp: Fix WinMain to prevent SEGV if zero arguments passed (MinGW)
1813
1814
1815 == [7.2c] 2012-06-11 ==
1816
1817 * Fix CORD_cat_char_star to prevent SEGV in case of out-of-memory
1818 * Fix GC_FirstDLOpenedLinkMap() for NetBSD 6 release
1819 * Fix GC_scratch_alloc and GC_get_maps invocations to prevent SEGV
1820 * Fix visibility of GC_clear/set_mark_bit (unhide symbols)
1821 * Fix visibility of GC_push_all/conditional, GC_push_other_roots symbols
1822
1823
1824 == [7.2b] 2012-05-23 ==
1825
1826 * Fix assertion in GC_malloc_[atomic_]uncollectable (THREADS case only)
1827
1828
1829 == [7.2] 2012-05-11 ==
1830
1831 * Abort in GC_thr_init on pthread_atfork failure (POSIX threads)
1832 * Add GC_WIN32_PTHREADS target in configure
1833 * Add GC_is_disabled new function to GC API
1834 * Add info that getcontext() resets FPE mask no longer on Linux/x86_64
1835 * Add public GC_set_handle_fork to control forked child handling support
1836 * Add realloc_test.c test
1837 * Add support for Hexagon target
1838 * Add thread-safe GC_get_heap_usage_safe to GC API
1839 * Change GC_check_fl_marks prototype and implementation
1840 * Check pthread_create/join result in test
1841 * Define GC_DLL (in configure) if building only dynamic libraries
1842 * Define NO_DEBUGGING (in configure) if "--disable-gc-debug" is set
1843 * Disable incremental mode on Darwin if fork handling requested
1844 * Enable parallel marker in configure for Solaris
1845 * Fix "comparison of signed and unsigned values" compiler warnings
1846 * Fix 'volatile' keyword placement in GC_SysVGetDataStart
1847 * Fix ALIGNMENT, CPP_WORDSZ, GC_GRANULE_BYTES/WORDS for x32 target
1848 * Fix GC_READ_ENV_FILE code for Cygwin
1849 * Fix GC_add_roots_inner for Mac OS X (align segment start)
1850 * Fix GC_check_fl_marks regarding concurrent access
1851 * Fix GC_finalizer_nested size to workaround alignment problem in Watcom
1852 * Fix GC_find_limit_with_bound to always reset fault handler on return
1853 * Fix GC_init static assertion for clang/x64 (Darwin)
1854 * Fix GC_init[_lib_bounds] and GC_get_main_stack_base for malloc redirection
1855 * Fix GC_push_all/selected boundaries check
1856 * Fix GC_register_my_thread marking thread as detached (Cygwin/pthreads-w32)
1857 * Fix GC_remove_all_threads_but_me to cleanup thread-specific data storage
1858 * Fix GC_restart_handler to preserve errno if needed
1859 * Fix GC_root_size update in GC_add_roots_inner (Win32)
1860 * Fix GC_unregister_my_thread to ensure no ongoing incremental GC (Win32)
1861 * Fix GC_with_callee_saves_pushed for clang (disable __builtin_unwind_init)
1862 * Fix calloc, GC_generic_malloc to check for allocation size overflows
1863 * Fix compiler warning in GC_dyld_image_add/remove (Darwin)
1864 * Fix configure --enable-cplusplus make install
1865 * Fix configure to disable GCC aliasing optimization unless forced to
1866 * Fix duplicate definitions in gcconfig.h for NetBSD
1867 * Fix fork() support on Cygwin and Darwin targets
1868 * Fix gc.h compatibility regression regarding GC_PTR, GC_I_HIDE_POINTERS
1869 * Fix gc_cpp.cc for Cygwin (remove duplicate function definition)
1870 * Fix gcconfig.h to define USE_GET_STACKBASE_FOR_MAIN for Android
1871 * Fix gcconfig.h to handle mips64-linux target
1872 * Fix gctest (for Win32) to avoid GC_print_stats internal variable usage
1873 * Fix mach_dep.c to include sys/ucontext.h on Mac OS X 10.6
1874 * Fix tests to check GC_malloc result for NULL (out-of-memory)
1875 * Fix thread model in configure for MinGW ("win32" instead of "posix")
1876 * Fix various warnings reported by LINT-like tools
1877 * Fix visibility of some GC internal symbols used by GNU GCJ currently
1878 * Port some thread tests to Win32
1879 * Refine API GC setters and getter comments regarding locking
1880 * Refine GC_stackbottom description in gc.h
1881 * Remove duplicate calls in GC_register_dynamic_libraries
1882 * Remove locking in API GC_get_bytes_since_gc and friends
1883 * Remove newly-added GC_get_heap_size/free_bytes_inner from API
1884 * Remove some local variables that are unused
1885 * Support multi-threading for RTEMS target
1886 * Use global GC_noop_sink variable in GC_noop1 to suppress compiler warning
1887 * Use pkg-config to pick up libatomic_ops, etc
1888 * Workaround some Linux/arm kernels bug to get correct GC_nprocs value
1889
1890
1891 == [7.2alpha6] 2011-06-14 ==
1892
1893 * configure_atomic_ops.sh: Remove.
1894 * Makefile.direct (dist gc.tar): Remove configure_atomic_ops.sh.
1895 * Makefile.am (EXTRA_DIST): Add autogen.sh.
1896
1897 * NT_STATIC_THREADS_MAKEFILE (.cpp.obj): Remove duplicate .cpp
1898 filename passed.
1899 * NT_X64_THREADS_MAKEFILE (.cpp.obj): Use lowercase file
1900 extension.
1901 * NT_X64_STATIC_THREADS_MAKEFILE (.cpp.obj): Likewise.
1902 * NT_MAKEFILE (.cpp.obj): Likewise.
1903
1904 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
1905 GC_traverse_back_graph): Move prototype to gc_priv.h.
1906 * checksums.c (GC_page_was_ever_dirty): Likewise.
1907 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
1908 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
1909 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
1910 GC_get_next_stack): Likewise.
1911 * finalize.c (GC_reset_finalizer_nested,
1912 GC_check_finalizer_nested): Likewise.
1913 * gcj_mlc.c (GC_start_debugging, GC_store_debug_info): Likewise.
1914 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
1915 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
1916 * misc.c (GC_register_main_static_data, GC_init_win32,
1917 GC_setpagesize, GC_init_linux_data_start,
1918 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
1919 GC_initialize_offsets, GC_bl_init, GC_do_blocking_inner,
1920 GC_bl_init_no_interiors): Likewise.
1921 * os_dep.c (GC_greatest_stack_base_below, GC_push_all_stacks):
1922 Likewise.
1923 * reclaim.c (GC_check_leaked): Likewise.
1924 * win32_threads.c (GC_gww_dirty_init): Likewise.
1925 * darwin_stop_world.c (GC_is_mach_marker, GC_mprotect_stop,
1926 GC_mprotect_resume): Move prototype to darwin_stop_world.h.
1927 * pthread_support.c (GC_FindTopOfStack): Likewise.
1928 * dyn_load.c (GC_cond_add_roots): Merge adjacent definitions.
1929 * mark.c (GC_page_was_ever_dirty): Remove (as already declared).
1930 * mark_rts.c (GC_roots_present): Change return type to void
1931 pointer (to match the prototype); return NULL instead of FALSE.
1932 * mark_rts.c (GC_add_roots_inner): Cast GC_roots_present() result.
1933 * os_dep.c (NEED_PROC_MAPS): Move definition to gcconfig.h.
1934 * os_dep.c (GC_write_fault_handler): Make STATIC.
1935 * os_dep.c (GC_set_write_fault_handler): New function (only if
1936 GC_WIN32_THREADS).
1937 * pthread_start.c (GC_start_rtn_prepare_thread,
1938 GC_thread_exit_proc): Move prototype to pthread_support.h.
1939 * pthread_support.c (GC_nacl_initialize_gc_thread,
1940 GC_nacl_shutdown_gc_thread, GC_unblock_gc_signals):
1941 Likewise.
1942 * pthread_support.c (GC_stop_init): Move prototype to
1943 pthread_stop_world.h.
1944 * win32_threads.c (GC_write_fault_handler): Remove prototype.
1945 * win32_threads.c (GC_register_my_thread_inner): Call
1946 GC_set_write_fault_handler instead of SetUnhandledExceptionFilter
1947 (only if MPROTECT_VDB).
1948 * doc/README.win32: Add information about DMC.
1949 * include/private/gc_priv.h (GC_set_write_fault_handler): New
1950 prototype (only if GC_WIN32_THREADS and MPROTECT_VDB).
1951
1952 * misc.c (vsnprintf): Redirect to vsprintf() if NO_VSNPRINTF.
1953
1954 * win32_threads.c (GC_unregister_my_thread): Use KNOWN_FINISHED()
1955 instead of FINISHED macro.
1956 * tests/test.c (check_heap_stats): Round up max_heap_sz value for
1957 Win32 (same as for USE_MMAP).
1958
1959 * tests/test.c (check_heap_stats): Adjust printf format specifier
1960 for max_heap_sz; cast max_heap_sz accordingly.
1961
1962 * doc/README.solaris2: Add note.
1963
1964 * configure.ac (SOLARIS25_PROC_VDB_BUG_FIXED): Don't define for
1965 Solaris/x86 2.10+.
1966
1967 * tests/threadkey_test.c (SKIP_THREADKEY_TEST): Skip the test if
1968 defined; explicitly define for some targets.
1969
1970 * mark.c (GC_dirty): Add prototype (only if MANUAL_VDB).
1971 * stubborn.c (GC_dirty): Likewise.
1972 * include/private/gcconfig.h (GWW_VDB, MPROTECT_VDB, PCR_VDB,
1973 PROC_VDB): Undefine if MANUAL_VDB.
1974 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
1975 MANUAL_VDB.
1976 * os_dep.c (async_set_pht_entry_from_index): Define for
1977 MANUAL_VDB.
1978 * os_dep.c (GC_read_dirty): Set GC_dirty_maintained only if
1979 success; if ioctl() failed then just print warning instead of
1980 aborting.
1981
1982 * include/private/gc_priv.h (GC_ASSERT): Use "%d" (instead of %ld)
1983 for line number printing.
1984
1985 * os_dep.c (GC_read_dirty): Add debug logging if DEBUG_DIRTY_BITS
1986 (for PROC_VDB only); print errors via GC_err_printf; rename "ps"
1987 and "np" local variables to npages and pagesize, respectively;
1988 remove "current_addr" local variable.
1989
1990 * os_dep.c (GC_get_main_stack_base): Convert to GC_get_stack_base
1991 for BeOS and OS/2; define HAVE_GET_STACK_BASE.
1992 * os_dep.c (GET_MAIN_STACKBASE_SPECIAL): Define when a specific
1993 GC_get_main_stack_base implementation is defined.
1994 * os_dep.c (GC_get_main_stack_base): Define that based on
1995 GC_get_stack_base() in a single place (only if
1996 GET_MAIN_STACKBASE_SPECIAL is unset); check GC_get_stack_base()
1997 result.
1998
1999 * mark.c (GC_push_selected): Remove "push_fn" argument (use
2000 GC_push_all directly); update the documentation.
2001 * mark.c (GC_push_conditional): Simplify the code (for better
2002 readability).
2003
2004 * mark.c (alloc_mark_stack): Use FALSE/TRUE (instead of 0/1) for
2005 boolean local variables.
2006 * doc/README.macros (GC_PREFER_MPROTECT_VDB): Update.
2007 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
2008 GC_remove_protection): Define for GWW_VDB and PROC_VDB in a single
2009 place.
2010 * os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty): Compute
2011 PHT_HASH(h) only once (store result to a local variable).
2012
2013 * doc/README.solaris2: Update.
2014
2015 * include/private/gcconfig.h (end, InitStackBottom): Declare
2016 extern variable for RTEMS.
2017 * include/private/gcconfig.h (DATASTART, DATAEND, STACKBOTTOM):
2018 Update (for RTEMS).
2019 * include/private/gcconfig.h (DATAEND): Fix a typo in the macro
2020 name (for RTEMS).
2021 * tests/test.c (CONFIGURE_APPLICATION_DOES_NOT_NEED_CLOCK_DRIVER):
2022 Replace with CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER (for RTEMS).
2023
2024 * include/private/gcconfig.h (MPROTECT_VDB): Enable for Solaris in
2025 single-threaded environment.
2026
2027 * include/private/gcconfig.h (MPROTECT_VDB): Undefine if PROC_VDB.
2028 * tests/test.c (NUMBER_ROUND_UP): New macro.
2029 * tests/test.c (check_heap_stats): Round up total expected heap
2030 size to the nearest 4 MiB bound.
2031 * tests/test.c (check_heap_stats): Print the current and expected
2032 heap sizes in case of failure.
2033
2034 * checksums.c (GC_check_blocks, GC_check_dirty): Do log printing
2035 only if GC_print_stats; print errors using GC_err_printf.
2036 * checksums.c (GC_check_blocks): Join adjacent printf() calls into
2037 a single one.
2038
2039 * pthread_support.c (pthread_join): Add assertion (check thread is
2040 finished).
2041 * pthread_support.c (GC_register_my_thread): Don't detach the
2042 thread if invoked from the thread destructor.
2043 * win32_threads.c (GC_register_my_thread): Likewise.
2044 * win32_threads.c (GC_unregister_my_thread): Don't delete the
2045 thread (just set FINISHED) if the thread is not detached (only if
2046 GC_PTHREADS); add assertion (check the thread is not finished).
2047 * tests/threadkey_test.c (main): Join some created threads.
2048
2049 * pthread_support.c (GC_delete_gc_thread): Rename "gc_id" local
2050 variable to "t".
2051 * win32_threads.c (GC_delete_gc_thread): Likewise.
2052 * pthread_support.c (pthread_join, pthread_detach,
2053 pthread_cancel): Rename "thread_gc_id" local variable to "t".
2054 * win32_threads.c (GC_pthread_detach): Likewise.
2055 * win32_threads.c (GC_delete_gc_thread): Remove "gc_nvid" local
2056 variable.
2057 * win32_threads.c (GC_pthread_join): Rename "joinee" local
2058 variable to "t".
2059
2060 * pthread_stop_world.c (pthread_sigmask): Undefine even if not
2061 DEBUG_THREADS.
2062 * pthread_stop_world.c (GC_unblock_gc_signals): New function (only
2063 if GC_EXPLICIT_SIGNALS_UNBLOCK).
2064 * pthread_support.c (GC_unblock_gc_signals): New prototype.
2065 * pthread_support.c (GC_register_my_thread_inner,
2066 GC_register_my_thread): Call GC_unblock_gc_signals (only if
2067 GC_EXPLICIT_SIGNALS_UNBLOCK); add comment.
2068 * include/private/gcconfig.h (GC_EXPLICIT_SIGNALS_UNBLOCK): New
2069 macro.
2070
2071 * pthread_stop_world.c (GC_suspend_handler_inner): Remove "dummy",
2072 "sig" local variables; rename my_thread local variable to "self".
2073
2074 * tests/threadkey_test.c (LIMIT): Use smaller value (don't create
2075 more than 30 in parallel by default).
2076
2077 * tests/threadkey_test.c (key_once, main): Work around for Solaris
2078 PTHREAD_ONCE_INIT.
2079 * tests/threadkey_test.c (LIMIT): Use smaller value for Solaris.
2080
2081 * dyn_load.c (GC_FirstDLOpenedLinkMap): Remove unused "r" local
2082 variable.
2083 * pthread_support.c (GC_unregister_my_thread_inner): Revert back
2084 GC_remove_specific invocation; add a comment.
2085 * include/private/thread_local_alloc.h (GC_remove_specific):
2086 Revert back.
2087 * specific.c (slow_getspecific): Cast qtid to AO_t.
2088 * include/private/specific.h (key_create, setspecific,
2089 remove_specific): Remove "extern" keyword.
2090 * include/private/specific.h (getspecific): Change type of "qtid"
2091 local variable to unsigned long.
2092
2093 * pthread_support.c (GC_check_tls): Fix "#endif" comment.
2094 * include/gc.h (GC_REDIRECT_TO_LOCAL): Remove deprecated comment.
2095 * include/private/thread_local_alloc.h (THREAD_LOCAL_ALLOC):
2096 Remove redundant test of the macro.
2097
2098 * backgraph.c (add_edge): Recognize DEBUG_PRINT_BIG_N_EDGES macro.
2099 * os_dep.c (GC_set_and_save_fault_handler): Recognize
2100 SIGACTION_FLAGS_NODEFER_HACK macro.
2101 * pthread_support.c (mark_mutex): Recognize GLIBC_2_1_MUTEX_HACK
2102 macro.
2103 * pthread_support.c (GC_acquire_mark_lock): Remove commented out
2104 code.
2105 * include/private/gc_priv.h (SUNOS5SIGS): Don't include
2106 sys/siginfo.h on Linux.
2107 * include/private/gcconfig.h (FORCE_WRITE_PREFETCH): New macro
2108 recognized, force PREFETCH_FOR_WRITE to be defined on x86.
2109 * include/private/gcconfig.h (USE_HPUX_FIXED_STACKBOTTOM): New
2110 macro recognized (for HP/UX).
2111
2112 * os_dep.c (GC_gww_page_was_ever_dirty): Fix comment (for
2113 GWW_VDB).
2114 * os_dep.c (GC_dirty_init): Use memset() for GC_written_pages
2115 resetting (for PROC_VDB).
2116
2117 * tests/threadkey_test.c: New file.
2118 * tests/tests.am (TESTS, check_PROGRAMS): Add 'threadkey_test'.
2119 * tests/tests.am (threadkey_test_SOURCES, threadkey_test_LDADD):
2120 New variable.
2121
2122 * pthread_support.c (GC_unregister_my_thread_inner): Don't call
2123 GC_remove_specific.
2124 * include/private/thread_local_alloc.h (GC_remove_specific):
2125 Remove (since it is empty for all targets).
2126 * pthread_support.c (GC_record_stack_base): New inline function.
2127 * win32_threads.c (GC_record_stack_base): Likewise.
2128 * pthread_support.c (GC_register_my_thread_inner): Invoke
2129 GC_record_stack_base.
2130 * win32_threads.c (GC_register_my_thread_inner): Likewise.
2131 * pthread_support.c (GC_register_my_thread): If thread is FINISHED
2132 then call GC_record_stack_base, clear FINISHED, initialize
2133 thread-local list and return success.
2134 * win32_threads.c (GC_register_my_thread): Likewise.
2135 * include/gc.h (GC_register_my_thread): Update documentation.
2136 * include/private/thread_local_alloc.h (GC_thread_key): Likewise.
2137
2138 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Join
2139 adjacent "#ifdef".
2140 * thread_local_alloc.c (GC_malloc_atomic): Call
2141 GC_core_malloc_atomic (instead of GC_core_malloc).
2142
2143 * pthread_start.c (GC_start_rtn_prepare_thread): Change return
2144 type to GC_thread.
2145 * pthread_start.c (GC_inner_start_routine): Pass the current
2146 thread descriptor to pthread_cleanup_push (same as in
2147 win32_threads.c).
2148 * pthread_stop_world.c (GC_push_all_stacks): Rename "me" local
2149 variable to "self".
2150 * win32_threads.c (GC_push_all_stacks): Likewise.
2151 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Rename
2152 "my_thread" local variable to "self".
2153 * pthread_support.c (GC_unregister_my_thread_inner): New static
2154 function.
2155 * pthread_support.c (GC_unregister_my_thread,
2156 GC_thread_exit_proc): Use GC_unregister_my_thread_inner.
2157 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread,
2158 GC_do_blocking_inner): Rename "t" local variable to "thread_id".
2159 * win32_threads.c (GC_wait_marker, GC_notify_all_marker): Rename
2160 "id" local variable to "thread_id".
2161
2162 * pthread_support.c (GC_unregister_my_thread): Call pthread_self
2163 only once.
2164 * win32_threads.c (GC_pthread_start_inner): Likewise.
2165 * pthread_support.c (GC_unregister_my_thread): Add debug output.
2166 * win32_threads.c (GC_unregister_my_thread): Likewise.
2167 * pthread_support.c (GC_register_my_thread,
2168 GC_start_rtn_prepare_thread): Rename "my_pthread" local variable
2169 to "self".
2170
2171 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
2172 unconditionally (do not test GC_I_HIDE_POINTERS); update the
2173 comment.
2174 * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
2175 GC_HIDE/REVEAL_POINTER, respectively.
2176 * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
2177 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
2178
2179 * include/gc.h (GC_register_my_thread): Refine the comment.
2180
2181 * include/gc_inline.h (GC_MALLOC_WORDS, GC_CONS): Add missing
2182 parentheses.
2183 * include/gc_typed.h (GC_get_bit, GC_set_bit,
2184 GC_CALLOC_EXPLICITLY_TYPED): Likewise.
2185
2186 * include/private/gcconfig.h (NO_GETCONTEXT): Add missing ')'.
2187
2188 * include/private/gcconfig.h (NO_GETCONTEXT): Do not use
2189 getcontext(2) on m68k because it is not implemented there.
2190
2191 * alloc.c (GC_clear_a_few_frames): Use BZERO().
2192 * mark_rts.c (GC_clear_roots, GC_rebuild_root_index): Likewise.
2193 * reclaim.c (GC_start_reclaim): Likewise.
2194 * blacklst.c (total_stack_black_listed): Remove "len" local
2195 variable.
2196 * dbg_mlc.c (GC_generate_random_valid_address): Replace "for"
2197 statement with "do-while" one.
2198 * dyn_load.c (GC_register_dynamic_libraries,
2199 GC_register_dynlib_callback): Remove redundant parentheses.
2200
2201 * cord/cordxtra.c (CORD_from_file_lazy_inner): Suppress
2202 "unused result" compiler warning for fread().
2203
2204 * os_dep.c (GC_write_fault_handler): Break when in_allocd_block
2205 is set to true.
2206
2207 * dbg_mlc.c (GC_has_other_debug_info): Change return type to int;
2208 return -1 if the object has (or had) debugging info but was
2209 marked deallocated.
2210 * include/private/dbg_mlc.h (GC_has_other_debug_info): Likewise.
2211 * dbg_mlc.c (GC_has_other_debug_info): Update documentation;
2212 remove "ohdr" local variable.
2213 * dbg_mlc.c (GC_debug_free): Don't call GC_free if the object has
2214 probably been deallocated.
2215 * dbg_mlc.c (GC_debug_free): Don't actually free the object even
2216 in the leak-finding mode if GC_findleak_delay_free.
2217 * dbg_mlc.c (GC_check_leaked): New function (only unless
2218 SHORT_DBG_HDRS).
2219 * doc/README.environment (GC_FINDLEAK_DELAY_FREE): Document.
2220 * doc/README.macros (GC_FINDLEAK_DELAY_FREE): Likewise.
2221 * include/private/dbg_mlc.h (START_FLAG, END_FLAG): Use GC_WORD_C
2222 on 64-bit architectures.
2223 * include/private/dbg_mlc.h (NOT_MARKED): Remove redundant
2224 parentheses.
2225 * include/private/dbg_mlc.h (GC_HAS_DEBUG_INFO): Update (due to
2226 GC_has_other_debug_info change).
2227 * include/private/gc_priv.h (GC_findleak_delay_free): New global
2228 variable declaration (unless SHORT_DBG_HDRS).
2229 * misc.c (GC_findleak_delay_free): New global variable; recognize
2230 GC_FINDLEAK_DELAY_FREE.
2231 * misc.c (GC_init): Recognize GC_FINDLEAK_DELAY_FREE environment
2232 variable (unless SHORT_DBG_HDRS).
2233 * reclaim.c (GC_check_leaked): Declare (unless SHORT_DBG_HDRS).
2234 * reclaim.c (GC_add_leaked): Don't add the object to leaked list
2235 if marked as deallocated.
2236
2237 * dbg_mlc.c (GC_has_other_debug_info): Fix punctuation in the
2238 comment.
2239 * dbg_mlc.c (GC_FREED_MEM_MARKER): New macro.
2240 * dbg_mlc.c (GC_debug_free): Use GC_FREED_MEM_MARKER.
2241 * dbg_mlc.c (GC_smashed): Refine documentation.
2242 * mark.c (GC_push_selected): Change dirty_fn return type to
2243 GC_bool.
2244 * os_dep.c (GC_page_was_ever_dirty): Make GC_INNER.
2245 * reclaim.c (GC_reclaim_small_nonempty_block): Remove "kind"
2246 local  variable.
2247 * reclaim.c (GC_reclaim_block): Pass true constant to
2248 GC_reclaim_small_nonempty_block (instead of report_if_found).
2249 * doc/README.autoconf: Update; fix a typo.
2250 * include/private/gcconfig.h (GC_WORD_C): New macro.
2251
2252 * dbg_mlc.c (GC_store_debug_info_inner): Cast "linenum".
2253 * dbg_mlc.c (GC_check_annotated_obj): Fix punctuation in the
2254 comment.
2255 * dbg_mlc.c (GC_print_smashed_obj): Add (and print) "msg"
2256 argument.
2257 * dbg_mlc.c (GC_debug_free, GC_print_all_smashed_proc): Pass
2258 message to GC_print_smashed_obj.
2259 * dbg_mlc.c (GC_debug_free): Call GC_size once.
2260 * dbg_mlc.c (GC_debug_realloc): Calculate old_sz only if
2261 allocation succeeded; remove unnecessary check for object is
2262 smashed (since this is done in GC_debug_free); remove "clobbered"
2263 local variable.
2264
2265 * dbg_mlc.c (GC_store_debug_info_inner, GC_store_debug_info):
2266 Rename "integer" argument to "linenum"; change the type of the
2267 argument to int.
2268 * gcj_mlc.c (GC_store_debug_info): Likewise.
2269 * dbg_mlc.c (GET_OH_LINENUM): New macro.
2270 * dbg_mlc.c (GC_print_obj, GC_print_smashed_obj): Use
2271 GET_OH_LINENUM; adjust print format specifier.
2272 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
2273 GC_debug_malloc_atomic_ignore_off_page,
2274 GC_debug_generic_malloc_inner,
2275 GC_debug_generic_malloc_inner_ignore_off_page,
2276 GC_debug_malloc_stubborn, GC_debug_malloc_atomic,
2277 GC_debug_malloc_uncollectable,
2278 GC_debug_malloc_atomic_uncollectable): Remove unnecessary cast of
2279 "i".
2280 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
2281
2282 * os_dep.c (GC_linux_stack_base): Rename to
2283 GC_linux_main_stack_base.
2284 * os_dep.c (GC_freebsd_stack_base): Rename to
2285 GC_freebsd_main_stack_base; adjust error message.
2286 * pthread_stop_world.c (GC_stop_init): Use GC_SEM_INIT_PSHARED
2287 as an argument for sem_init().
2288 * pthread_support.c (pthread_create): Likewise.
2289 * pthread_support.c (pthread_create): Abort in case sem_init()
2290 fails.
2291 * include/private/gc_priv.h (GC_SEM_INIT_PSHARED): Define.
2292 * tests/initsecondarythread.c: Include gcconfig.h; call GC_INIT
2293 from main() if it should be done from the primordial thread only.
2294
2295 * alloc.c: Don't include sys/types.h for ArmCC.
2296 * dyn_load.c: Likewise.
2297 * os_dep.c: Likewise.
2298 * mach_dep.c (_setjmp, _longjmp): Redirect to setjmp/longjmp for
2299 ArmCC.
2300 * mark.c (GC_noop): Define specially for ArmCC.
2301 * include/private/gc_priv.h (GC_noop): Likewise.
2302 * misc.c (GC_init): Don't test pointers comparison for ArmCC.
2303 * misc.c: Don't include unistd.h for ArmCC.
2304 * os_dep.c (pages_executable): Rename to GC_pages_executable;
2305 make STATIC.
2306 * os_dep.c (GC_unix_mmap_get_mem): Don't define for ArmCC.
2307 * ptr_chck.c (GC_is_visible): Explicitly cast
2308 (GC_DS_PER_OBJECT-GC_INDIR_PER_OBJ_BIAS) to word (to suppress
2309 a compiler warning).
2310 * include/private/gcconfig.h: Recognize __arm.
2311 * include/private/gcconfig.h (HBLKPTR): Define for ArmCC.
2312 * include/private/gcconfig.h (HBLKPTR): Add parentheses for
2313 "bytes" argument.
2314
2315 * pthread_support.c (GC_get_nprocs): Don't define for Android.
2316 * pthread_support.c (GC_dummy_thread_local): Don't test
2317 GC_LINUX_THREADS.
2318 * include/gc_config_macros.h (GC_ADD_CALLER, GC_RETURN_ADDR):
2319 Define for Android.
2320
2321 * mach_dep.c (NO_GETCONTEXT): Move to gcconfig.h.
2322 * os_dep.c (GC_write_fault_handler): Don't include ucontext.h if
2323 NO_GETCONTEXT.
2324 * include/private/gcconfig.h (GETPAGESIZE): Define as a sysconf
2325 call for Android.
2326
2327 * include/private/gc_locks.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2328 Define before including windows.h.
2329 * include/private/gc_priv.h (WIN32_LEAN_AND_MEAN, NOSERVICE):
2330 Likewise.
2331 * include/private/thread_local_alloc.h (WIN32_LEAN_AND_MEAN,
2332 NOSERVICE): Likewise.
2333 * include/private/gc_priv.h (MS_TIME_DIFF): Avoid floating-point
2334 arithmetics; add a comment.
2335
2336 * mark.c (GC_clear_hdr_marks): Don't test USE_MARK_BYTES.
2337 * extra/setjmp_t.c (main): Don't test USE_MARK_BITS.
2338 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Likewise.
2339 * include/private/gc_pmark.h (SET_MARK_BIT_EXIT_IF_SET): Remove
2340 "mark_byte" local variable.
2341 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET): Add a comment
2342 about that AO_or() is not used by GC unless USE_MARK_BITS
2343 explicitly set.
2344 * include/private/gc_priv.h (OR_WORD): Likewise.
2345 * include/private/gc_pmark.h (INCR_MARKS): Remove trailing ';',
2346 add parentheses.
2347 * include/private/gc_priv.h (ONES): Define before use by
2348 MAKE_COOLER.
2349 * include/private/gc_priv.h (MARK_BITS_SZ): Define where used.
2350 * include/private/gc_priv.h (OR_WORD): Don't define if
2351 USE_MARK_BYTES.
2352 * include/private/gcconfig.h (USE_MARK_BYTES); Remove duplicate
2353 definition; simplify expression.
2354
2355 * os_dep.c (GC_get_maps): Always close the file.
2356 * pthread_support.c (GC_get_nprocs): Likewise.
2357 * os_dep.c (READ): Define similarly across the file (without
2358 parameters).
2359 * pthread_support.c (GC_get_nprocs): Use signed int type for "i"
2360 and "len" local variables (since read() may return -1).
2361 * include/private/gc_pmark.h (LONG_MULT): Add prefix/suffix
2362 double underscore; add "volatile" for asm.
2363 * include/private/gc_pmark.h (LONG_MULT): Add missing
2364 parentheses.
2365 * include/private/gc_priv.h (OR_WORD): Likewise.
2366 * include/private/gc_priv.h (OR_WORD): Remove unnecessary brackets
2367 and ';' symbol.
2368
2369 * os_dep.c (GC_get_stack_base): Implement for Android (same as
2370 for Linux).
2371 * pthread_support.c (GC_get_nprocs): Return 1 (instead of -1) if
2372 failed to open "stat" file (not to issue a warning twice); update
2373 the comment.
2374 * pthread_support.c (GC_thr_init): Call sysconf() on Android to
2375 get the number of CPUs.
2376
2377 * include/private/gc_priv.h (_GNU_SOURCE): Revert one of the
2378 recent patches regarding this macro as the macro should be set
2379 (to 1) before including any other system header.
2380
2381 * doc/README.environment (GC_INITIAL_HEAP_SIZE,
2382 GC_MAXIMUM_HEAP_SIZE): Update.
2383
2384 * misc.c (GC_parse_mem_size_arg): Allow 'k', 'M', 'G' suffixes in
2385 heap size specifier; return 0 if not a valid one.
2386 * include/gc_cpp.h: Explicitly define inline one-argument delete
2387 operator for Cygwin (as a workaround).
2388 * tests/test_cpp.cc (main): Suppress compiler warnings about
2389 "assigned value is unused".
2390
2391 * misc.c (GC_parse_mem_size_arg): New function.
2392 * misc.c (GC_init): Use GC_parse_mem_size_arg().
2393 * pthread_stop_world.c (tkill): Declare for Android.
2394
2395 * include/private/gc_priv.h (_GNU_SOURCE): Include features.h
2396 first (except for NaCl) and then define the macro to 1 if not yet.
2397
2398 * tests/tests.am (TESTS, check_PROGRAMS): Add
2399 'initsecondarythread'.
2400 * tests/tests.am (initsecondarythread_SOURCES,
2401 initsecondarythread_LDADD): New variable.
2402
2403 * dbg_mlc.c (GC_store_debug_info_inner): Always define; add
2404 "const" to its string argument.
2405 * dbg_mlc.c (GC_store_debug_info): Call GC_store_debug_info_inner.
2406 * dbg_mlc.c (GC_debug_free): Set GC_have_errors in case of
2407 smashed or previously deallocated found.
2408 * dbg_mlc.c (GC_check_heap_block): Replace while loop with a for
2409 one.
2410 * reclaim.c (GC_reclaim_check): Likewise.
2411 * dbg_mlc.c (GC_check_heap_proc): Remove redundant cast to word.
2412 * os_dep.c (GC_get_stack_base): Don't initialize
2413 stackbase_main_self/ss_sp on Solaris if thr_main() is zero (thus
2414 calling GC_INIT() from a non-primordial thread is possible now).
2415 * reclaim.c (GC_add_leaked): Turn into an inline one.
2416 * reclaim.c (GC_reclaim_small_nonempty_block):
2417 Change report_if_found type from int/word to boolean.
2418 * include/private/gc_priv.h (GC_start_reclaim): Likewise.
2419 * include/private/gc_priv.h (set_mark_bit_from_hdr,
2420 clear_mark_bit_from_hdr): Place closing parenthesis properly.
2421
2422 * os_dep.c (GC_get_main_stack_base): Try to use
2423 pthread_attr_getstack first for Linux if THREADS.
2424 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Adjust text
2425 alignment.
2426
2427 * dbg_mlc.c (GC_generate_random_backtrace_no_gc): Fix a message
2428 typo.
2429 * dbg_mlc.c (GC_debug_malloc): Add a comment (about zero size).
2430 * dbg_mlc.c (GC_strdup): Call GC_err_printf instead of WARN (in
2431 case of NULL argument).
2432 * dbg_mlc.c (GC_free): In case of NULL argument, just return
2433 (without any warning printed); eliminate "uncollectable" local
2434 variable.
2435
2436 * configure.ac (THREADDLLIBS): Use alternate thread library on
2437 Solaris 8.
2438 * configure.ac (need_atomic_ops_asm): Set to true only for SPARC
2439 Solaris.
2440 * configure.ac: Don't use libdl on mips-sgi-irix6.
2441
2442 * mach_dep.c (NO_GETCONTEXT); Define for RTEMS.
2443 * mach_dep.c (GC_with_callee_saves_pushed): Don't call
2444 __builtin_unwind_init() for RTEMS; use setjmp() without the
2445 leading underscore (for RTEMS).
2446 * tests/test.c (BIG): Use smaller value for RTEMS.
2447 * tests/test.c (main): Customize for RTEMS.
2448
2449 * configure.host: Remove doubled words in comments.
2450 * os_dep.c: Likewise.
2451 * doc/README: Likewise.
2452 * extra/setjmp_t.c: Likewise.
2453 * tests/huge_test.c: Likewise.
2454 * extra/setjmp_t.c (getpagesize, nested_sp, main, g): Replace the
2455 K&R-style function definition with the ANSI C one.
2456 * extra/setjmp_t.c (nested_sp): Implement in the same way as
2457 GC_approx_sp.
2458
2459 * dyn_load.c (GC_dyld_sections): Add more sections.
2460 * dyn_load.c (GC_dyld_add_sect_fmts): New static variable.
2461 * dyn_load.c (L2_MAX_OFILE_ALIGNMENT): New macro.
2462 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove): Improve
2463 logging; add support for on-demand sections.
2464
2465 * gcj_mlc.c (GC_gcj_malloc_initialized): Use STATIC unless
2466 GC_ASSERTIONS.
2467 * include/private/gc_priv.h (GC_gcj_malloc_initialized): Don't
2468 declare (as external) unless GC_ASSERTIONS.
2469 * os_dep.c (GC_win32_free_heap): Clear GC_heap_bases[] also for
2470 Cygwin; add FIXME.
2471 * include/private/gcconfig.h: Include <sys/unistd.h> for RTEMS.
2472 * include/private/gcconfig.h: Add "#error" for every "-->" mark.
2473 * include/private/gcconfig.h (CLEAR_DOUBLE): Turn the code into
2474 an expression.
2475 * include/private/pthread_support.h (SUSPENDED_EXT): Add new flag
2476 (which existed previously as SUSPENDED and still exists in GCJ).
2477 * include/private/pthread_support.h (DISABLED_GC): Change the
2478 value (as it is already used by SUSPENDED_EXT).
2479
2480 * tests/test.c (reverse_test):  Modify count (BIG) for
2481 ppc64-darwin.
2482
2483 * reclaim.c (GC_print_all_errors): Recognize new GC_ABORT_ON_LEAK
2484 macro and environment variable; abort if any error has been
2485 printed provided the environment variable (or macro) is set.
2486 * doc/README.environment (GC_ABORT_ON_LEAK): Document.
2487 * doc/README.macros (GC_ABORT_ON_LEAK): Likewise.
2488
2489 * os_dep.c (GC_unix_sbrk_get_mem, GC_unix_get_mem): Don't define
2490 for RTEMS.
2491 * include/private/gcconfig.h (RTEMS): Add support for.
2492 * include/private/gcconfig.h (GET_MEM): Use calloc() for RTEMS.
2493
2494 * mallocx.c (GC_malloc_uncollectable): Move to malloc.c (since
2495 it is used internally in some places).
2496
2497 * dbg_mlc.c (GC_register_finalizer_no_order): Remove redundant
2498 declaration.
2499 * dbg_mlc.c (GC_debug_malloc_replacement,
2500 GC_debug_realloc_replacement): Rename RA to GC_DBG_RA.
2501 * malloc.c (GC_debug_malloc_replacement): Likewise.
2502 * mallocx.c (GC_debug_realloc_replacement): Likewise.
2503 * dbg_mlc.c (GC_store_debug_info): Move proto from dbg_mlc.h.
2504 * malloc.c (GC_strdup, GC_strndup, GC_wcsdup): Move to mallocx.c.
2505 * malloc.c: Include errno.h only REDIRECT_MALLOC; remove redundant
2506 includes of string.h.
2507 * mallocx.c: Include string.h (for GC_strdup).
2508 * include/private/dbg_mlc.h (GC_store_debug_info): Move declaration
2509 to dbg_mlc.c.
2510 * include/private/gc_locks.h (UNCOND_LOCK, UNCOND_UNLOCK): Remove
2511 redundant trailing ';'.
2512 * include/private/gc_priv.h (START_WORLD, COND_DUMP): Likewise.
2513 * include/private/gc_locks.h (LOCK, UNLOCK): Place opening '{'
2514 properly.
2515 * include/private/gc_priv.h (GC_DBG_RA): Move from dbg_mlc.c,
2516 malloc.c, mallocx.c.
2517
2518 * alloc.c (GC_check_heap, GC_print_all_smashed): Move the
2519 definition from misc.c.
2520 * dbg_mlc.c (GC_debug_malloc_atomic_uncollectable): Define as
2521 public.
2522 * include/gc.h (GC_debug_malloc_atomic_uncollectable): Declare.
2523 * include/gc.h (GC_MALLOC_ATOMIC_UNCOLLECTABLE): Define new public
2524 macro.
2525 * dbg_mlc.c (MAX_SMASHED): Don't define if already set.
2526 * reclaim.c (MAX_LEAKED): Likewise.
2527 * dbg_mlc.c (GC_add_smashed): Add FIXME about the concurrent
2528 access to the global array.
2529 * reclaim.c (GC_add_leaked): Likewise.
2530 * misc.c (GC_print_back_height): Set on if GC_PRINT_BACK_HEIGHT
2531 (new macro) is defined.
2532 * doc/README.macros (GC_PRINT_BACK_HEIGHT): Document.
2533 * misc.c (GC_dump_regularly, GC_init): Replace 0/1 for
2534 GC_dump_regularly and GC_print_back_height variables with
2535 FALSE/TRUE.
2536 * reclaim.c (GC_print_all_errors): Refine the comment.
2537
2538 * tests/test.c (reverse_test_inner): Undo one of the previous
2539 patches which shifts "c" and "d" pointers only if
2540 ALL_INTERIOR_POINTERS (since interior pointers are always
2541 recognized in stacks).
2542
2543 * misc.c (GC_stdout, GC_stderr): Move the definition to the place
2544 where GC_log is defined (Unix only).
2545 * misc.c (GC_init): Recognize "GC_ONLY_LOG_TO_FILE" environment
2546 variable and the similar macro; redirect GC_stdout and GC_stderr
2547 to GC_log if "GC_LOG_FILE" environment variable is set unless
2548 prohibited by GC_ONLY_LOG_TO_FILE (Unix only).
2549 * doc/README.environment (GC_ONLY_LOG_TO_FILE): Document.
2550 * doc/README.macros (GC_ONLY_LOG_TO_FILE): Likewise.
2551
2552 * misc.c (GC_stdout, GC_write): Rename GC_stdout to GC_log (Win32
2553 only).
2554 * misc.c (GC_write): Add for MacOS (and OS/2); change WRITE()
2555 accordingly.
2556 * misc.c (GC_printf): Check GC_quiet before va_start().
2557
2558 * allchblk.c (GC_freehblk): Use GC_log_printf instead of GC_printf
2559 inside "if (GC_print_stats)" branch.
2560 * alloc.c (GC_collect_or_expand): Likewise.
2561 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2562 * headers.c (GC_scratch_alloc): Likewise.
2563 * os_dep.c (GC_get_maps, GC_remap, PROTECT,
2564 GC_write_fault_handler, GC_dirty_init, GC_mprotect_thread): Likewise.
2565 * alloc.c (min_bytes_allocd): Use GC_log_printf instead of
2566 GC_printf for DEBUG_THREADS output.
2567 * darwin_stop_world.c (GC_stack_range_for, GC_suspend_thread_list,
2568 GC_stop_world, GC_thread_resume, GC_start_world): Likewise.
2569 * pthread_start.c (GC_inner_start_routine): Likewise.
2570 * pthread_stop_world.c (GC_suspend_handler, GC_restart_handler,
2571 GC_push_all_stacks, GC_suspend_all, GC_stop_world,
2572 GC_start_world): Likewise.
2573 * pthread_support.c (GC_mark_thread, GC_get_nprocs,
2574 GC_start_rtn_prepare_thread, pthread_create): Likewise.
2575 * checksums.c (GC_update_check_page): Use GC_printf() instead of
2576 GC_err_printf() for error printing.
2577 * checksums.c (GC_check_blocks, GC_check_dirty): Use GC_log_printf
2578 instead of GC_printf for logging purposes.
2579 * dyn_load.c (sys_errlist, sys_nerr, errno): Move declaration of
2580 external variable outside from GC_register_dynamic_libraries.
2581 * dyn_load.c (GC_register_dynamic_libraries): Don't use
2582 sys_errlist value if errno equals to sys_nerr.
2583 * dyn_load.c (GC_register_dynamic_libraries): Use GC_log_printf
2584 instead of GC_printf for DL_VERBOSE output.
2585 * dyn_load.c (GC_dyld_image_add, GC_dyld_image_remove,
2586 GC_init_dyld): Use GC_log_printf instead of GC_printf for
2587 DARWIN_DEBUG output.
2588 * os_dep.c (catch_exception_raise): Use GC_log_printf
2589 instead of GC_printf for DEBUG_EXCEPTION_HANDLING output.
2590 * reclaim.c (GC_print_free_list): Move "n" increment out of
2591 GC_printf() call.
2592
2593 * win32_threads.c (DEBUG_CYGWIN_THREADS, DEBUG_WIN32_PTHREADS,
2594 DEBUG_WIN32_THREADS): Remove.
2595 * win32_threads.c (GC_register_my_thread_inner,
2596 GC_win32_start_inner): Use GC_log_printf instead of GC_printf
2597 inside "if (GC_print_stats)" branch.
2598 * win32_threads.c (GC_PTHREAD_PTRVAL): New macro (defined only if
2599 GC_PTHREADS).
2600 * win32_threads.c (GC_delete_gc_thread, NUMERIC_THREAD_ID,
2601 GC_pthread_join, GC_pthread_create): Use GC_PTHREAD_PTRVAL
2602 macro.
2603 * win32_threads.c (GC_push_stack_for, GC_mark_thread,
2604 GC_CreateThread, GC_beginthreadex, GC_pthread_join,
2605 GC_pthread_create, GC_pthread_start_inner, GC_thread_exit_proc,
2606 GC_mark_thread_local_free_lists): Use GC_log_printf instead of
2607 GC_printf for DEBUG_THREADS output.
2608 * win32_threads.c (GC_win32_start_inner, GC_CreateThread,
2609 GC_beginthreadex, GC_pthread_join, GC_pthread_create,
2610 GC_pthread_start_inner, GC_thread_exit_proc): Cast
2611 GetCurrentThreadId result to long; don't cast value of pthread_t
2612 type to int; adjust printf format specifiers.
2613 * doc/README.win32 (DEBUG_WIN32_PTHREADS): Remove obsolete
2614 information.
2615
2616 * tests/test.c (cons, small_cons, gcj_cons, check_ints,
2617 check_uncollectable_ints, print_int_list, check_marks_int_list,
2618 fork_a_thread, finalizer, mktree, chktree, alloc8bytes,
2619 alloc_small, tree_test, typed_test, check_heap_stats, WinMain,
2620 test, main): Remove unnecessary casts of GC_printf calls to void.
2621
2622 * allchblk.c (GC_print_hblkfreelist): Adjust (make uniform across
2623 BDWGC) printed message (adjust letters case, terminating dot and
2624 new line symbols).
2625 * alloc.c (GC_check_fl_marks): Likewise.
2626 * backgraph.c (new_back_edges): Likewise.
2627 * checksums.c (GC_check_dirty): Likewise.
2628 * darwin_stop_world.c (GC_push_all_stacks,
2629 GC_suspend_thread_list): Likewise.
2630 * dbg_mlc.c (GC_print_type, GC_debug_free, GC_debug_realloc,
2631 store_old): Likewise.
2632 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
2633 * mark.c (GC_initiate_gc, GC_mark_some, GC_mark_from, GC_push_all,
2634 GC_push_selected, GC_push_next_marked_dirty): Likewise.
2635 * mark_rts.c (GC_exclude_static_roots_inner): Likewise.
2636 * os_dep.c (GC_remap, GC_default_push_other_roots,
2637 GC_push_thread_structures, GC_dirty_init, GC_read_dirty,
2638 catch_exception_raise_state, catch_exception_raise_state_identity,
2639 GC_mprotect_thread_notify, GC_mprotect_thread,
2640 catch_exception_raise): Likewise.
2641 * pthread_stop_world.c (GC_print_sig_mask, GC_push_all_stacks,
2642 GC_stop_world, GC_stop_init): Likewise.
2643 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner,
2644 GC_start_routine): Likewise.
2645 * win32_threads.c (GC_register_my_thread_inner,
2646 GC_push_all_stacks, GC_win32_start_inner, GC_pthread_join,
2647 GC_pthread_start_inner): Likewise.
2648 * alloc.c (GC_expand_hp_inner): Realign the code.
2649 * mark.c (GC_mark_from, GC_mark_local, GC_do_parallel_mark):
2650 Likewise.
2651 * misc.c (GC_init): Likewise.
2652 * os_dep.c (GC_dirty_init, GC_read_dirty): Likewise.
2653 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
2654 * tests/test.c (run_one_test): Likewise.
2655 * misc.c (GC_err_puts): Document.
2656 * misc.c (GC_err_write): Remove.
2657 * os_dep.c (dump_maps): Likewise.
2658 * include/private/gc_priv.h (GC_err_write): Likewise.
2659 * os_dep.c (GC_print_address_map): Call GC_err_puts() instead of
2660 dump_maps() and GC_err_write().
2661 * os_dep.c (GC_read_dirty): Remove redundant brackets.
2662
2663 * tests/test.c (reverse_test_inner): Test interior pointer
2664 recognition only if ALL_INTERIOR_POINTERS.
2665 * tests/test.c (run_one_test): Replace GC_all_interior_pointers
2666 with GC_get_all_interior_pointers(); simplify the expression.
2667 * tests/test.c (check_heap_stats): Replace GC_bytes_allocd and
2668 GC_bytes_allocd_before_gc with GC_get_total_bytes().
2669 * tests/test.c (main): Replace GC_gc_no with GC_get_gc_no().
2670
2671 * dbg_mlc.c (GC_debug_strdup, GC_debug_free): Output a portability
2672 warning if the argument is NULL and GC is in leaks detection mode.
2673 * dbg_mlc.c (GC_debug_strndup, GC_debug_wcsdup): New public
2674 function definition.
2675 * malloc.c (GC_strndup, GC_wcsdup, strndup): Likewise.
2676 * mallocx.c (GC_posix_memalign): Likewise.
2677 * malloc.c (strdup): Fix string size value; rename "len" to "lb".
2678 * mallocx.c: Include errno.h unless WinCE (otherwise include
2679 windows.h for Win32 error constants).
2680 * win32_threads.c: Define WIN32_LEAN_AND_MEAN and NOSERVICE before
2681 windows.h inclusion.
2682 * misc.c (GC_init): Register at-exit callback if GC_find_leak
2683 (even if GC_FIND_LEAK macro is unset).
2684 * pthread_stop_world.c (NACL_STORE_REGS,
2685 __nacl_suspend_thread_if_needed, GC_nacl_initialize_gc_thread):
2686 Use BCOPY() instead of memcpy().
2687 * pthread_support.c (GC_init_real_syms): Likewise.
2688 * doc/README.macros (GC_DEBUG_REPLACEMENT, GC_REQUIRE_WCSDUP):
2689 Document new macro.
2690 * doc/README.macros (REDIRECT_MALLOC): Update documentation.
2691 * include/gc.h (GC_strndup, GC_posix_memalign, GC_debug_strndup):
2692 New API function prototype.
2693 * include/gc.h (GC_MALLOC, GC_REALLOC): Redirect to
2694 GC_debug_malloc/realloc_replacement() if GC_DEBUG_REPLACEMENT.
2695 * include/gc.h (GC_STRDUP): Remove redundant parentheses.
2696 * include/leak_detector.h (realloc, strdup): Likewise.
2697 * include/gc.h (GC_STRNDUP): New API macro.
2698 * include/gc.h (GC_NEW, GC_NEW_ATOMIC, GC_NEW_STUBBORN,
2699 GC_NEW_UNCOLLECTABLE): Add missing parentheses.
2700 * include/gc.h (GC_wcsdup, GC_debug_wcsdup): New API function
2701 prototype (only if GC_REQUIRE_WCSDUP).
2702 * include/gc.h (GC_WCSDUP): New API macro (only if
2703 GC_REQUIRE_WCSDUP).
2704 * include/leak_detector.h: Include stdlib.h and string.h after gc.h (unless
2705 GC_DONT_INCLUDE_STDLIB).
2706 * include/leak_detector.h (malloc, calloc, free, realloc):
2707 Undefine symbol before its redefinition.
2708 * include/leak_detector.h (strndup, memalign, posix_memalign):
2709 Redefine to the corresponding GC function.
2710 * include/leak_detector.h (wcsdup): Redefine to GC_WCSDUP (only
2711 if GC_REQUIRE_WCSDUP).
2712 * include/leak_detector.h (CHECK_LEAKS): Add comment; don't define
2713 the macro if already defined.
2714
2715 * misc.c (GC_abort): Use _exit() (instead of DebugBreak) on Win32
2716 when doing code static analysis (to inform the tool that the
2717 function is a no-return one).
2718 * os_dep.c (GC_linux_stack_base): Remove a duplicate validation
2719 of the length of "stat" file; use signed int type for "i",
2720 "buf_offset" and "len" local variables (since read() may
2721 return -1).
2722
2723 * blacklst.c (GC_bl_init_no_interiors): New function (the code
2724 moved from GC_bl_init).
2725 * blacklst.c (GC_bl_init): Invoke GC_bl_init_no_interiors unless
2726 GC_all_interior_pointers mode; remove unnecessarily parameter cast
2727 for GC_scratch_alloc call.
2728 * include/private/gc_priv.h (GC_bl_init): Move the function
2729 declaration to misc.c file.
2730 * misc.c (GC_bl_init_no_interiors): Add a prototype.
2731 * misc.c (GC_set_all_interior_pointers): Allow values other than 0
2732 and 1; allow altering GC_set_all_interior_pointers value even
2733 after GC initialization.
2734 * obj_map.c (GC_initialize_offsets): Clear GC_valid_offsets and
2735 GC_modws_valid_offsets if GC_all_interior_pointers is off.
2736 * misc.c (GC_init): Don't call GC_initialize_offsets() unless
2737 GC_all_interior_pointers mode.
2738
2739 * alloc.c (GC_finish_collection): Remove redundant brackets;
2740 adjust code indentation.
2741 * blacklst.c (GC_add_to_black_list_normal): Simplify expression
2742 (to improve code readability).
2743 * blacklst.c (GC_is_black_listed): Join nested "if" (into a single
2744 conditional expression); initialize "nblocks" just before the loop
2745 beginning.
2746 * misc.c (GC_init): Don't compute initial_heap_sz if GC is already
2747 initialized.
2748 * include/private/gc_priv.h (GC_initialize_offsets): Move the
2749 function declaration to misc.c file.
2750 * obj_map.c (GC_initialize_offsets): Remove offsets_initialized
2751 static variable since the function is called only once.
2752 * tests/middle.c (main): Use setter for GC_all_interior_pointers;
2753 adjust printf format specifier (and cast the value passed to).
2754
2755 * doc/README.macros (SMALL_CONFIG, LARGE_CONFIG): Refine the
2756 documentation.
2757 * include/private/gc_hdrs.h (LOG_BOTTOM_SZ): Ignore SMALL_CONFIG
2758 if LARGE_CONFIG is defined.
2759 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE): Likewise.
2760
2761 * alloc.c (GC_finish_collection): Replace "#else #ifdef" with
2762 "#elif".
2763 * include/private/gc_priv.h (CPP_LOG_HBLKSIZE, LOG_PHT_ENTRIES,
2764 MAX_ROOT_SETS, MAX_HEAP_SECTS): Likewise.
2765 * alloc.c (GC_expand_hp_inner): Check for GC_collect_at_heapsize
2766 overflow even if not LARGE_CONFIG.
2767 * dbg_mlc.c (GC_check_heap_proc): Check "oh" size even if
2768 SMALL_CONFIG.
2769 * finalize.c (GC_print_finalization_stats): Fix "#endif" comment.
2770 * doc/README.environment (GC_LOG_FILE, GC_PRINT_VERBOSE_STATS,
2771 GC_FULL_FREQUENCY): Refine the documentation.
2772
2773 * extra/msvc_dbg.c: Test _MSC_VER macro; include "gc.h" (for
2774 GC_word).
2775 * extra/msvc_dbg.c (ULONG_PTR): Replace with GC_ULONG_PTR; define
2776 as word.
2777
2778 * dbg_mlc.c (GC_get_back_ptr_info, GC_print_obj,
2779 GC_print_smashed_obj, GC_debug_free_inner): Add a code for a
2780 LINT-like tool to instruct it that the function is invoked only
2781 with valid parameters (otherwise a SEGV is ok); recognize LINT2
2782 new macro.
2783 * misc.c (GC_abort): Instruct a LINT-like tool that the function
2784 never returns in fact.
2785 * os_dep.c (GC_linux_stack_base): Check for read buffer overflow;
2786 close the file immediately after read; use STRTOULL() instead of
2787 decoding the address number manually.
2788 * include/private/gc_priv.h (EXPECT): Don't specify outcome for a
2789 LINT-like tool.
2790 * include/private/gc_priv.h (GC_all_interior_pointers): Instruct a
2791 LINT-like tool that the value is restricted to zero and one only
2792 (required since the variable is global and its value is used as a
2793 part of array index expression is some places).
2794
2795 * dbg_mlc.c (GC_make_closure): Fix SEGV in case GC_malloc returns
2796 NULL.
2797 * dbg_mlc.c (GC_debug_register_finalizer,
2798 GC_debug_register_finalizer_no_order,
2799 GC_debug_register_finalizer_unreachable,
2800 GC_debug_register_finalizer_ignore_self): Handle out of memory
2801 case properly (similar to GC_register_finalizer_inner).
2802 * headers.c (GC_install_header): Handle the case when alloc_hdr()
2803 returns NULL.
2804 * os_dep.c (GC_get_maps_len): Defend against missing "maps" file.
2805 * pthread_support.c (GC_mark_thread): Place a dummy return
2806 statement (which uses "id" argument) before the actual use of "id"
2807 as an array index (to suppress a warning produced by some static
2808 code analysis tools).
2809 * win32_threads.c (GC_mark_thread): Likewise.
2810 * pthread_support.c (GC_thr_init): Abort (with the appropriate
2811 message) if out of memory.
2812
2813 * finalize.c (GC_register_finalizer_inner): Fix a typo in a
2814 comment.
2815 *include/private/gcconfig.h (STACKBOTTOM): Likewise.
2816 * gcj_mlc.c (GC_core_gcj_malloc): Replace 0/1 with TRUE/FALSE in
2817 EXPECT (the 2nd argument).
2818 * malloc.c (GC_core_malloc_atomic, GC_core_malloc, GC_free):
2819 Likewise.
2820 * mark.c (GC_mark_and_push, GC_mark_and_push_stack): Likewise.
2821 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Likewise.
2822 * include/private/gc_hdrs.h (HC_GET_HDR): Likewise.
2823 * include/private/gc_priv.h (SMALL_OBJ): Likewise.
2824 * include/private/specific.h (getspecific): Likewise.
2825 * pthread_support.c (LOCK_STATS): Add a comment.
2826
2827 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2828 GC_NO_PTHREAD_SIGMASK, GC_PTHREAD_CREATE_CONST,
2829 GC_PTHREAD_EXIT_ATTRIBUTE, GC_NO_PTHREAD_CANCEL): Move the
2830 definition to gc_config_macros.
2831
2832 * pthread_support.c (pthread_cancel, GC_pthread_cancel_t,
2833 GC_pthread_cancel): Test GC_NO_PTHREAD_CANCEL (instead of NACL and
2834 GC_PTHREAD_EXIT_ATTRIBUTE).
2835 * include/gc_pthread_redirects.h (GC_pthread_cancel,
2836 pthread_cancel): Likewise.
2837 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
2838 GC_pthread_join, GC_pthread_detach, GC_pthread_cancel): Realign
2839 code.
2840 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE):
2841 Define as empty for NaCl.
2842 * include/gc_pthread_redirects.h (GC_NO_PTHREAD_CANCEL): New macro
2843 defined.
2844
2845 * dyn_load.c (GC_init_dyld): Do not invoke
2846 _dyld_bind_fully_image_containing_address() if GC_no_dls (as it is
2847 not required to register the main data segment in that case).
2848 * include/gc.h (GC_no_dls): Adjust the comment.
2849
2850 * dyn_load.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Test
2851 GC_NO_DLOPEN.
2852 * gc_dlopen.c: Likewise.
2853 * include/gc_pthread_redirects.h (GC_dlopen, dlopen): Likewise.
2854 * gc_dlopen.c: Don't include dlfcn.h (as it is included in
2855 gc_pthread_redirects.h).
2856 * pthread_support.c (pthread_sigmask, GC_pthread_sigmask_t,
2857 GC_pthread_sigmask): Test GC_NO_PTHREAD_SIGMASK (instead of
2858 GC_DARWIN_THREADS, GC_OPENBSD_THREADS and NACL).
2859 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
2860 pthread_sigmask): Likewise.
2861 * win32_threads.c (pthread_sigmask, GC_pthread_sigmask): Test
2862 GC_NO_PTHREAD_SIGMASK (instead of GC_WIN32_PTHREADS).
2863 * pthread_support.c (pthread_create, GC_pthread_create_t,
2864 GC_pthread_create): Rename GC_PTHREAD_CONST to
2865 GC_PTHREAD_CREATE_CONST.
2866 * win32_threads.c (GC_pthread_create): Likewise.
2867 * include/gc_pthread_redirects.h: Likewise.
2868 * include/gc_pthread_redirects.h (GC_NO_DLOPEN,
2869 GC_NO_PTHREAD_SIGMASK): New macro defined.
2870 * include/gc_pthread_redirects.h (GC_PTHREAD_CREATE_CONST): Set to
2871 empty for NaCl.
2872 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): Do
2873 not define for Android (as CANCEL_SAFE is not defined).
2874
2875 * include/gc.h (GC_ADD_CALLER, GC_RETURN_ADDR,
2876 GC_HAVE_BUILTIN_BACKTRACE, GC_CAN_SAVE_CALL_STACKS): Move
2877 definition to gc_config_macros.h file.
2878 * include/gc_config_macros.h: Check the file is included from gc.h
2879 file.
2880 * include/gc_version.h: Likewise.
2881
2882 * gc_dlopen.c: Empty unit for NaCl.
2883 * os_dep.c: Include fcntl.h for NaCl.
2884 * os_dep.c (GC_get_main_stack_base): Ignore
2885 USE_GET_STACKBASE_FOR_MAIN macro for NaCl.
2886 * os_dep.c (GC_get_stack_base): Return GC_UNIMPLEMENTED for NaCl.
2887 * os_dep.c (GC_remap): Use mmap (instead of mprotect) for NaCl.
2888 * pthread_start.c (GC_inner_start_routine): Don't invoke
2889 pthread_cleanup_push/pop for NaCl.
2890 * pthread_stop_world.c (GC_nacl_num_gc_threads,
2891 GC_nacl_thread_idx, GC_nacl_park_threads_now,
2892 GC_nacl_thread_parker, GC_nacl_gc_thread_self,
2893 GC_nacl_thread_parked, GC_nacl_thread_used,
2894 GC_nacl_thread_parking_inited, GC_nacl_thread_alloc_lock): New
2895 variable (fo NaCl only).
2896 * pthread_stop_world.c (GC_remove_allowed_signals,
2897 suspend_handler_mask, GC_stop_count, GC_world_is_stopped,
2898 GC_retry_signals, SIG_THR_RESTART, GC_suspend_ack_sem,
2899 GC_restart_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
2900 GC_restart_handler): Don't define for NaCl.
2901 * pthread_support.c (GC_get_nprocs): Likewise.
2902 * include/private/gc_priv.h (SIG_SUSPEND): Likewise.
2903 * include/private/gcconfig.h (LINUX): Likewise.
2904 * pthread_stop_world.c (GC_push_all_stacks): Push register storage
2905 for NaCl.
2906 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
2907 GC_start_world): Implement for NaCl.
2908 * pthread_stop_world.c (GC_stop_world): Don't define unused "i"
2909 local variable for OpenBSD (and NaCl).
2910 * pthread_stop_world.c (NACL_STORE_REGS): New macro definition for
2911 NaCl.
2912 * pthread_stop_world.c (nacl_pre_syscall_hook,
2913 __nacl_suspend_thread_if_needed, nacl_post_syscall_hook,
2914 GC_nacl_initialize_gc_thread, GC_nacl_shutdown_gc_thread): New
2915 function (for NaCl only).
2916 * pthread_stop_world.c (GC_stop_init): Empty for NaCl.
2917 * pthread_support.c (pthread_cancel, pthread_sigmask): Don't
2918 redirect for NaCl.
2919 * include/gc_pthread_redirects.h (pthread_cancel,
2920 pthread_sigmask): Likewise.
2921 * pthread_support.c (GC_nacl_initialize_gc_thread,
2922 GC_nacl_shutdown_gc_thread): New internal prototype (NaCl only).
2923 * pthread_support.c (GC_new_thread, GC_delete_thread): Initialize
2924 and shutdown thread for NaCl.
2925 * pthread_support.c (GC_thr_init): Call sysconf for NaCl.
2926 * pthread_support.c (GC_pthread_exit): Call GC_thread_exit_proc
2927 for NaCl.
2928 * include/gc.h: Don't include features.h for NaCl.
2929 * include/gc_pthread_redirects.h (GC_PTHREAD_CONST): New macro.
2930 * include/gc_pthread_redirects.h (GC_pthread_create): Use
2931 GC_PTHREAD_CONST instead of const.
2932 * win32_threads.c (GC_pthread_create): Likewise.
2933 * pthread_support.c (GC_pthread_create_t, GC_pthread_create,
2934 pthread_create): Likewise.
2935 * include/private/gcconfig.h (NACL): Recognize NaCl.
2936 * include/private/gcconfig.h (GC_LINUX_THREADS): Valid for NaCl.
2937 * include/private/pthread_stop_world.h (thread_stop_info): Add
2938 reg_storage member; define NACL_GC_REG_STORAGE_SIZE macro (for
2939 NaCl only).
2940 * include/private/pthread_support.h (GC_nacl_gc_thread_self):
2941 Declare internal variable (for NaCl only).
2942
2943 * mach_dep.c (GC_with_callee_saves_pushed): Fix FE_ALL_EXCEPT
2944 macro.
2945
2946 * mark.c (GC_mark_some): Prefix and suffix "asm" and "volatile"
2947 keywords with double underscore.
2948 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2949 catch_exception_raise_state_identity): Add GC_API_OSCALL to
2950 function definition.
2951 * os_dep.c (catch_exception_raise_state,
2952 catch_exception_raise_state_identity): Move definition to be
2953 before GC_ports.
2954 * os_dep.c (catch_exception_raise): Declare to have the symbol
2955 defined before GC_ports.
2956 * os_dep.c (GC_ports): Store references to catch_exception_raise,
2957 catch_exception_raise_state, catch_exception_raise_state_identity
2958 (to prevent stripping these symbols as dead).
2959 * os_dep.c (catch_exception_raise, catch_exception_raise_state,
2960 catch_exception_raise_state_identity): Mark these symbols as
2961 "referenced dynamically" via an assembler directive (unless
2962 NO_DESC_CATCH_EXCEPTION_RAISE).
2963 * include/private/gc_priv.h (GC_API_OSCALL): New macro (defined
2964 similar to GC_API but as if GC_DLL is always defined).
2965
2966 * os_dep.c: Don't include signal.h for GC_write_fault_handler on
2967 Win32.
2968 * os_dep.c (SIG_OK): Don't return true unless SIGSEGV or SIGBUS on
2969 FreeBSD.
2970 * os_dep.c (CODE_OK): Use SEGV_ACCERR on FreeBSD (define
2971 SEGV_ACCERR for older FreeBSD releases).
2972
2973 * dyn_load.c (GC_register_map_entries,
2974 GC_register_dynamic_libraries_dl_iterate_phdr): Calculate
2975 DATASTART only once if DATASTART_IS_FUNC.
2976 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr):
2977 Calculate DATAEND only once if DATAEND_IS_FUNC.
2978 * dyn_load.c: Add comment to some endif; realign some code.
2979 * dyn_load.c (GC_init_dyld): Don't use
2980 _dyld_bind_fully_image_containing_address if
2981 NO_DYLD_BIND_FULLY_IMAGE defined; add FIXME.
2982 * include/private/gcconfig.h (GC_data_start, GC_find_limit):
2983 Declare if used by DATASTART/DATAEND, respectively.
2984 * include/private/gcconfig.h (DATASTART_IS_FUNC, DATAEND_IS_FUNC):
2985 Define if DATASTART/DATAEND is a function, respectively.
2986 * include/private/gcconfig.h (GETPAGESIZE, NO_PTHREAD_TRYLOCK,
2987 NO_DYLD_BIND_FULLY_IMAGE): Define for Darwin/arm as well; include
2988 unistd.h.
2989
2990 * os_dep.c (GC_setpagesize, GC_task_self, PROTECT, UNPROTECT):
2991 Reorder to remove redundant ifdef for Win32.
2992 * os_dep.c: Add comment to some endif.
2993 * os_dep.c: Include pthread.h (for Linux even if single-threaded)
2994 if USE_GET_STACKBASE_FOR_MAIN; also include it for Darwin.
2995 * os_dep.c (STACKBOTTOM): Redefine for Darwin (unless prohibited
2996 for some reason).
2997 * os_dep.c (GC_get_main_stack_base): Allow
2998 USE_GET_STACKBASE_FOR_MAIN for Linux even if single-threaded; add
2999 assertion for the returned result.
3000 * os_dep.c (GC_get_stack_base): Define for Darwin if
3001 multi-threaded.
3002 * os_dep.c (SIG_OK, CODE_OK): Add comment (for FreeBSD).
3003 * os_dep.c (ID_STOP, ID_RESUME): Define only if threads.
3004 * os_dep.c (catch_exception_raise): Remove redundant parentheses;
3005 refine the documentation.
3006
3007 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE for C++ files as
3008 well.
3009 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3010 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Refine.
3011 * include/gc.h (GC_INIT): Document.
3012 * include/private/gc_priv.h (GC_MACH_HEADER, GC_MACH_SECTION,
3013 GC_GETSECTBYNAME): Define depending only on the word size (i.e.,
3014 define these macros also for ARM).
3015 * tests/test.c (check_heap_stats): Print main thread stack bottom
3016 as well (only if verbose mode is on).
3017
3018 * mach_dep.c (GC_with_callee_saves_pushed): Fix and improve code
3019 introduced by the previous patch (if GETCONTEXT_FPU_EXCMASK_BUG
3020 and X86_64).
3021
3022 * darwin_stop_world.c (GC_FindTopOfStack): Prefix and suffix
3023 "volatile" keyword with double underscore.
3024 * mach_dep.c (GETCONTEXT_FPU_EXCMASK_BUG): Recognize new macro and
3025 include fenv.h if defined (unless NO_GETCONTEXT or HAVE_PUSH_REGS).
3026 * mach_dep.c (GC_with_callee_saves_pushed): Restore FPU exception
3027 mask corrupted by getcontext if GETCONTEXT_FPU_EXCMASK_BUG.
3028 * include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Define
3029 for Linux/amd64 (since its GLibc getcontext currently has the bug).
3030
3031 * allchblk.c (GC_use_entire_heap): Change type to int (as declared
3032 in gc.h); set the default value depending on new GC_USE_ENTIRE_HEAP
3033 macro.
3034 * misc.c (GC_init): Test GC_USE_ENTIRE_HEAP environment variable to
3035 alter the default value of GC_use_entire_heap.
3036 * doc/README.environment (GC_USE_ENTIRE_HEAP): Document.
3037 * doc/README.macros (GC_USE_ENTIRE_HEAP): Likewise.
3038
3039 * include/private/gcconfig.h (PARALLEL_MARK): Do not make it cause
3040 MPROTECT_VDB undefining.
3041
3042 * include/private/gcconfig.h (DYNAMIC_LOADING): Fix filename in
3043 the comment.
3044
3045 * include/private/gc_priv.h (_GC_arrays): Move the conditional
3046 macro definitions (shortcuts for GC_arrays members) into the
3047 structure body.
3048
3049 * darwin_stop_world.c (GC_mach_handler_thread,
3050 GC_use_mach_handler_thread,
3051 GC_darwin_register_mach_handler_thread): Define only if
3052 MPROTECT_VDB.
3053 * darwin_stop_world.c (GC_suspend_thread_list): Use
3054 GC_mach_handler_thread and GC_use_mach_handler_thread only if
3055 MPROTECT_VDB.
3056 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3057 only if defined (i.e. unless GC_NO_THREADS_DISCOVERY).
3058 * misc.c (GC_init): Fix comment for GWW_VDB.
3059 * os_dep.c (DARWIN_EXC_STATE, DARWIN_EXC_STATE_COUNT,
3060 DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR): New macros.
3061 * os_dep.c (catch_exception_raise): Use DARWIN_EXC_STATE,
3062 DARWIN_EXC_STATE_COUNT, DARWIN_EXC_STATE_T, DARWIN_EXC_STATE_DAR.
3063 * pthread_support.c (GC_thr_init): Define "dummy" local variable
3064 only unless GC_DARWIN_THREADS.
3065 * include/private/gcconfig.h (MPROTECT_VDB): Define for Darwin
3066 even in the single-threaded mode; define for iPhone/iPad.
3067 * include/private/gcconfig.h (IA64): Remove unnecessary "ifdef"
3068 around "undef".
3069 * include/private/gcconfig.h (HEURISTIC1): Remove unused for
3070 Cygwin.
3071 * include/private/gcconfig.h (STACKBOTTOM): Use fixed address for
3072 Darwin/arm (instead of HEURISTIC1).
3073
3074 * misc.c (GC_write): Replace multiple "ifdef/endif" with "elif"
3075 (for ECOS and NOSYS).
3076 * os_dep.c (GC_get_main_stack_base): Likewise.
3077 * os_dep.c (GC_get_main_stack_base): Check
3078 USE_GET_STACKBASE_FOR_MAIN macro before checking STACKBOTTOM one;
3079 remove "dummy" variable (use result one instead).
3080 * doc/README.macros (SN_TARGET_PS3): Document.
3081 * extra/threadlibs.c (main): Don't output "-lpthread" (and "-ldl")
3082 for Android.
3083 * include/private/pthread_support.h: Fix comment for "endif".
3084
3085 * misc.c (GC_allocate_ml): Define global variable if SN_TARGET_PS3.
3086 * misc.c (GC_init): Initialize GC_allocate_ml if SN_TARGET_PS3.
3087 * os_dep.c (SIGSEGV): Define to dummy zero if SN_TARGET_PS3.
3088 * os_dep.c (GC_unix_mmap_get_mem): Don't define if SN_TARGET_PS3.
3089 * os_dep.c (GC_default_push_other_roots,
3090 GC_push_thread_structures): Define for SN_TARGET_PS3.
3091 * include/private/gc_locks.h (GC_allocate_ml, LOCK, UNLOCK): Define
3092 for SN_TARGET_PS3.
3093 * include/private/gcconfig.h (SN_TARGET_PS3): Recognize new macro
3094 (Sony PS/3 target).
3095 * include/private/gcconfig.h (THREADS): Define unconditionally if
3096 SN_TARGET_PS3.
3097 * include/private/gcconfig.h (GET_MEM): Define for SN_TARGET_PS3.
3098
3099 * alloc.c (GC_collect_or_expand): Replace NIL with NULL in message.
3100 * dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
3101 GC_debug_malloc_atomic_ignore_off_page,
3102 GC_debug_generic_malloc_inner,
3103 GC_generic_malloc_inner_ignore_off_page, GC_debug_malloc_stubborn,
3104 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
3105 GC_debug_malloc_atomic_uncollectable): Likewise.
3106 * gcj_mlc.c (GC_debug_gcj_malloc): Likewise.
3107 * dbg_mlc.c (GC_check_annotated_obj): Replace NIL with NULL in a
3108 comment.
3109 * dyn_load.c (GC_FirstDLOpenedLinkMap): Likewise.
3110 * mark_rts.c (GC_roots_present): Likewise.
3111 * doc/README: Likewise.
3112 * include/private/gc_hdrs.h (IS_FORWARDING_ADDR_OR_NIL): Likewise.
3113 * include/private/gc_priv.h (_GC_arrays): Likewise.
3114
3115 * configure.ac: Use AC_CHECK_LIB() to check for pthread instead of
3116 just blindly linking to -lpthread, as Android includes pthread
3117 support within libc and does not provide a separate libpthread.
3118 * dyn_load.c (GC_register_dynamic_libraries): Skip current link map
3119 entry if l_addr is NULL (Android/bionic only).
3120 * pthread_stop_world.c (android_thread_kill): New internal function
3121 (Android only).
3122 * pthread_stop_world.c (GC_suspend_all, GC_start_world): Call
3123 android_thread_kill (based on tkill) instead of pthread_kill on
3124 Android (since pthread_kill cannot be used safely on the platform).
3125 * pthread_support.c (GC_new_thread): Store thread Id (obtained from
3126 gettid) for use by android_thread_kill (Android only).
3127 * include/private/pthread_support.h (GC_Thread_Rep): Add kernel_id
3128 structure member (Android only).
3129 * include/private/gcconfig.h: Recognize __x86_64 macro as a synonym
3130 of __x86_64__ (Darwin); define __environ macro (Android on M68K).
3131
3132 * allchblk.c (GC_freehblk): Print extended error message (done via
3133 GC_printf() before aborting with a short message) only if
3134 GC_print_stats.
3135 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3136 * os_dep.c (GC_get_maps, GC_register_data_segments, GC_remap,
3137 PROTECT, GC_write_fault_handler, GC_mprotect_thread): Likewise.
3138 * pthread_stop_world.c (GC_start_world): Likewise.
3139 * win32_threads.c (GC_register_my_thread_inner): Likewise.
3140 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments,
3141 GC_dirty_init): Remove redundant print of an error message before
3142 aborting with the same message.
3143 * os_dep.c (GC_register_data_segments): Remove format specifier
3144 from the string passed to GC_err_puts(); use ABORT instead of EXIT
3145 (if invalid executable type).
3146 * os_dep.c (GC_remap): Adjust printf format specifier (for long
3147 type).
3148 * os_dep.c (GC_dirty_init): Print a message about SIG_IGN detected
3149 (for SIGSEGV/BUS) only if GC_print_stats.
3150 * os_dep.c (catch_exception_raise): Join 2 adjacent GC_err_printf
3151 calls.
3152
3153 * tests/test.c (main): Print the relevant message if GWW_VDB.
3154 * include/private/gcconfig.h: Don't define MPROTECT_VDB for Win32
3155 on x64 if compiled by GCC.
3156
3157 * tests/staticrootstest.c: Include string.h for memset() prototype.
3158 * tests/thread_leak_test.c (main): Fix printf() format specifiers.
3159
3160 * CMakeLists.txt: Check enable_parallel_mark on Darwin.
3161 * configure.ac: Likewise.
3162 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3163 DARWIN_QUERY_TASK_THREADS): Rename to GC_NO_THREADS_DISCOVERY and
3164 GC_DISCOVER_TASK_THREADS, respectively.
3165 * os_dep.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3166 * pthread_support.c (DARWIN_SUSPEND_GC_THREADS): Likewise.
3167 * darwin_stop_world.c (DARWIN_QUERY_TASK_THREADS): Don't define
3168 (and remove FIXME).
3169 * darwin_stop_world.c (GC_use_threads_discovery): Add GC_API;
3170 comment; remove FIXME.
3171 * win32_threads.c (GC_NO_DLLMAIN): Rename to
3172 GC_NO_THREADS_DISCOVERY.
3173 * tests/test.c (GC_NO_DLLMAIN): Likewise.
3174 * doc/README.macros (GC_NO_DLLMAIN): Likewise.
3175 * doc/README.win32 (GC_NO_DLLMAIN): Likewise.
3176 * doc/README.macros (GC_NO_THREADS_DISCOVERY): Update the comment.
3177 * win32_threads.c (GC_win32_dll_threads): Define as macro to true
3178 if GC_DISCOVER_TASK_THREADS (and not GC_NO_THREADS_DISCOVERY);
3179 update the comment.
3180 * win32_threads.c (GC_use_DllMain): Rename to
3181 GC_use_threads_discovery; do not set GC_win32_dll_threads if
3182 GC_DISCOVER_TASK_THREADS.
3183 * win32_threads.c (GC_started_thread_while_stopped,
3184 GC_lookup_thread_inner, UNPROTECT_THREAD, GC_lookup_pthread,
3185 GC_thr_init, GC_pthread_create, DllMain): Rewrite some expressions
3186 which use GC_win32_dll_threads to minimize the possibility of
3187 an "unreachable code" compiler warning when GC_win32_dll_threads
3188 is defined as a macro.
3189 * win32_threads.c (GC_unregister_my_thread): Don't call
3190 GC_delete_thread() if GC_win32_dll_threads and THREAD_LOCAL_ALLOC
3191 (since can't happen); use "t" local variable only if not
3192 GC_win32_dll_threads.
3193 * doc/README.macros (GC_DISCOVER_TASK_THREADS): Document.
3194 * include/gc.h (GC_use_DllMain): Rename to
3195 GC_use_threads_discovery but keep old name as a macro definition.
3196 * include/gc.h (GC_use_threads_discovery): Declare also for
3197 Darwin; update the comment.
3198 * tests/test.c (main): Call GC_use_threads_discovery for Darwin
3199 (to test the mode if possible).
3200
3201 * darwin_stop_world.c (DARWIN_SUSPEND_GC_THREADS,
3202 DARWIN_QUERY_TASK_THREADS): New macro recognized.
3203 * darwin_stop_world.c (GC_query_task_threads): add STATIC;
3204 initialize to false; define as macro if DARWIN_SUSPEND_GC_THREADS
3205 or DARWIN_QUERY_TASK_THREADS; remove FIXME.
3206 * darwin_stop_world.c (GC_use_threads_discovery): New function
3207 (for setting GC_query_task_threads value).
3208 * darwin_stop_world.c (GC_mach_handler_thread,
3209 GC_use_mach_handler_thread, GC_mach_thread, GC_MAX_MACH_THREADS,
3210 GC_mach_threads, GC_mach_threads_count, GC_suspend_thread_list,
3211 GC_darwin_register_mach_handler_thread): Define only if not
3212 DARWIN_SUSPEND_GC_THREADS.
3213 * darwin_stop_world.c (GC_stop_world, GC_start_world): Exclude
3214 the code for GC_query_task_threads case from compilation unless
3215 DARWIN_SUSPEND_GC_THREADS.
3216 * os_dep.c (GC_darwin_register_mach_handler_thread): Declared only
3217 if Darwin threads and not DARWIN_SUSPEND_GC_THREADS.
3218 * os_dep.c (GC_mprotect_thread): Call
3219 GC_darwin_register_mach_handler_thread only if THREADS and not
3220 DARWIN_SUSPEND_GC_THREADS.
3221 * pthread_support.c (marker_mach_threads): Don't define if
3222 DARWIN_SUSPEND_GC_THREADS.
3223 * pthread_support.c (GC_mark_thread): Don't fill in
3224 marker_mach_threads if DARWIN_SUSPEND_GC_THREADS.
3225 * include/private/gc_locks.h (GC_need_to_lock): Always declare for
3226 THREADS case.
3227
3228 * darwin_stop_world.c (GC_query_task_threads): Don't define to
3229 false for DARWIN_DONT_PARSE_STACK case; unconditionally initialize
3230 the variable to false (for now).
3231 * darwin_stop_world.c (GC_push_all_stacks): Call task_threads()
3232 only if not DARWIN_DONT_PARSE_STACK.
3233 * darwin_stop_world.c (GC_stop_world, GC_start_world): Use the
3234 approach based on task_threads() only if GC_query_task_threads
3235 else use GC_threads table.
3236
3237 * darwin_stop_world.c (GC_mach_threads): Remove static qualifier.
3238 * darwin_stop_world.c (GC_stop_init): Remove (as we do not need to
3239 really clear GC_mach_threads[]).
3240 * darwin_stop_world.c (GC_stop_world): Reset GC_mach_threads_count
3241 (instead of calling GC_stop_init).
3242 * include/private/pthread_support.h (GC_stop_init): Remove proto.
3243 * pthread_support.c (GC_stop_init): Add proto (unless Darwin).
3244 * pthread_support.c (GC_thr_init): Don't call GC_stop_init() if
3245 GC_DARWIN_THREADS.
3246
3247 * darwin_stop_world.c (GC_stack_range_for): New static function
3248 (move the code from GC_push_all_stacks).
3249 * darwin_stop_world.c (GC_push_all_stacks): Call
3250 GC_stack_range_for(); rename kern_return local variable to
3251 kern_result.
3252 * darwin_stop_world.c (GC_is_mach_marker): Change argument type
3253 from mach_port_t to thread_act_t.
3254 * pthread_support.c (GC_is_mach_marker): Likewise.
3255
3256 * darwin_stop_world.c (GC_push_all_stacks): Fix "my_task" local
3257 variable initialization (always call current_task()).
3258 * pthread_support.c (GC_thr_init, GC_register_my_thread_inner):
3259 Don't set thread's stop_info.stack_ptr value for Darwin.
3260 * include/private/darwin_stop_world.h (thread_stop_info): Update
3261 the comment for stack_ptr.
3262
3263 * darwin_stop_world.c (GC_push_all_stacks): Rename "r", "me" local
3264 variables to "kern_return" and "my_thread" ones, respectively;
3265 call mach_port_deallocate() unconditionally.
3266 * darwin_stop_world.c (GC_stop_world): Don't call mach_thread_self
3267 if DEBUG_THREADS.
3268
3269 * darwin_stop_world.c (GC_mach_thread): Move from
3270 darwin_stop_world.h.
3271 * include/private/darwin_stop_world.h (GC_mach_thread): Remove.
3272 * win32_threads.c (GC_start_world): Define "thread_id" local
3273 variable only if GC_ASSERTIONS; decide whether to resume a thread
3274 based on its "suspended" field value; assert that suspended thread
3275 stack_base is non-zero and the thread is not our one.
3276
3277 * darwin_stop_world.c (GC_thread_resume): New inline function
3278 (move code from GC_thread_resume).
3279 * darwin_stop_world.c (GC_start_world): Check result of
3280 task_threads(); call GC_thread_resume().
3281 * os_dep.c (GC_malloc_heap_l, GC_is_malloc_heap_base): Define
3282 only if not CYGWIN32.
3283 * os_dep.c (GC_is_heap_base): Call GC_is_malloc_heap_base() only
3284 if not CYGWIN32.
3285
3286 * darwin_stop_world.c (FindTopOfStack): Change return type to
3287 ptr_t (from long); make GC_INNER; add GC_ prefix.
3288 * darwin_stop_world.c (GC_push_all_stacks): Add thread_blocked
3289 local variable (initialized from the corresponding GC_thread
3290 field unless GC_query_task_threads); add assertion that our
3291 thread is not blocked; prefix FindTopOfStack with GC_ and remove
3292 no longer needed cast to ptr_t of the result; handle thread
3293 blocked case (and remove FIXME); use GC_push_all_stack_sections
3294 unless GC_query_task_threads (and remove FIXME).
3295 * pthread_support.c (GC_FindTopOfStack): Declare (if needed).
3296 * pthread_support.c (GC_do_blocking_inner): Call
3297 GC_save_regs_in_stack (if needed) before acquiring the lock.
3298 * win32_threads.c (GC_do_blocking_inner): Likewise.
3299 * pthread_support.c (GC_do_blocking_inner): Set/clear topOfStack
3300 field of GC_thread (Darwin only).
3301 * include/private/pthread_support.h (GC_thread): Add topOfStack
3302 field for Darwin (unless DARWIN_DONT_PARSE_STACK).
3303
3304 * finalize.c (GC_check_finalizer_nested): Change return type to
3305 char pointer (instead of int pointer); use explicit cast for
3306 GC_finalizer_nested assignment.
3307 * pthread_support.c (GC_check_finalizer_nested): Likewise.
3308 * win32_threads.c (GC_check_finalizer_nested): Likewise.
3309 * finalize.c (GC_finalizer_nested): Change type to unsigned char.
3310 * finalize.c (GC_notify_or_invoke_finalizers): Change type of
3311 "pnested" local variable to char pointer.
3312 * pthread_support.c (GC_do_blocking_inner,
3313 GC_call_with_gc_active): Use explicit cast for "thread_blocked"
3314 field assignment.
3315 * win32_threads.c (GC_lookup_pthread): Use explicit cast for
3316 "suspended" field assignment.
3317 * win32_threads.c (GC_Thread_Rep): Use short type for
3318 finalizer_skipped; use char type for finalizer_nested and flags
3319 fields and reorder some fields (to minimize GC_Thread_Rep
3320 structure size).
3321 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3322 * win32_threads.c (GC_Thread_Rep): Use char type for suspended
3323 field (instead of GC_bool).
3324 * include/private/pthread_support.h (GC_Thread_Rep): Use char type
3325 for thread_blocked field (instead of short).
3326
3327 * darwin_stop_world.c (GC_query_task_threads): New variable (or
3328 macro).
3329 * darwin_stop_world.c (GC_push_all_stacks): Use
3330 GC_query_task_threads (to choose between algorithms based on
3331 kernel task_threads and based on GC_threads table); update FIXME;
3332 remove commented out GC_push_one statements.
3333 * pthread_support.c (GC_thr_init, GC_do_blocking_inner,
3334 GC_call_with_gc_active, GC_register_my_thread_inner): Initialize
3335 stack_ptr field for all platforms.
3336 * pthread_support.c (GC_call_with_gc_active): Initialize
3337 saved_stack_ptr field for all platforms.
3338 * include/private/darwin_stop_world.h (thread_stop_info): Add
3339 stack_ptr field; change type of already_suspended from int to
3340 GC_bool.
3341
3342 * darwin_stop_world.c (GC_MAX_MACH_THREADS): New macro.
3343 * darwin_stop_world.c (GC_mach_threads, GC_stop_init): Use
3344 GC_MAX_MACH_THREADS instead of THREAD_TABLE_SZ.
3345 * darwin_stop_world.c (GC_mach_threads): Add FIXME.
3346 * darwin_stop_world.c (GC_stop_init, GC_suspend_thread_list,
3347 GC_stop_world): Use FALSE and TRUE for already_suspended field and
3348 "changed", "found" variables.
3349 * darwin_stop_world.c (GC_is_mach_marker): New prototype (only if
3350 PARALLEL_MARK).
3351 * darwin_stop_world.c (GC_suspend_thread_list): Change return type
3352 to GC_bool; change type of "changed", "found" to GC_bool; make
3353 "my_thread" as an argument (instead of acquiring/deallocating it
3354 locally); do not add my_thread, GC_mach_handler_thread and marker
3355 threads to GC_mach_threads table; check for overflow of
3356 GC_mach_threads table; increase GC_mach_threads_count if "found"
3357 is true and info.suspend_count is non-zero.
3358 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3359 Adjust "thread" format specifiers for GC_printf(); search thread
3360 in "old_list" starting from the previous found one.
3361 * darwin_stop_world.c (GC_stop_world): Rename "changes" to
3362 "changed" local variable; remove "result" variable; adjust
3363 GC_printf debugging message.
3364 * darwin_stop_world.c (GC_start_world): Do not check for
3365 my_thread and GC_use_mach_handler_thread (since they are not added
3366 to GC_mach_threads table); call thread_info() only if
3367 DEBUG_THREADS or GC_ASSERTIONS.
3368 * pthread_support.c (marker_mach_threads): New static variable (if
3369 Darwin).
3370 * pthread_support.c (GC_is_mach_marker): New function (if Darwin).
3371 * pthread_support.c (GC_mark_thread): Fill in marker_mach_threads
3372 table (if Darwin).
3373
3374 * alloc.c (GC_parallel): Define only if THREADS.
3375 * misc.c (GC_get_parallel): Likewise.
3376 * include/gc.h (GC_parallel, GC_get_parallel,
3377 GC_get_suspend_signal, GC_allow_register_threads,
3378 GC_register_my_thread, GC_unregister_my_thread): Define only if
3379 GC_THREADS.
3380 * include/gc.h (GC_get_heap_size): Fix a typo in a comment.
3381
3382 * configure.ac: Use `AC_C_INLINE'.
3383 * include/private/gc_priv.h (GC_INLINE): Use "inline" keyword
3384 (determined by configure AC_C_INLINE) if HAVE_CONFIG_H is defined.
3385
3386 * dyn_load.c (DL_ITERATE_PHDR_STRONG): New macro (define for
3387 FreeBSD).
3388 * dyn_load.c (GC_register_main_static_data): Move the definition
3389 above GC_register_dynamic_libraries_dl_iterate_phdr one (FreeBSD
3390 case); unconditionally return FALSE if DL_ITERATE_PHDR_STRONG.
3391 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Test
3392 GC_register_main_static_data() result (instead of direct testing
3393 of dl_iterate_phdr (to prevent a compiler warning).
3394 * os_dep.c (CODE_OK): Test si_code also for the value of 2
3395 (FreeBSD case; required for FreeBSD v7+).
3396 * os_dep.c (CODE_OK): Properly use parentheses (HPUX case).
3397 * include/private/gcconfig.h (DATASTART): Cast etext argument in
3398 GC_FreeBSDGetDataStart() call; remove unnecessary "&" (FreeBSD
3399 case).
3400
3401 * include/private/specific.h (quick_thread_id): Define thru
3402 GC_approx_sp(); define as a macro.
3403 * include/private/specific.h (getspecific): Use GC_INLINE instead
3404 of __inline__ (to work around Sun CC which does not recognize
3405 inline keyword surrounded with underscores).
3406
3407 * darwin_stop_world.c (FindTopOfStack): Simplify condition
3408 expressions.
3409 * darwin_stop_world.c (GC_push_all_stacks): Merge two variants
3410 of this function (DARWIN_DONT_PARSE_STACK).
3411 * darwin_stop_world.c (GC_push_all_stacks): Add a check for our
3412 thread is found (same as in pthread_stop_world.c).
3413 * darwin_stop_world.c (GC_push_all_stacks): Print the number of
3414 scanned threads if verbose (same as in pthread_stop_world.c).
3415
3416 * darwin_stop_world.c (GC_push_all_stacks): Reset
3417 thread_state_count value before every thread_get_state call;
3418 refine the comment for thread_state_count.
3419 * darwin_stop_world.c (GC_push_all_stacks): Ignore rsp, rip/eip,
3420 rflags, cs, fs, gs, ss, ds, es, __pc registers; uncomment ebp
3421 register pushing.
3422 * darwin_stop_world.c (GC_push_all_stacks): Set outCount to
3423 GC_MACH_THREAD_STATE_COUNT (instead of THREAD_STATE_MAX).
3424 * darwin_stop_world.c (GC_push_all_stacks): Remove FIXME and WARN
3425 for i386.
3426
3427 * doc/README.macros (DARWIN_DONT_PARSE_STACK): Fix a typo.
3428 * darwin_stop_world.c (GC_use_mach_handler_thread): Change type
3429 to GC_bool.
3430 * darwin_stop_world.c (GC_suspend_thread_list, GC_start_world):
3431 Simplify the expressions involving GC_use_mach_handler_thread.
3432 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
3433 Initialize GC_use_mach_handler_thread to TRUE (instead of 1).
3434
3435 * include/gc_pthread_redirects.h (GC_pthread_sigmask, GC_dlopen,
3436 pthread_sigmask, dlopen): Don't define for Win32 pthreads (and
3437 don't include signal.h and dlfcn.h).
3438
3439 * dyn_load.c (GC_register_dynlib_callback): Add FIXME.
3440
3441 * include/private/gcconfig.h: Add support for FreeBSD on ppc64.
3442
3443 * os_dep.c (PROTECT, UNPROTECT): Correct VM_PROT_EXEC to
3444 VM_PROT_EXECUTE.
3445
3446 * os_dep.c (os2_alloc): Don't set PAG_EXECUTE unless
3447 pages_executable is on.
3448 * os_dep.c (os2_alloc): Add FIXME (for recursion).
3449 * os_dep.c (UNPROTECT): Abort with a more informative message if
3450 pages_executable is on ("mprotect" case).
3451 * os_dep.c (PROTECT, UNPROTECT): Set VM_PROT_EXEC if
3452 pages_executable is on (Darwin case).
3453 * pthread_support.c (GC_init_real_syms): Abort with an informative
3454 message if libgc is linked after libpthread.
3455
3456 * dyn_load.c (GC_register_dynlib_callback): Adjust "start" pointer
3457 for 64-bit targets.
3458 * pthread_support.c (start_mark_threads): Expand PTHREAD_CREATE
3459 macro.
3460 * pthread_support.c (start_mark_threads): Call INIT_REAL_SYMS()
3461 since REAL(pthread_create) is used.
3462 * pthread_support.c (PTHREAD_CREATE): Remove unused.
3463
3464 * extra/threadlibs.c (main): Remove --wrap for "read" (since not
3465 wrapped anymore).
3466 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3467 * os_dep.c (__wrap_read): Likewise.
3468
3469 * include/gc_pthread_redirects.h: Test GC_PTHREADS and GC_H at the
3470 beginning of the file.
3471 * include/gc_pthread_redirects.h (GC_PTHREAD_EXIT_ATTRIBUTE): New
3472 macro (defined only for Linux and Solaris).
3473 * include/gc_pthread_redirects.h (GC_pthread_cancel,
3474 GC_pthread_exit): Declare new API function (only if
3475 GC_PTHREAD_EXIT_ATTRIBUTE).
3476 * include/gc_pthread_redirects.h (pthread_cancel, pthread_exit):
3477 Redirect (if GC_PTHREAD_EXIT_ATTRIBUTE).
3478 * include/private/pthread_support.h (DISABLED_GC): New macro.
3479 * pthread_support.c (pthread_cancel, pthread_exit): Restore
3480 original definition or declare "real" function (if needed and
3481 GC_PTHREAD_EXIT_ATTRIBUTE).
3482 * pthread_support.c (GC_pthread_cancel_t, GC_pthread_exit_t):
3483 Declare new types if needed.
3484 * pthread_support.c (GC_pthread_cancel, GC_pthread_exit): New
3485 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3486 * pthread_support.c (GC_init_real_syms): Initialize pointers to
3487 the "real" pthread_cancel and pthread_exit (only if
3488 GC_PTHREAD_EXIT_ATTRIBUTE).
3489 * pthread_support.c (GC_unregister_my_thread): Enable collections
3490 if DISABLED_GC was set (only if GC_PTHREAD_EXIT_ATTRIBUTE).
3491 * pthread_support.c (pthread_cancel, pthread_exit): New wrapped
3492 function definition (only if GC_PTHREAD_EXIT_ATTRIBUTE defined).
3493 * pthread_support.c (GC_start_routine): Refine the comment.
3494 * extra/threadlibs.c (main): Adjust --wrap (add "read",
3495 "pthread_exit", "pthread_cancel" but remove "sleep").
3496 * doc/README.linux (GC_USE_LD_WRAP): Likewise.
3497
3498 * include/gc.h (GC_MALLOC_STUBBORN): Remove trailing ';' in the
3499 macro definition.
3500 * include/gc.h (GC_reachable_here): Likewise.
3501 * include/gc.h (GC_reachable_here): Prefix and postfix "volatile"
3502 with double '_'.
3503
3504 * pthread_start.c: New file.
3505 * CMakeLists.txt (SRC): Add pthread_start.c.
3506 * Makefile.am (libgc_la_SOURCES): Likewise.
3507 * Makefile.direct (CSRCS): Likewise.
3508 * Makefile.direct (OBJS): Add pthread_start.obj.
3509 * extra/gc.c: Add a comment; include pthread_start.c.
3510 * pthread_support.c (start_info): Move the struct definition down
3511 closer to its usage.
3512 * pthread_support.c (GC_thread_exit_proc): Replace STATIC with
3513 GC_INNER.
3514 * pthread_support.c (GC_inner_start_routine): Move to the
3515 definition to pthread_start.c; leave only the prototype; remove
3516 STATIC.
3517 * pthread_support.c (GC_start_rtn_prepare_thread): New function
3518 (contains parts of the original GC_inner_start_routine).
3519
3520 * configure.ac (NO_EXECUTE_PERMISSION): Add comment.
3521 * doc/README.macros (NO_EXECUTE_PERMISSION): Update the
3522 documentation.
3523 * include/gc.h (GC_set_pages_executable, GC_get_pages_executable):
3524 New API function declaration.
3525 * os_dep.c (OPT_PROT_EXEC): Remove (superseded by
3526 pages_executable).
3527 * os_dep.c (pages_executable): New static variable.
3528 * os_dep.c (IGNORE_PAGES_EXECUTABLE): New macro (used by
3529 GC_get_pages_executable only).
3530 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, PROTECT, UNPROTECT):
3531 Replace OPT_PROT_EXEC with pages_executable.
3532 * os_dep.c (GC_unix_mmap_get_mem, GC_remap, GC_win32_get_mem,
3533 GC_wince_get_mem, UNPROTECT): Undefine IGNORE_PAGES_EXECUTABLE.
3534 * os_dep.c (GC_win32_get_mem, GC_wince_get_mem, GC_remap, PROTECT,
3535 UNPROTECT): Use PAGE_EXECUTE_... only if pages_executable is on.
3536 * os_dep.c (GC_set_pages_executable, GC_get_pages_executable): New
3537 API function definition.
3538
3539 * tests/test.c (check_heap_stats): Increase max_heap_sz by 20% for
3540 64-bit CPUs (to prevent "Unexpected heap growth" failure on Win64,
3541 at least).
3542
3543 * tests/test.c (check_heap_stats): Increase max_heap_sz by 25% for
3544 32-bit CPUs (to prevent "Unexpected heap growth" failure).
3545
3546 * gc_dlopen.c (dlopen): Prototype REAL_DLFUNC if GC_USE_LD_WRAP.
3547 * pthread_support.c (pthread_create, pthread_join, pthread_detach,
3548 pthread_sigmask): Likewise.
3549 * gc_dlopen.c (dlopen): Remove cast (redundant since the prototype
3550 is added).
3551 * gc_dlopen.c (GC_dlopen): Fix return type.
3552 * pthread_support.c (GC_init_real_syms): Don't define
3553 LIBPTHREAD_NAME, LIBPTHREAD_NAME_LEN, len, namebuf and
3554 libpthread_name if RTLD_NEXT.
3555
3556 * gc_dlopen.c (disable_gc_for_dlopen): Update the comment.
3557 * gc_dlopen.c (dlopen): Likewise.
3558 * include/gc.h (GC_enable_incremental): Refine the comment.
3559 * include/gc.h (DECLSPEC_NORETURN): Define macro as empty if
3560 missing (only for Win32).
3561 * include/gc.h (GC_ExitThread): Use DECLSPEC_NORETURN.
3562 * win32_threads.c (GC_ExitThread): Likewise.
3563 * include/gc.h (GC_endthreadex): Add a comment.
3564
3565 * include/cord.h: Fix typos.
3566
3567 * Makefile.am (EXTRA_DIST): Add "CMakeLists.txt" and
3568 "tests/CMakeLists.txt".
3569 * doc/doc.am (dist_pkgdata_DATA): Add "doc/README.cmake".
3570
3571 * mach_dep.c (NO_GETCONTEXT): Also define if AVR32.
3572 * include/private/gcconfig.h (AVR32): New macro (also define the
3573 supplementary macros for the target).
3574 * include/private/thread_local_alloc (USE_COMPILER_TLS): Don't
3575 define for AVR32.
3576
3577 * tests/leak_test.c (main): Explicitly define as returning int
3578 (to prevent a spurious test failure on some Linux/alpha targets).
3579 * tests/thread_leak_test.c (main): Likewise.
3580 * tests/thread_leak_test.c: Initialize GC_find_leak in the main
3581 thread (before GC_INIT) only.
3582 * tests/leak_test.c (main): Use GC_set_find_leak() instead of
3583 accessing GC_find_leak directly.
3584 * tests/thread_leak_test.c (main): Likewise.
3585
3586 * include/gc.h (GC_find_leak, GC_finalize_on_demand,
3587 GC_java_finalization, GC_dont_expand, GC_no_dls,
3588 GC_dont_precollect): Simplify the comment (remove the information
3589 about data races since the value is boolean).
3590
3591 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base): New
3592 Solaris-specific implementation (based on thr_stksegment).
3593 * os_dep.c (stackbase_main_self, stackbase_main_ss_sp): New static
3594 variable used by the Solaris-specific GC_get_stack_base().
3595
3596 * pthread_support.c (GC_mark_thread_local_free_lists,
3597 GC_check_tls): Mark (and check) only for live threads (in case of
3598 GC_destroy_thread_local() is called already but GC_delete_thread()
3599 is not yet).
3600 * win32_threads.c (GC_mark_thread_local_free_lists, GC_check_tls):
3601 Likewise.
3602
3603 * NT_MAKEFILE: Remove the comment about DLL and Win32S.
3604 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3605 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3606 * NT_MAKEFILE: Add ".SUFFIXES" directive (to handle gc_cpp.cc
3607 properly on VS 2005+).
3608 * NT_MAKEFILE: Update GC log file name in comments.
3609 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3610 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3611 * NT_X64_THREADS_MAKEFILE: Likewise.
3612 * doc/README.win32: Likewise.
3613 * NT_MAKEFILE: Remove ":full" for "-debug" option (since no
3614 longer supported by VS).
3615 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3616 * NT_MAKEFILE: Commented out copying of gc_cpp.cc to gc_cpp.cpp.
3617 * NT_STATIC_THREADS_MAKEFILE: Likewise.
3618 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
3619 * NT_X64_THREADS_MAKEFILE: Likewise.
3620 * NT_STATIC_THREADS_MAKEFILE: Add -D PARALLEL_MARK option.
3621 * NT_STATIC_THREADS_MAKEFILE: Increase stack size for gctest.exe.
3622 * NT_X64_STATIC_THREADS_MAKEFILE: Remove "-stack" option (use the
3623 default stack size limit).
3624 * NT_X64_THREADS_MAKEFILE: Rename "gc64_dll.dll" to "gc64.dll".
3625 * win32_threads.c (GC_get_next_stack): Always define (since it is
3626 also used for Cygwin now).
3627
3628 * alloc.c (GC_maybe_gc): Move GC_notify_full_gc() call upper to
3629 be just before GC_clear_marks() call.
3630 * include/gc_mark.h (GC_start_callback_proc): Refine the comment.
3631
3632 * Makefile.am (check_LTLIBRARIES): Initialize to empty.
3633 * tests/tests.am (TESTS, check_PROGRAMS): Add staticrootstest.
3634 * tests/tests.am (staticrootstest_SOURCES, staticrootstest_LDADD,
3635 libstaticrootslib_la_SOURCES, libstaticrootslib_la_LIBADD,
3636 libstaticrootslib_la_LDFLAGS, libstaticrootslib_la_DEPENDENCIES):
3637 Define.
3638 * tests/tests.am (check_LTLIBRARIES): Add libstaticrootslib.la.
3639
3640 * tests/staticrootstest.c: New file.
3641 * tests/staticrootslib.c: Likewise.
3642
3643 * dyn_load.c (GC_get_next_stack, GC_cond_add_roots): Define for
3644 Cygwin as well as other win32 targets.
3645 * dyn_load.c (GC_wnt): Define to constant true.
3646 * dyn_load.c (GC_register_dynamic_libraries): Define for Cygwin as
3647 well as other win32 targets.
3648 * mark_rts.c (rt_hash, GC_roots_present, add_roots_to_index):
3649 Don't define for Cygwin, as on other win32.
3650 * mark_rts.c (GC_add_roots_inner, GC_clear_roots): Handle on
3651 Cygwin as for other win32 targets.
3652 * mark_rts.c (GC_rebuild_root_index): Don't declare on Cygwin, as
3653 other win32.
3654 * mark_rts.c (GC_remove_tmp_roots): Do declare on Cygwin as on
3655 other win32.
3656 * mark_rts.c (GC_remove_roots, GC_remove_roots_inner): Don't
3657 declare on Cygwin as on other win32.
3658 * mark_rts.c (GC_is_tmp_root): Do declare on Cygwin when
3659 !NO_DEBUGGING, as on other win32 targets.
3660 * mark_rts.c (GC_cond_register_dynamic_libraries): Handle on
3661 Cygwin as for other win32 targets.
3662 * os_dep.c (GC_setpagesize): Handle on Cygwin as on other win32.
3663 * os_dep.c (GC_get_main_stack_base): Don't declare on Cygwin, as
3664 other win32.
3665 * os_dep.c (GC_sysinfo): Declare on Cygwin, as other win32.
3666 * os_dep.c (GC_win32_get_mem): Declare on Cygwin, as on other
3667 Win32, but call GC_unix_get_mem instead of GlobalAlloc.
3668 * os_dep.c (GC_win32_free_heap): Declare on Cygwin (as empty).
3669 * ptr_chck.c (GC_is_visible): Register dynamic libraries on Cygwin
3670 as on other win32 platforms.
3671 * win32_threads.c (GC_get_next_stack): Define on Cygwin as well as
3672 for dynamic loading targets.
3673 * include/private/gc_priv.h (GC_INNER): Don't try to use
3674 visibility on Cygwin which does not support it.
3675 * include/private/gc_priv.h (struct roots): Don't declare r_next
3676 member on Cygwin as on other windows hosts.
3677 * include/private/gc_priv.h (LOG_RT_SIZE, RT_SIZE): Don't define
3678 likewise.
3679 * include/private/gc_priv.h (struct _GC_arrays): Do declare
3680 _heap_bases[] member and don't declare _root_index likewise.
3681 * include/private/gc_priv.h (GC_heap_bases): Do define likewise.
3682 * include/private/gc_priv.h (_SYSTEM_INFO): Do forward-declare
3683 likewise.
3684 * include/private/gc_priv.h (GC_sysinfo): Do declare extern
3685 likewise.
3686 * include/private/gcconfig.h (GC_win32_get_mem, GET_MEM): Do
3687 prototype on Cygwin as other win32 platforms.
3688
3689 * os_dep.c (GC_get_main_stack_base): Use pthread_getattr_np() and
3690 pthread_attr_getstack() instead of GC_get_stack_base() (and check
3691 returned stackaddr for NULL); output a warning on failure.
3692
3693 * alloc.c (GC_start_call_back): Replace the definition type to
3694 GC_start_callback_proc.
3695 * alloc.c (GC_set_start_callback, GC_get_start_callback): New
3696 setter/getter function.
3697 * alloc.c (GC_try_to_collect_inner): Call GC_notify_full_gc()
3698 unconditionally (because GC_try_to_collect_inner always does full
3699 GC).
3700 * include/gc_mark.h (GC_start_callback_proc): New type.
3701 * include/gc_mark.h (GC_set_start_callback,
3702 GC_get_start_callback): New API function declaration.
3703
3704 * doc/README.macros (USE_GET_STACKBASE_FOR_MAIN): Document.
3705 * os_dep.c (GC_get_main_stack_base): Recognize
3706 USE_GET_STACKBASE_FOR_MAIN (only if THREADS and LINUX_STACKBOTTOM)
3707 and use GC_get_stack_base() in this case.
3708
3709 * os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
3710 GC_find_limit_with_bound() should be called with the lock held).
3711 * backgraph.c (FOR_EACH_PRED): Fix a typo.
3712
3713 * alloc.c (GC_set_stop_func, GC_get_stop_func): Add
3714 DCL_LOCK_STATE.
3715 * finalize.c (GC_notify_or_invoke_finalizers): Likewise.
3716 * gc_dlopen.c (disable_gc_for_dlopen): Likewise.
3717 * gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Likewise.
3718 * mark.c (GC_print_trace): Likewise.
3719 * misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
3720 GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
3721 GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
3722 GC_get_finalizer_notifier): Likewise.
3723 * os_dep.c (GC_get_stack_base, GC_print_callers): Likewise.
3724 * pthread_support.c (GC_is_thread_tsd_valid,
3725 GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
3726 GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
3727 pthread_detach, GC_register_my_thread, GC_inner_start_routine,
3728 pthread_create): Likewise.
3729 * reclaim.c (GC_print_all_errors): Likewise.
3730 * win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
3731 GC_unregister_my_thread, GC_do_blocking_inner,
3732 GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
3733 GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
3734 GC_init_parallel): Likewise.
3735
3736 * doc/README.darwin: Update.
3737
3738 * CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
3739 usable on Mac OS X).
3740 * doc/README.cmake: Update.
3741
3742 * CMakeLists.txt: New file (adding CMake support).
3743 * tests/CMakeLists.txt: Likewise.
3744 * doc/README.cmake: Likewise.
3745
3746 * configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
3747 macros.
3748 * include/private/gc_priv.h (THREAD_FLD): Recognize
3749 __DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
3750
3751 * pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
3752 OpenBSD.
3753 * pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
3754 OpenBSD.
3755 * pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
3756 NetBSD and OpenBSD.
3757
3758 * mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
3759 if THREADS is undefined.
3760 * include/gc.h (GC_malloc_many): Update the comment.
3761
3762 * include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
3763 (formerly known as Borland) C++ compiler v6.21+.
3764 * include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
3765 VC++ compilers.
3766
3767 * win32_threads.c (GC_register_my_thread_inner,
3768 GC_pthread_start_inner): Undo the previous commit changes for
3769 the thread flags and DETACHED state (since the state is only
3770 tested in GC_thread_exit_proc).
3771
3772 * include/gc.h (GC_unregister_my_thread): Fix a typo; update the
3773 comment.
3774 * pthread_support.c (GC_delete_thread): Allow to delete the main
3775 thread (don't call GC_INTERNAL_FREE for it); update the comment.
3776 * win32_threads.c (GC_delete_thread): Likewise.
3777 * pthread_support.c (GC_unregister_my_thread): Add an assertion
3778 for FINISHED flag is unset.
3779 * tests/test.c (check_heap_stats): Test the main thread
3780 unregistering (only if THREADS).
3781 * win32_threads.c (GC_register_my_thread_inner): Set flags to
3782 DETACHED (only if GC_PTHREADS).
3783 * win32_threads.c (GC_unregister_my_thread): Add FIXME (for
3784 GC_wait_for_gc_completion).
3785 * win32_threads.c (GC_pthread_start_inner): Clear flags detached
3786 state if needed; set pthread_id and flags while holding the lock.
3787
3788 * include/private/gc_priv.h (SIG_SUSPEND): Don't define for
3789 OpenBSD and Darwin.
3790
3791 * include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).
3792
3793 * test.c (main, WinMain): Consistently don't invoke
3794 GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
3795 do invoke it even if parallel marking is enabled.
3796
3797 * tests/test.c (reverse_test): Comment out a check for MSWIN32
3798 (when determining BIG value) assuming outdated win32S.
3799 * tests/test.c (reverse_test): Rename to reverse_test_inner;
3800 change the declaration (to be of GC_fn_type); call itself thru
3801 GC_call_with_gc_active() if the argument is zero.
3802 * tests/test.c (reverse_test): New function added calling
3803 reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
3804 GC_call_with_gc_active).
3805
3806 * doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
3807 Document.
3808 * dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
3809 * dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
3810 PLATFORM_ANDROID.
3811 * include/private/gcconfig.h (LINUX): Define also if
3812 PLATFORM_ANDROID (for the windows-based toolkit).
3813 * include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
3814 define for Android/x86 platform.
3815 * include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
3816 new macro (undefine DYNAMIC_LOADING in this case).
3817 * include/private/gcconfig.h (CANCEL_SAFE): Don't define if
3818 PLATFORM_ANDROID.
3819 * include/private/gcconfig.h (IF_CANCEL): Fix definition for the
3820 explicitly defined CANCEL_SAFE.
3821
3822 * allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
3823 if GC_DISABLE_INCREMENTAL.
3824 * reclaim.c (GC_reclaim_generic): Likewise.
3825 * checksums.c (GC_page_was_ever_dirty): Add prototype.
3826 * include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
3827 unless PARALLEL_MARK.
3828 * include/private/gc_priv.h (GC_dirty_maintained,
3829 GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
3830 declare if GC_DISABLE_INCREMENTAL.
3831 * include/private/gc_priv.h (GC_print_finalization_stats): Don't
3832 declare if SMALL_CONFIG.
3833 * include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
3834 GC_DISABLE_INCREMENTAL (since nothing to check).
3835 * include/private/gcconfig.h (DEFAULT_VDB): Don't define if
3836 GC_DISABLE_INCREMENTAL.
3837 * os_dep.c (GC_dirty_maintained): Likewise.
3838 * mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
3839 GC_DISABLE_INCREMENTAL.
3840 * os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
3841 Uncomment; define only if CHECKSUMS.
3842
3843 * darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
3844 GC_push_all_stack() instead of GC_push_all_stack_frames()).
3845 * include/private/gc_priv.h (GC_push_all_stack_frames,
3846 GC_push_all_register_frames): Rename to
3847 GC_push_all_stack_sections and GC_push_all_register_sections,
3848 respectively.
3849 * mark_rts.c (GC_push_all_stack_frames,
3850 GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
3851 GC_push_current_stack): Likewise.
3852 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3853 * win32_threads.c (GC_push_stack_for): Likewise.
3854 * misc.c (GC_call_with_gc_active): Rename "frame" local variable
3855 to "stacksect".
3856 * pthread_support.c (GC_call_with_gc_active): Likewise.
3857 * win32_threads.c (GC_call_with_gc_active): Likewise.
3858 * pthread_support.c (GC_call_with_gc_active): Update FIXME for
3859 Darwin.
3860 * win32_threads.c (GC_Thread_Rep): Update the comment for
3861 traced_stack_sect.
3862
3863 * darwin_stop_world.c (GC_push_all_stacks): Rename
3864 activation_frame to traced_stack_sect.
3865 * include/private/gc_priv.h (GC_push_all_stack_frames,
3866 GC_push_all_register_frames): Likewise.
3867 * include/private/pthread_support.h (GC_Thread_Rep): Likewise.
3868 * mark_rts.c (GC_push_all_register_frames,
3869 GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
3870 GC_push_current_stack): Likewise.
3871 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3872 * pthread_support.c (GC_call_with_gc_active): Likewise.
3873 * win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
3874 GC_push_stack_for): Likewise.
3875 * include/private/gc_priv.h (GC_activation_frame_s): Rename to
3876 GC_traced_stack_sect_s.
3877 * include/private/gc_priv.h (GC_activation_frame): Rename to
3878 GC_traced_stack_sect.
3879 * misc.c (GC_activation_frame, GC_call_with_gc_active): Likewise.
3880 * doc/README.macros (UNICODE): Document.
3881
3882 * doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
3883 * include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
3884 declare and use GC_envfile_getenv().
3885 * misc.c (GC_envfile_content, GC_envfile_length): New static
3886 variable (only if GC_READ_ENV_FILE).
3887 * misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
3888 * misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
3889 if GC_READ_ENV_FILE).
3890 * misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
3891 if GC_READ_ENV_FILE.
3892 * misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
3893 calls to be just before GC_envfile_init() one (since the latter
3894 uses GET_MEM).
3895 * misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
3896 WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
3897 * mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
3898 from the ABORT message.
3899 * misc.c (GC_init): Likewise.
3900 * os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
3901 Likewise.
3902 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
3903 * pthread_support.c (GC_init_real_syms, start_mark_threads):
3904 Likewise.
3905
3906 * win32_threads.c (GC_get_next_stack): Don't define for Cygwin
3907 (since unused for now).
3908
3909 * dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
3910 GC_register_main_static_data() is defined.
3911 * dyn_load.c (GC_register_dynamic_libraries): Define only if used
3912 (if DYNAMIC_LOADING or PCR or Win32/CE).
3913 * dyn_load.c (GC_register_main_static_data): Define the default
3914 one only if DYNAMIC_LOADING.
3915 * include/private/gc_priv.h (GC_register_dynamic_libraries):
3916 Declare only if used (to prevent compiler warning).
3917
3918 * mark_rts.c (GC_approx_sp): Add a comment (for GCC).
3919
3920
3921 == [7.2alpha4] 2009-12-01 ==
3922
3923 * configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
3924
3925 * include/gc.h (GC_get_suspend_signal): New function declaration.
3926 * misc.c (GC_get_suspend_signal): New API function (only if
3927 THREADS).
3928
3929 * alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
3930 two if GC_incremental (instead of TRUE_INCREMENTAL).
3931
3932 * sparc_mach_dep.S (GC_push_regs): Remove the reference.
3933
3934 * os_dep.c (SIZE_T, PULONG_PTR): Remove.
3935 * os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
3936 "word"); add the comment.
3937 * os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
3938 GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".
3939
3940 * win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
3941 const value (for speed).
3942 * win32_threads.c (THREAD_TABLE_INDEX): New macro.
3943 * win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
3944 GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
3945 THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
3946 * win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.
3947
3948 * win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.
3949
3950 * backgraph.c: Remove apostrophe char from "#error".
3951
3952 * doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
3953 * include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
3954 new macro; implicitly define it if SMALL_CONFIG.
3955 * alloc.c (GC_incremental, GC_timeout_stop_func): Check for
3956 GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
3957 * include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
3958 GC_push_conditional): Likewise.
3959 * mark.c (GC_push_next_marked_dirty, GC_push_selected,
3960 GC_push_conditional, GC_block_was_dirty): Likewise.
3961 * misc.c (GC_enable_incremental): Likewise.
3962 * misc.c (GC_init): Likewise.
3963
3964 * dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
3965 * misc.c (WIN32_LEAN_AND_MEAN): Likewise.
3966 * os_dep.c (WIN32_LEAN_AND_MEAN): Likewise.
3967 * allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
3968 in a comment.
3969 * backgraph.c: Likewise.
3970 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
3971 * extra/threadlibs.c (main): Likewise.
3972 * pthread_support.c (pthread_join): Likewise.
3973 * tests/test.c (main): Likewise.
3974
3975 * mach_dep.c (GC_push_regs): Remove STATIC (just to catch
3976 a duplicate symbol definition linker error).
3977 * misc.c (GC_clear_stack_inner): Likewise.
3978 * sparc_mach_dep.S (GC_push_regs): Comment out the reference.
3979
3980 * include/private/gc_priv.h (GC_write_disabled): New variable
3981 declaration (only if GC_ASSERTIONS and Win32 threads).
3982 * misc.c (GC_write): Add assertion for GC_write_disabled value is
3983 not on (only if THREADS).
3984 * win32_threads.c (GC_write_disabled): New variable (only if
3985 GC_ASSERTIONS and not Cygwin).
3986 * win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
3987 (while holding GC_write_cs).
3988
3989 * win32_threads.c (GC_please_stop): If DllMain-based thread
3990 registration is not compiled in then define GC_please_stop as
3991 a non-volatile variable for assertion only.
3992 * win32_threads.c (GC_stop_world): Set and clear only if defined.
3993 * win32_threads.c (GC_stop_world): Add the comment for GC_printf()
3994 usage (while holding GC_write_cs).
3995 * win32_threads.c (GC_delete_gc_thread): Likewise.
3996 * os_dep.c (GC_remove_protection): Likewise.
3997
3998 * pthread_support.c (GC_inner_start_routine): Join 3 sequential
3999 GC_printf() calls into a single one (for DEBUG_THREADS).
4000
4001 * include/private/gc_priv.h (GC_total_stacksize): New variable
4002 declaration (only if THREADS).
4003 * alloc.c (GC_total_stacksize): New variable (only if THREADS).
4004 * alloc.c (min_bytes_allocd): Calculate stack_size using
4005 GC_stackbottom only in the single-threaded case; otherwise use
4006 GC_total_stacksize; print GC_total_stacksize value if
4007 DEBUG_THREADS.
4008 * darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
4009 specifier for lo/hi values (instead of "%lx").
4010 * darwin_stop_world.c (GC_push_all_stacks): Use
4011 GC_push_all_stack_frames() instead of GC_push_all_stack().
4012 * darwin_stop_world.c (GC_push_all_stacks): Recalculate
4013 GC_total_stacksize value.
4014 * pthread_stop_world.c (GC_push_all_stacks): Likewise.
4015 * win32_threads.c (GC_push_all_stacks): Likewise.
4016 * win32_threads.c (GC_push_stack_for): Pass "me" argument; return
4017 stack size; don't check for non-zero value of thread->stack_base.
4018 * win32_threads.c (GC_push_all_stacks): Don't call
4019 GC_push_stack_for() and don't check for "t->id == me" if
4020 thread->stack_base is zero.
4021
4022 * dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
4023 with "0x".
4024 * os_dep.c (PROTECT): Likewise.
4025 * win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
4026 int (to match printf type specifier).
4027
4028 * tests/test.c (check_heap_stats): Take into account the unmapped
4029 memory size when checking for "Unexpected heap growth"; remove
4030 FIXME.
4031
4032 * alloc.c: Revert last change.
4033
4034 * include/private/gcconfig.h (STACKBOTTOM): Add a presence check
4035 for eCos/NOSYS.
4036 * misc.c (GC_write): Comment out _Jv_diag_write() call (since no
4037 longer defined in GCJ).
4038
4039 * os_dep.c (brk): Rename to ecos_gc_brk.
4040
4041 * alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
4042 stack_size even if THREADS.
4043 * doc/README.macros (DEBUG_THREADS): Document.
4044 * pthread_support.c (DEBUG_THREADS): Remove the commented out
4045 definition.
4046 * win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
4047 definition.
4048 * win32_threads.c: Include errno.h (except for WinCE).
4049 * win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
4050 to local variables, and free "arg" parameter before "start"
4051 invocation.
4052 * win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
4053 (instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
4054 * win32_threads.c (GC_beginthreadex): Return 0 on error (instead
4055 of -1).
4056
4057 * darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
4058 Use GC_INNER for the function definition.
4059 * include/private/darwin_stop_world.h
4060 (GC_darwin_register_mach_handler_thread): Remove the prototype.
4061 * os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
4062 for the function prototype.
4063 * include/private/gc_priv.h (NDEBUG): Explicitly define if
4064 NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
4065 inclusion).
4066
4067 * include/private/gcconfig.h: Move DebugBreak() workaround (for
4068 x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).
4069
4070 * allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
4071 GC_freehblk): Use GC_INNER for the function definition.
4072 * alloc.c (GC_never_stop_func, GC_should_collect,
4073 GC_try_to_collect_inner, GC_collect_a_little_inner,
4074 GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
4075 GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Likewise.
4076 * backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
4077 Likewise.
4078 * blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
4079 GC_promote_black_lists, GC_unpromote_black_lists,
4080 GC_add_to_black_list_normal, GC_add_to_black_list_stack,
4081 GC_is_black_listed): Likewise.
4082 * darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
4083 GC_stop_init, GC_stop_world, GC_start_world): Likewise.
4084 * dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
4085 GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
4086 GC_store_debug_info, GC_start_debugging,
4087 GC_debug_generic_malloc_inner,
4088 GC_debug_generic_malloc_inner_ignore_off_page,
4089 GC_debug_malloc_uncollectable, GC_debug_free_inner): Likewise.
4090 * dyn_load.c (GC_register_dynamic_libraries,
4091 GC_register_main_static_data, GC_init_dyld): Likewise.
4092 * finalize.c (GC_push_finalizer_structures, GC_finalize,
4093 GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
4094 Likewise.
4095 * gcj_mlc.c (GC_core_gcj_malloc): Likewise.
4096 * headers.c (GC_find_header, GC_header_cache_miss,
4097 GC_scratch_alloc, GC_init_headers, GC_install_header,
4098 GC_install_counts, GC_remove_header, GC_remove_counts,
4099 GC_next_used_block, GC_prev_block): Likewise.
4100 * mach_dep.c (GC_with_callee_saves_pushed): Likewise.
4101 * malloc.c (GC_collect_or_expand, GC_alloc_large,
4102 GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
4103 GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Likewise.
4104 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
4105 * mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
4106 GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
4107 GC_clear_marks, GC_initiate_gc, GC_mark_some,
4108 GC_mark_stack_empty, GC_invalidate_mark_state,
4109 GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
4110 GC_mark_init, GC_push_all, GC_push_conditional,
4111 GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
4112 Likewise.
4113 * mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
4114 GC_exclude_static_roots_inner, GC_push_all_register_frames,
4115 GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
4116 GC_push_roots): Likewise.
4117 * misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
4118 Likewise.
4119 * new_hblk.c (GC_build_fl, GC_new_hblk): Likewise.
4120 * obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
4121 GC_initialize_offsets): Likewise.
4122 * os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
4123 GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
4124 GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
4125 GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
4126 GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
4127 GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
4128 GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
4129 GC_page_was_ever_dirty, GC_remove_protection,
4130 GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
4131 GC_save_callers, GC_print_callers): Likewise.
4132 * pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
4133 GC_start_world, GC_stop_init): Likewise.
4134 * pthread_support.c (GC_mark_thread_local_free_lists,
4135 GC_lookup_thread, GC_reset_finalizer_nested,
4136 GC_check_finalizer_nested, GC_segment_is_thread_stack,
4137 GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
4138 GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
4139 GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
4140 GC_wait_marker, GC_notify_all_marker): Likewise.
4141 * reclaim.c (GC_print_all_errors, GC_block_empty,
4142 GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
4143 GC_reclaim_all): Likewise.
4144 * thread_local_alloc.c (GC_init_thread_local,
4145 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4146 * win32_threads.c (GC_reset_finalizer_nested,
4147 GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
4148 GC_start_world, GC_push_all_stacks, GC_get_next_stack,
4149 GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
4150 GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
4151 GC_thr_init, GC_init_parallel, GC_lock,
4152 GC_mark_thread_local_free_lists): Likewise.
4153 * alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
4154 GC_traverse_back_graph): Use GC_INNER for the function prototype.
4155 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4156 Likewise.
4157 * dbg_mlc.c (GC_default_print_heap_obj_proc): Likewise.
4158 * dyn_load.c (GC_parse_map_entry, GC_get_maps,
4159 GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
4160 GC_get_next_stack): Likewise.
4161 * finalize.c (GC_reset_finalizer_nested,
4162 GC_check_finalizer_nested): Likewise.
4163 * gcj_mlc.c (GC_start_debugging): Likewise.
4164 * include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
4165 GC_has_other_debug_info, GC_store_debug_info): Likewise.
4166 * include/private/gc_hdrs.h (GC_header_cache_miss): Likewise.
4167 * include/private/gc_locks.h (GC_lock): Likewise.
4168 * include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
4169 GC_mark_from): Likewise.
4170 * include/private/pthread_support.h (GC_lookup_thread,
4171 GC_stop_init): Likewise.
4172 * include/private/thread_local_alloc.h (GC_init_thread_local,
4173 GC_destroy_thread_local, GC_mark_thread_local_fls_for): Likewise.
4174 * malloc.c (GC_extend_size_map, GC_text_mapping): Likewise.
4175 * mark.c (GC_page_was_ever_dirty): Likewise.
4176 * mark_rts.c (GC_mark_thread_local_free_lists): Likewise.
4177 * misc.c (GC_register_main_static_data, GC_init_win32,
4178 GC_setpagesize, GC_init_linux_data_start,
4179 GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
4180 GC_do_blocking_inner): Likewise.
4181 * os_dep.c (GC_greatest_stack_base_below): Likewise.
4182 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
4183 Likewise.
4184 * include/private/gc_priv.h: Likewise.
4185 * include/private/gc_priv.h (GC_INNER): Update the comment.
4186 * doc/README.macros (GC_DLL): Update.
4187
4188 * alloc.c (GC_collection_in_progress): Move the prototype to
4189 gc_priv.h.
4190 * gc_dlopen.c (GC_collection_in_progress): Likewise.
4191 * pthread_support.c (GC_collection_in_progress): Likewise.
4192 * misc.c (GC_init_parallel): Likewise.
4193 * pthread_support.c (GC_init_parallel): Likewise.
4194 * win32_threads.c (GC_init_parallel): Likewise.
4195 * darwin_stop_world.c (GC_thr_init): Likewise.
4196 * misc.c (GC_thr_init): Likewise.
4197 * pthread_stop_world.c (GC_thr_init): Likewise.
4198 * pthread_support.c (GC_thr_init): Likewise.
4199 * blacklst.c (GC_clear_bl, GC_copy_bl,
4200 GC_number_stack_black_listed): Make STATIC.
4201 * dbg_mlc.c (GC_print_obj, GC_make_closure,
4202 GC_debug_invoke_finalizer): Likewise.
4203 * malloc.c (GC_alloc_large_and_clear): Likewise.
4204 * mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
4205 GC_push_marked4, GC_push_marked, GC_push_next_marked,
4206 GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
4207 Likewise.
4208 * misc.c (GC_clear_stack_inner): Likewise.
4209 * os_dep.c (GC_repeat_read, GC_default_push_other_roots): Likewise.
4210 * darwin_stop_world.c (FindTopOfStack): Make static; define only
4211 if not DARWIN_DONT_PARSE_STACK.
4212 * dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
4213 * dyn_load.c (GC_repeat_read): Remove unused prototype.
4214 * include/private/gc_pmark.h (GC_find_start): Likewise.
4215 * misc.c (GC_read, GC_register_finalizer_no_order): Likewise.
4216 * dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
4217 THREADS).
4218 * dyn_load.c (GC_register_main_static_data): Define only if
4219 DYNAMIC_LOADING.
4220 * finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
4221 "return" statement.
4222 * gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
4223 GC_PTHREADS).
4224 * include/gc.h: Fix a typo.
4225 * include/gc_inline.h (GC_ASSERT): Define (if not defined) since
4226 the header is public.
4227 * include/gc_inline.h (GC_generic_malloc_many): New public
4228 function declaration.
4229 * mallocx.c (GC_generic_malloc_many): Make public.
4230 * include/private/gc_priv.h (GC_INNER): Use visibility attribute
4231 (if available).
4232 * include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
4233 * include/private/gc_priv.h: Include atomic_ops.h if THREADS and
4234 MPROTECT_VDB.
4235 * os_dep.c: Don't include atomic_ops.h
4236 * win32_threads.c: Likewise.
4237 * include/private/gc_priv.h (GC_push_selected, GC_push_regs,
4238 GC_push_marked, GC_number_stack_black_listed,
4239 GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
4240 GC_generic_malloc_many, GC_make_closure,
4241 GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
4242 Remove the prototype.
4243 * mark.c (GC_page_was_ever_dirty): Add prototype (only if
4244 PROC_VDB).
4245 * include/private/gc_priv.h (GC_push_next_marked_dirty,
4246 GC_push_next_marked, GC_push_next_marked_uncollectable): Move
4247 the prototype to mark.c.
4248 * include/private/gc_priv.h (GC_is_static_root): Declare only if
4249 not THREADS.
4250 * include/private/gc_priv.h (GC_free_inner): Declare only if
4251 THREADS.
4252 * include/private/gc_priv.h (GC_debug_free_inner): Declare only if
4253 THREADS and DBG_HDRS_ALL.
4254 * include/private/gc_priv.h (GC_markers): Declare GC_markers only
4255 if PARALLEL_MARK.
4256 * include/private/gc_priv.h (GC_register_main_static_data): Move
4257 the prototype to misc.c.
4258 * mach_dep.c (GC_push_regs): Make STATIC; define only along with
4259 HAVE_PUSH_REGS definition.
4260 * mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
4261 definition with the ANSI C one.
4262 * mark.c (GC_started_thread_while_stopped): Declared only if not
4263 GNU C.
4264 * win32_threads.c (GC_started_thread_while_stopped): Don't define
4265 if GNU C.
4266 * mark.c (GC_mark_from): Avoid unbalanced brackets in
4267 #if-#else-#endif blocks.
4268 * mark_rts.c (GC_is_static_root): Define only if not THREADS.
4269 * os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
4270 * os_dep.c (GC_page_was_ever_dirty): Comment out the function
4271 except for PROC_VDB.
4272 * tests/test.c (main): Don't reference GC_print_obj,
4273 GC_make_closure, GC_debug_invoke_finalizer,
4274 GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
4275 * thread_local_alloc.c: Don't include "gc_inline.h".
4276 * win32_threads.c (GC_write_fault_handler): Declare only if
4277 MPROTECT_VDB.
4278
4279 * allchblk.c (DEBUG): Remove macro (since unused).
4280 * allchblk.c: Include private/gc_priv.h before other includes and
4281 definitions.
4282 * alloc.c: Likewise.
4283 * gc_dlopen.c: Likewise.
4284 * headers.c: Likewise.
4285 * mallocx.c: Likewise.
4286 * mark_rts.c: Likewise.
4287 * new_hblk.c: Likewise.
4288 * reclaim.c: Likewise.
4289 * mark.c: Include private/gc_pmark.h before other includes.
4290 * misc.c: Likewise.
4291 * dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
4292 * pthread_support.c (_USING_POSIX4A_DRAFT10): Likewise.
4293 * pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
4294 already defined in gc_config_macros.h).
4295 * dyn_load.c (GC_init_dyld): Remove parameter cast for
4296 _dyld_register_func_for_add_image() and
4297 _dyld_register_func_for_remove_image(); add the comment about
4298 possible warnings; add FIXME for the deprecated
4299 _dyld_bind_fully_image_containing_address().
4300 * include/private/gc_priv.h: Include gc.h before the standard
4301 headers inclusion.
4302 * tests/test.c: Likewise.
4303 * include/private/gcconfig.h (DebugBreak): Update the comment.
4304 * typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
4305
4306 * configure.ac (openbsd): Define GC_OPENBSD_THREADS.
4307 * configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
4308 * configure.ac: Add sparc-openbsd case.
4309 * doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
4310 Document.
4311 * tests/test.c (main): Handle OpenBSD case.
4312 * include/private/pthread_stop_world.h: Likewise.
4313 * extra/threadlibs.c (main): Replace K&R-style function definition
4314 with the ANSI C one.
4315 * extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
4316 * dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
4317 * include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
4318 define it for OpenBSD.
4319 * include/gc_pthread_redirects.h (GC_pthread_sigmask,
4320 pthread_sigmask): Don't declare and redefine for OpenBSD.
4321 * include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
4322 amd64, powerpc).
4323 * mach_dep.c (NO_GETCONTEXT): Likewise.
4324 * include/private/pthread_stop_world.h (thread_stop_info): Don't
4325 define last_stop_count field if OpenBSD.
4326 * misc.c (GC_init_dyld): Add declaration (if NetBSD).
4327 * misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
4328 * os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
4329 * os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
4330 (only if OpenBSD).
4331 * os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
4332 GC_skip_hole_openbsd): New static function (only if OpenBSD).
4333 * os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
4334 GC_register_data_segments): Define specially for OpenBSD case.
4335 * os_dep.c (GC_fault_handler_lock): Initialize to
4336 AO_TS_INITIALIZER (instead of 0).
4337 * pthread_support.c (GC_allocate_lock): Likewise.
4338 * pthread_stop_world.c (NSIG, GC_print_sig_mask,
4339 GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
4340 GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
4341 GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
4342 GC_restart_handler): Don't define and use if OpenBSD.
4343 * pthread_stop_world.c (GC_suspend_all, GC_stop_world,
4344 GC_start_world): Handle OpenBSD case.
4345 * pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
4346 * pthread_support.c (pthread_sigmask): Don't undefine the macro and
4347 don't define the wrapper function if OpenBSD.
4348 * pthread_support.c (GC_thr_init): Handle OpenBSD case.
4349
4350 * dyn_load.c: Move the inclusion of private/gc_priv.h below
4351 definition of a feature macro (_GNU_SOURCE).
4352
4353 * include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
4354 * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
4355 (only if GC_I_HIDE_POINTERS).
4356 * backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
4357 * dbg_mlc.c (GC_get_back_ptr_info): Likewise.
4358 * finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
4359 GC_enqueue_all_finalizers): Likewise.
4360 * backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
4361 * finalize.c (GC_general_register_disappearing_link,
4362 GC_unregister_disappearing_link, GC_register_finalizer_inner,
4363 GC_finalize): Likewise.
4364 * include/private/dbg_mlc.h (HIDE_BACK_PTR): Likewise.
4365 * include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
4366 of I_HIDE_POINTERS.
4367 * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Likewise.
4368 * include/gc.h (_GC_H): Strip leading underscore.
4369 * include/gc_backptr.h (_GC_H): Likewise.
4370 * include/gc_gcj.h (_GC_H): Likewise.
4371 * include/gc_mark.h (_GC_H): Likewise.
4372 * include/gc_typed.h (_GC_TYPED_H, _GC_H): Likewise.
4373 * include/javaxfc.h (_GC_H): Likewise.
4374 * include/new_gc_alloc.h (__GC_SPECIALIZE): Likewise.
4375 * include/private/dbg_mlc.h (_GC_H): Likewise.
4376 * include/private/gc_priv.h (_GC_H): Likewise.
4377
4378 * gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
4379
4380 * include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
4381 variable definitions).
4382 * include/private/gc_priv.h (GC_EXTERN): Update the comment.
4383 * allchblk.c (GC_unmap_threshold): Define as GC_INNER.
4384 * alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
4385 GC_n_memory, GC_fail_count): Likewise.
4386 * blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Likewise.
4387 * gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Likewise.
4388 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4389 * mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
4390 GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
4391 GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
4392 GC_mark_no, GC_markers): Likewise.
4393 * mark_rts.c (GC_root_size, GC_push_typed_structures): Likewise.
4394 * misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
4395 GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
4396 GC_backtraces, GC_force_unmap_on_gcollect,
4397 GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
4398 GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Likewise.
4399 * os_dep.c (GC_page_size, GC_dont_query_stack_min,
4400 GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
4401 GC_dirty_maintained, GC_fault_handler_lock): Likewise.
4402 * pthread_support.c (GC_allocate_ml, GC_lock_holder,
4403 GC_need_to_lock, GC_thr_initialized, GC_threads,
4404 GC_in_thread_creation, GC_collecting, GC_allocate_lock,
4405 GC_mark_lock_holder): Likewise.
4406 * reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
4407 Likewise.
4408 * win32_threads.c (GC_allocate_ml, GC_lock_holder,
4409 GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Likewise.
4410 * extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
4411 * mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
4412
4413 * include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
4414 GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
4415 case (since they are not defined inside GC at present).
4416 * include/private/gc_priv.h (GC_objects_are_marked): Remove the
4417 declaration (since made static).
4418 * mark.c (GC_objects_are_marked): Define as STATIC.
4419 * win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
4420 Likewise.
4421 * mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
4422 to initialize GC_n_kinds).
4423 * win32_threads.c (start_mark_threads): Adjust the comment.
4424
4425 * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
4426 function.
4427 * backgraph.c (pop_in_progress, GC_apply_to_each_object): Likewise.
4428 * mark_rts.c (add_roots_to_index): Likewise.
4429
4430 * extra/gc.c: New file.
4431 * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
4432
4433 * misc.c (GC_log): Remove the declaration; move the definition (to
4434 the place where it is used); make STATIC.
4435 * misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
4436 to print open log failure.
4437 * misc.c (GC_write): Don't abort on open log failure if the GC is
4438 compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).
4439
4440 * include/private/gcconfig.h (USE_MMAP): Guard with ifndef.
4441
4442 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
4443 the variable declaration to gc_priv.h.
4444 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4445 GC_force_unmap_on_gcollect): Likewise.
4446 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4447 * finalize.c (GC_fail_count): Likewise.
4448 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4449 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Likewise.
4450 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4451 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4452 GC_mark_stack_too_small, GC_mark_state): Likewise.
4453 * include/private/pthread_support.h (GC_threads,
4454 GC_thr_initialized, GC_in_thread_creation): Likewise.
4455 * mallocx.c (GC_bytes_found): Likewise.
4456 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4457 * misc.c (GC_unmap_threshold): Likewise.
4458 * os_dep.c (GC_unmap_threshold): Likewise.
4459 * pthread_support.c (GC_markers): Likewise.
4460 * thread_local_alloc.c (GC_gcjobjfreelist,
4461 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4462 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4463 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4464 * include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
4465 a tag for now); defined after "gcconfig.h" inclusion.
4466 * include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
4467 keyword for most global variables.
4468 * alloc.c (GC_copyright): Add the comment about the symbol
4469 visibility.
4470 * finalize.c (GC_fo_entries): Likewise.
4471 * include/private/gc_priv.h (GC_print_stats): Likewise.
4472 * misc.c (GC_quiet): Likewise.
4473 * mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
4474 STATIC.
4475 * pthread_support.c (GC_threads): Add explicit zero initializer
4476 (to make the variable definition differ from the declaration).
4477
4478 * backgraph.c (GC_quiet): Remove the declaration (not needed
4479 anymore since gc_priv.h is always included).
4480 * checksums.c (GC_quiet): Likewise.
4481 * gcj_mlc.c (GC_quiet): Likewise.
4482 * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
4483 comment.
4484 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4485 GC_hdr_cache_misses): Likewise.
4486 * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
4487 * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
4488 Likewise.
4489 * win32_threads.c (GC_please_stop, GC_max_thread_index,
4490 GC_mark_mutex_waitcnt): Likewise.
4491
4492 * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
4493 'D') in the name.
4494
4495 * gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
4496 redirection is turned off; turn it on later when dlopen real
4497 symbol is no longer needed (according to the comment and the same
4498 as in dyn_load.c).
4499 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
4500 REAL_DLFUNC, respectively (to have unique names since the
4501 definitions may differ from that of the similar ones in
4502 pthread_support.c).
4503 * mark.c (source): Undefine the macro when no longer needed.
4504 * os_dep.c (handler): Rename the type to GC_fault_handler_t (to
4505 have the unique name across the project).
4506 * os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
4507 comment.
4508 * pthread_support.c (STAT_BUF_SIZE, STAT_READ): Likewise.
4509 * os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
4510 longer needed.
4511
4512 * pthread_stop_world.c (pthread_sigmask): Undefine before using
4513 in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
4514 * win32_threads.c (dlopen, _beginthread): Don't undefine (since
4515 neither redirected nor used here).
4516 * win32_threads.c (GC_Thread_Rep): Rename "table_management" to
4517 "tm" for short; remove "tm_" prefix.
4518 * win32_threads.c (in_use, next): Don't define the macros; use
4519 tm.in_use and tm.next fields, respectively (to ease debugging).
4520 * win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
4521 unique name across the project).
4522
4523 * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
4524 inclusion.
4525 * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
4526 not included yet.
4527 * finalize.c (I_HIDE_POINTERS): Don't define.
4528 * include/private/dbg_mlc.h (I_HIDE_POINTERS): Likewise.
4529 * misc.c (I_HIDE_POINTERS): Likewise.
4530 * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
4531 GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
4532 * include/private/gc_pmark.h: Remove the comment about gc_priv.h
4533 inclusion order.
4534
4535 * dyn_load.c: Include gc_priv.h before using configuration
4536 information (MACOS).
4537 * dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
4538 GC_MUST_RESTORE_REDEFINED_DLOPEN.
4539
4540 * backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
4541 properly.
4542 * darwin_stop_world.c: Replace "if DEBUG_THREADS" with
4543 "ifdef DEBUG_THREADS".
4544 * pthread_stop_world.c: Likewise.
4545 * pthread_support.c: Likewise.
4546 * include/gc_inline.h: Guard with GC_INLINE_H.
4547
4548 * alloc.c (GC_copyright): Define as const.
4549 * alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
4550 (since the name starts with "GC_" prefix).
4551 * dbg_mlc.c (GC_describe_type_fns): Likewise.
4552 * dyn_load.c (GC_FirstDLOpenedLinkMap,
4553 GC_register_dynlib_callback, GC_dyld_sections,
4554 GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
4555 Likewise.
4556 * malloc.c (GC_libpthread_start, GC_libpthread_end,
4557 GC_libld_start, GC_libld_end): Likewise.
4558 * mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
4559 Likewise.
4560 * os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
4561 GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
4562 GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
4563 GC_forward_exception): Likewise.
4564 * pthread_support.c (GC_syms_initialized): Likewise.
4565 * typd_mlc.c (GC_push_typed_structures_proc): Likewise.
4566 * win32_threads.c (GC_win32_dll_threads,
4567 GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
4568 GC_waitForSingleObjectInfinite): Likewise.
4569 * darwin_stop_world.c (GC_use_mach_handler_thread,
4570 GC_use_mach_handler_thread, GC_mach_threads_count): Replace
4571 "static" with "STATIC" and add zero initializer.
4572 * os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
4573 GC_sigbus_count): Likewise.
4574 * headers.c (free_hdr): Replace "static" with GC_INLINE.
4575 * misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
4576 * os_dep.c (memory): Rename static variable to ecos_gc_memory.
4577 * os_dep.c (async_set_pht_entry_from_index): Make static (for
4578 MPROTECT_VDB case).
4579 * pthread_support.c (GC_real_pthread_create,
4580 GC_real_pthread_sigmask, GC_real_pthread_join,
4581 GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
4582 for static GC_real_XXX symbols.
4583 * win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.
4584
4585 * alloc.c (GC_finish_collection): Replace getenv() with GETENV().
4586 * dyn_load.c (GC_init_dyld): Likewise.
4587 * os_dep.c (GC_print_callers): Likewise.
4588 * dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
4589 result (since it's always of "struct mach_header" type).
4590 * dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
4591 GC_dyld_image_remove (to always have the first argument of
4592 "struct mach_header" pointer type).
4593
4594 * configure.ac: Add threads support for OpenBSD case (threads may
4595 not work correctly for it).
4596
4597 * acinclude.m4: Rename to m4/gc_set_version.m4.
4598 * m4/libtool.m4: Delete the file.
4599 * m4/lt~obsolete.m4: Likewise.
4600 * m4/ltoptions.m4: Likewise.
4601 * m4/ltsugar.m4: Likewise.
4602 * m4/ltversion.m4: Likewise.
4603
4604 * include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
4605 x86mingw32ce toolchain to workaround the incorrect DebugBreak()
4606 declaration in winbase.h (the workaround would turn into a no-op
4607 when DebugBreak() will be defined as a macro in the toolchain).
4608
4609 * include/private/gcconfig.h: Recognize __i386__ if WinCE (for
4610 x86mingw32ce toolchain).
4611 * include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
4612 toolchain (or if already defined).
4613 * include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
4614 defined for WinCE or if NO_GETENV is defined).
4615 * misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
4616 NO_GETENV one.
4617
4618 * configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
4619 * Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
4620 * libtool.m4: Remove.
4621 * m4/libtool.m4: New file (generated).
4622 * m4/lt~obsolete.m4: Likewise.
4623 * m4/ltoptions.m4: Likewise.
4624 * m4/ltsugar.m4: Likewise.
4625 * m4/ltversion.m4: Likewise.
4626
4627 * include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
4628 prefix GC_CreateThread and GC_ExitThread with '_' if defined.
4629 * doc/README.macros (GC_UNDERSCORE_STDCALL): Document.
4630
4631 * alloc.c (GC_collect_or_expand): Add "retry" argument; add the
4632 comments; don't use "default" stop_func on a retry if
4633 GC_dont_expand.
4634 * alloc.c (GC_allocobj): Pass "retry" argument to
4635 GC_collect_or_expand().
4636 * malloc.c (GC_alloc_large): Likewise.
4637 * include/private/gc_priv.h (GC_collect_or_expand): Move the
4638 declaration to malloc.c; add "retry" argument.
4639
4640 * alloc.c (GC_start_call_back): Move the variable definition from
4641 misc.c.
4642 * include/private/gc_priv.h (GC_start_call_back): Remove the
4643 declaration.
4644 * alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
4645 * alloc.c (GC_try_to_collect_inner): Also call stop_func at the
4646 beginning of the function.
4647 * include/gc.h (GC_try_to_collect): Refine the comment about
4648 stop_func.
4649
4650 * alloc.c (GC_default_stop_func, GC_try_to_collect_general,
4651 GC_gcollect): Add the comment.
4652 * alloc.c (GC_try_to_collect_general): Move the assertion on
4653 stop_func != 0 to GC_try_to_collect().
4654 * alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
4655 GC_default_stop_func instead (holding the lock).
4656 * alloc.c (GC_gcollect): Pass 0 as stop_func instead of
4657 GC_default_stop_func (to prevent data races).
4658
4659 * Makefile.direct: Move "define arguments" documentation to
4660 doc/README.macros; add reference to doc/README.macros.
4661 * Makefile.dj: Change the documentation reference to
4662 doc/README.macros.
4663 * README.QUICK: Likewise.
4664 * configure.ac: Likewise.
4665 * allchblk.c: Remove unnecessary "-D" from the comment.
4666 * doc/README.macros: Likewise.
4667 * README.environment: Likewise.
4668 * include/gc.h: Likewise.
4669 * include/gc_inline.h: Likewise.
4670 * include/private/gcconfig.h: Likewise.
4671 * README.QUICK: Fix a typo.
4672
4673 * misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
4674 CreateFile(); don't immediately flush every write if very verbose.
4675
4676 * doc/README.win32: Replace ".exe.log" to ".gc.log".
4677 * doc/README.win64: Likewise.
4678 * doc/README.win64: Fix a typo.
4679 * misc.c (GC_CreateLogFile): Strip executable file extension for
4680 the log file; use ".gc.log" extension (instead of ".log").
4681
4682 * include/gc_config_macros.h: Avoid the redefinition of
4683 GC_xxx_THREADS macros.
4684
4685 * alloc.c (GC_try_to_collect_general): Change the type of "result"
4686 local variable to GC_bool.
4687
4688 * include/gc_config_macros.h: Use old behavior for FreeBSD and
4689 NetBSD platform detection code (check that other GC_xxx_THREADS
4690 are undefined); add FIXME.
4691
4692 * include/gc_config_macros.h: Rearrange the platform detection
4693 code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
4694 GC_THREADS first if GC_XXX_THREADS already set; define proper
4695 GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
4696 place; define _REENTRANT if posix threads except for Win32).
4697
4698 * alloc.c (GC_try_to_collect_general): New function (move the code
4699 from GC_try_to_collect, pass force_unmap argument).
4700 * alloc.c (GC_try_to_collect, GC_gcollect): Call
4701 GC_try_to_collect_general().
4702 * alloc.c (GC_gcollect_and_unmap): New public function.
4703 * include/gc.h (GC_gcollect_and_unmap): New function declaration.
4704 * tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
4705 WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
4706 and GC_gcollect()).
4707
4708 * include/gc.h (GC_allow_register_threads, GC_register_my_thread,
4709 GC_unregister_my_thread, GC_malloc_many): Refine the comment.
4710 * include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
4711 (that is, don't depend on GC_THREADS macro).
4712 * include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
4713 with a check for GC_PTHREADS (since the former implies the
4714 latter).
4715
4716 * include/gc.h (GC_SOLARIS_THREADS): Don't check for.
4717 * include/gc.h (GC_MIN, GC_MAX): Don't define.
4718 * mallocx.c (GC_malloc_many): Add comment to #endif.
4719
4720 * configure.ac: Drop the subdir-objects Automake option, since
4721 it's incompatible with picking source files from libatomic_ops.
4722
4723 * allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
4724 "extern" keyword to a global variable declaration (some compilers
4725 require it).
4726 * alloc.c (GC_bytes_found, GC_unmap_threshold,
4727 GC_force_unmap_on_gcollect): Likewise.
4728 * dyn_load.c (GC_no_win32_dlls, GC_wnt): Likewise.
4729 * finalize.c (GC_fail_count): Likewise.
4730 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4731 GC_hdr_cache_misses): Likewise.
4732 * mallocx.c (GC_bytes_found): Likewise.
4733 * mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Likewise.
4734 * misc.c (GC_unmap_threshold): Likewise.
4735 * os_dep.c (GC_unmap_threshold, GC_old_allocator): Likewise.
4736 * pthread_support.c (GC_markers): Likewise.
4737 * thread_local_alloc.c (GC_gcjobjfreelist,
4738 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4739 * win32_threads.c (GC_fault_handler_lock, GC_write_cs,
4740 GC_dont_query_stack_min, GC_markers, GC_wnt): Likewise.
4741
4742 * tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
4743 suppress misleading GC "Out of Memory!" warning printed on every
4744 GC_MALLOC(LONG_MAX) call.
4745 * tests/huge_test.c: Include "gc.h" instead of <gc.h>.
4746 * tests/huge_test.c (main): Replace K&R-style function definition
4747 with the ANSI C one.
4748
4749 * dyn_load.c (GC_register_dynamic_libraries): Always use
4750 lpMaximumApplicationAddress value for WinCE (even for old
4751 versions).
4752 * os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
4753 * os_dep.c (GC_dont_query_stack_min): New global variable (only if
4754 WinCE and THREADS).
4755 * os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
4756 for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
4757 GC_dont_query_stack_min for older WinCE (prior to version 5).
4758 * win32_threads.c (GC_dont_query_stack_min): Declare.
4759 * win32_threads.c (GC_get_stack_min): Rename the macro to
4760 GC_wince_evaluate_stack_min for WinCE; update the comment.
4761 * win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
4762 GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
4763 WinCE and don't update thread's last_stack_min value (only if
4764 GC_dont_query_stack_min).
4765 * win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
4766 GC_dont_query_stack_min (since the evaluated stack_min value may
4767 be incorrect if the stack is bigger than 64 KiB).
4768
4769 * gc_dlopen.c (GC_dlopen): Add function redirector (only if
4770 GC_USE_LD_WRAP).
4771 * include/gc.h: Include "gc_pthread_redirects.h" even if
4772 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4773 * include/gc_pthread_redirects.h (GC_PTHREAD_REDIRECTS_H): Don't
4774 define and check for (since included only from gc.h).
4775 * include/gc_pthread_redirects.h: Declare "GC_" symbols even if
4776 GC_USE_LD_WRAP or GC_NO_THREAD_REDIRECTS.
4777 * include/gc_pthread_redirects.h: Include signal.h only to get
4778 sigset_t definition.
4779
4780 * Makefile.direct: Document GC_REGISTER_MEM_PRIVATE.
4781 * mark_rts.c (GC_is_tmp_root): Define also for WinCE unless
4782 NO_DEBUGGING (that is, replace _WIN32_WCE_EMULATION with MSWINCE).
4783 * os_dep.c (GC_sysinfo): Remove explicit global variable
4784 initialization to "{0}" (revert back the previous change) since it
4785 might produce a warning.
4786
4787 * allchblk.c (GC_large_alloc_warn_interval): Move declaration from
4788 gc_priv.h.
4789 * allchblk.c (GC_large_alloc_warn_suppressed): Move definition
4790 from misc.c; define as STATIC.
4791 * include/private/gc_priv.h (GC_large_alloc_warn_interval,
4792 GC_large_alloc_warn_suppressed): Remove declaration.
4793 * alloc.c (GC_bytes_found): Add "defined in" comment.
4794 * mallocx.c (GC_bytes_found): Likewise.
4795 * misc.c (GC_unmap_threshold): Likewise.
4796 * os_dep.c (GC_old_allocator): Likewise.
4797 * pthread_support.c (GC_markers): Likewise.
4798 * thread_local_alloc.c (GC_gcjobjfreelist,
4799 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4800 * win32_threads.c (GC_markers): Likewise.
4801 * alloc.c (GC_start_time): Explicitly initialize to 0 or NULL (to
4802 be distinctive from a variable declaration).
4803 * backgraph.c (GC_max_height, GC_deepest_obj): Likewise.
4804 * blacklst.c (GC_old_normal_bl, GC_incomplete_normal_bl,
4805 GC_old_stack_bl, GC_incomplete_stack_bl): Likewise.
4806 * checksums.c (GC_faulted, GC_n_dirty_errors,
4807 GC_n_faulted_dirty_errors, GC_n_changed_errors, GC_n_clean,
4808 GC_n_dirty, GC_bytes_in_used_blocks): Likewise.
4809 * dbg_mlc.c (GC_smashed): Likewise.
4810 * finalize.c (GC_old_dl_entries): Likewise.
4811 * gcj_mlc.c (GC_gcj_kind, GC_gcj_debug_kind, GC_gcjobjfreelist,
4812 GC_gcjdebugobjfreelist): Likewise.
4813 * mach_dep.c (GC_save_regs_ret_val): Likewise.
4814 * mark.c (GC_n_rescuing_pages, GC_mark_stack, GC_mark_stack_limit,
4815 GC_mark_stack_top): Likewise.
4816 * misc.c (GC_min_sp, GC_high_water, GC_bytes_allocd_at_reset):
4817 Likewise.
4818 * os_dep.c (GC_data_start, GC_page_size, GC_sysinfo,
4819 GC_old_segv_handler, GC_old_bus_handler,
4820 GC_old_bus_handler_used_si, GC_old_segv_handler_used_si,
4821 GC_proc_buf, GC_proc_fd, GC_vd_base): Likewise.
4822 * pthread_stop_world.c (GC_stop_count, GC_stopping_pid): Likewise.
4823 * reclaim.c (GC_leaked): Likewise.
4824 * typd_mlc.c (GC_explicit_kind, GC_array_kind, GC_ext_descriptors,
4825 GC_typed_mark_proc_index, GC_array_mark_proc_index,
4826 GC_eobjfreelist, GC_arobjfreelist): Likewise.
4827 * win32_threads.c (GC_pthread_map_cache, GC_marker_cv,
4828 GC_marker_Id): Likewise.
4829 * dbg_mlc.c (GC_smashed, GC_n_smashed): Define as STATIC.
4830 * gcj_mlc.c (GC_gcjdebugobjfreelist): Likewise.
4831 * os_dep.c (GC_vd_base): Likewise.
4832 * pthread_support.c (GC_mark_threads): Likewise.
4833 * reclaim.c (GC_leaked): Likewise.
4834 * typd_mlc.c (GC_bm_table): Likewise.
4835 * mark_rts.c (GC_save_regs_ret_val): Change declaration type to
4836 that of definition; add "defined in" comment.
4837 * mark_rts.c (GC_push_current_stack): Remove unnecessary cast for
4838 GC_save_regs_ret_val.
4839 * misc.c (GC_check_heap, GC_print_all_smashed,
4840 GC_start_call_back): Remove unnecessary cast (of 0).
4841 * misc.c (GC_LARGE_ALLOC_WARN_INTERVAL): New tuning macro.
4842 * misc.c (GC_large_alloc_warn_interval): Initialize to
4843 GC_LARGE_ALLOC_WARN_INTERVAL value.
4844 * misc.c (GC_tmp): Change to "static".
4845 * os_dep.c (GC_mprotect_state): Define as static.
4846 * pthread_support.c (dummy_thread_local): Prefix with "GC_".
4847 * win32_threads.c (WinMain): Remove FIXME for WinCE.
4848
4849 * os_dep.c (PROTECT, UNPROTECT): Use distinct ABORT messages.
4850
4851 * configure.ac: Rewrite the tests for external or internal
4852 libatomic_ops.
4853 * configure.ac: In particular, drop the symbolic links. Add option
4854 --with-libatomic-ops for forced selection.
4855 * Makefile.am: Adjust the path of source files from libatomic_ops
4856 to not use the links.
4857 * Makefile.am (libgc_la_LIBADD): Add $(ATOMIC_OPS_LIBS). This will
4858 be empty if we use the bundled AO sources.
4859
4860 * Makefile.am: Strip version suffix for libatomic_ops directory.
4861 * build_atomic_ops.sh: Likewise.
4862 * build_atomic_ops.sh.cygwin: Likewise.
4863 * configure_atomic_ops.sh: Likewise.
4864 * Makefile.direct: Remove AO_VERSION definition; strip version
4865 suffix for libatomic_ops directory.
4866 * NT_STATIC_THREADS_MAKEFILE: Likewise.
4867 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
4868 * NT_X64_THREADS_MAKEFILE: Likewise.
4869 * gc.mak: Likewise.
4870
4871 * libatomic_ops: Rename from "libatomic_ops-1.2".
4872
4873 * alloc.c (GC_version): Add "const" keyword.
4874 * alloc.c (GC_get_version): New public function.
4875 * include/gc.h (GC_get_version): New function declaration; update
4876 the comment for the GC version.
4877
4878 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4879 GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Use "extern"
4880 (for the global variable declaration) again.
4881 * include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
4882 GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
4883 GC_mark_stack_too_small, GC_mark_state): Likewise.
4884 * include/private/gcconfig.h (GC_register_stackbottom): Likewise.
4885 * include/private/pthread_support.h (GC_threads,
4886 GC_thr_initialized, GC_in_thread_creation): Likewise.
4887 * include/private/gc_priv.h: Likewise.
4888
4889 * real_malloc.c: Include private/config.h if HAVE_CONFIG_H.
4890
4891 * allchblk.c (GC_hblkfreelist): Define as STATIC.
4892 * blacklst.c (GC_total_stack_black_listed): Likewise.
4893 * include/private/gc_priv.h (GC_hblkfreelist, GC_stopped_mark,
4894 GC_total_stack_black_listed, GC_push_stubborn_structures): Remove
4895 declaration.
4896 * mark_rts.c (GC_stopped_mark): Add declaration (only if
4897 THREAD_LOCAL_ALLOC).
4898 * allchblk.c (GC_fail_count): Move the declaration out of
4899 GC_allochblk_nth(); remove "extern".
4900 * alloc.c (IF_THREADS): Remove unused macro.
4901 * alloc.c (GC_world_stopped): Define only if THREAD_LOCAL_ALLOC.
4902 * alloc.c (GC_stopped_mark): Set GC_world_stopped value only if
4903 THREAD_LOCAL_ALLOC.
4904 * alloc.c (GC_bytes_found, GC_collection_in_progress,
4905 GC_check_tls, GC_unmap_threshold, GC_force_unmap_on_gcollect):
4906 Remove K&R-style "extern" for the declaration.
4907 * dbg_mlc.c (GC_free_inner): Likewise.
4908 * dyn_load.c (GC_repeat_read, GC_roots_present, GC_is_heap_base,
4909 GC_get_next_stack, GC_no_win32_dlls, GC_wnt): Likewise.
4910 * finalize.c (GC_fail_count): Likewise.
4911 * include/private/gc_hdrs.h (GC_hdr_cache_hits,
4912 GC_hdr_cache_misses): Likewise.
4913 * include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
4914 GC_lock, GC_collecting, GC_mark_lock_holder, GC_need_to_lock):
4915 Likewise.
4916 * include/private/gc_pmark.h (GC_mark_procs, GC_n_mark_procs,
4917 GC_mark_stack_size, GC_mark_stack_limit, GC_mark_stack_top,
4918 GC_mark_stack, GC_mark_stack_too_small, GC_mark_state): Likewise.
4919 * include/private/gc_priv.h (GC_current_warn_proc, GC_obj_kinds,
4920 GC_n_kinds, GC_fo_entries, GC_n_heap_sects, GC_n_memory,
4921 GC_page_size, GC_sysinfo, GC_black_list_spacing,
4922 GC_objects_are_marked, GC_incremental, GC_dirty_maintained,
4923 GC_root_size, GC_debugging_started, GC_large_alloc_warn_interval,
4924 GC_large_alloc_warn_suppressed, GC_blocked_sp,
4925 GC_activation_frame, GC_push_other_roots,
4926 GC_push_finalizer_structures, GC_push_thread_structures,
4927 GC_push_typed_structures, GC_start_call_back, GC_is_initialized,
4928 GC_check_heap, GC_print_all_smashed, GC_print_all_errors,
4929 GC_print_heap_obj, GC_have_errors, GC_print_stats,
4930 GC_dump_regularly, GC_backtraces, GC_print_back_height,
4931 GC_debug_generic_malloc_inner,
4932 GC_debug_generic_malloc_inner_ignore_off_page,
4933 GC_fl_builder_count, GC_mark_no, GC_help_marker,
4934 GC_setup_temporary_fault_handler, GC_reset_fault_handler): Likewise.
4935 * include/private/gcconfig.h (GC_SysVGetDataStart,
4936 GC_FreeBSDGetDataStart, GC_register_stackbottom,
4937 GC_MacTemporaryNewPtr, GC_amiga_get_mem): Likewise.
4938 * include/private/pthread_support.h (GC_threads,
4939 GC_thr_initialized, GC_in_thread_creation): Likewise.
4940 * malloc.c (GC_text_mapping): Likewise.
4941 * mallocx.c (GC_bytes_found): Likewise.
4942 * mark.c (GC_check_dirty, GC_started_thread_while_stopped): Likewise.
4943 * mark_rts.c (GC_save_regs_ret_val): Likewise.
4944 * misc.c (GC_clear_stack_inner, GC_init_parallel, GC_init_win32,
4945 GC_setpagesize, GC_init_linux_data_start,
4946 GC_set_and_save_fault_handler, GC_unmap_threshold): Likewise.
4947 * os_dep.c (GC_unmap_threshold, GC_push_all_stacks,
4948 GC_darwin_register_mach_handler_thread): Likewise.
4949 * pthread_support.c (GC_markers, GC_collection_in_progress):
4950 Likewise.
4951 * tests/test.c (GC_amiga_free_all_mem): Likewise.
4952 * thread_local_alloc.c (GC_gcjobjfreelist,
4953 GC_gcj_malloc_initialized, GC_gcj_kind): Likewise.
4954 * win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init,
4955 GC_fault_handler_lock, GC_write_cs, GC_markers): Likewise.
4956 * misc.c (GC_read, GC_register_finalizer_no_order, GC_init_dyld):
4957 Move the declaration out of GC_init(); remove "extern".
4958 * os_dep.c (GC_abort): Add the comment; add workaround to suppress
4959 compiler "unreachable code" warnings for ABORT callers (where
4960 ABORT is followed by a dummy return statement).
4961 * os_dep.c (GC_old_allocator): Move the declaration out of
4962 GC_default_push_other_roots(); remove "extern".
4963 * darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
4964 Move the declaration out of GC_stop_world() and GC_start_world()
4965 (only if MPROTECT_VDB); remove "extern".
4966
4967 * win32_threads.c (GC_get_stack_min, GC_push_stack_for,
4968 GC_get_next_stack): Recognize _WIN32_WCE_EMULATION macro (used for
4969 WinCE emulation and for custom WinCE 6 devices); add the comment.
4970 * win32_threads.c (GC_get_stack_min): Cast pointer to word instead
4971 of DWORD.
4972 * win32_threads.c (GC_get_next_stack): Don't use and maintain the
4973 latest known stack_min value for WinCE (if GC_get_stack_min is
4974 defined as a macro); update the comments.
4975 * win32_threads.c (GC_wnt): Don't declare for WinCE.
4976
4977 * Makefile.direct: Document EMPTY_GETENV_RESULTS.
4978 * gcj_mlc.c (GC_clear_stack): Remove declaration.
4979 * malloc.c (GC_clear_stack): Likewise.
4980 * mallocx.c (GC_clear_stack): Likewise.
4981 * typd_mlc.c (GC_clear_stack): Likewise.
4982 * gcj_mlc.c (GENERAL_MALLOC, GENERAL_MALLOC_IOP): Rename to
4983 GENERAL_MALLOC_INNER and GENERAL_MALLOC_INNER_IOP, respectively;
4984 remove "lb" unnecessary cast to word.
4985 * include/private/gc_priv.h (GC_clear_stack): Add declaration.
4986 * include/private/gc_priv.h (GENERAL_MALLOC, GENERAL_MALLOC_IOP):
4987 Move common declaration from typd_mlc.c and malloc.c; remove
4988 unnecessary result and "lb" parameter casts.
4989 * include/private/thread_local_alloc.h: Guard against duplicate
4990 header file inclusion.
4991 * os_dep.c (USE_MUNMAP): Replace "-->" with an error directive for
4992 the case when USE_MMAP is not defined.
4993 * pthread_support.c (GC_is_thread_tsd_valid): New internal
4994 function (only if GC_ASSERTIONS and THREAD_LOCAL_ALLOC); move the
4995 code from thread-local GC_malloc(); add FIXME for the condition.
4996 * win32_threads.c (GC_is_thread_tsd_valid): Likewise.
4997 * thread_local_alloc.c (GC_gcjobjfreelist): Change the type (to
4998 match that of its definition).
4999 * thread_local_alloc.c (GC_destroy_thread_local): Add a cast for
5000 GC_gcjobjfreelist.
5001 * thread_local_alloc.c (GC_lookup_thread, GC_lookup_thread_inner):
5002 Remove unused declaration; don't include pthread.h.
5003 * thread_local_alloc.c (GC_is_thread_tsd_valid): New declaration
5004 (only if GC_ASSERTIONS).
5005 * thread_local_alloc.c (GC_malloc): Use GC_is_thread_tsd_valid()
5006 instead of GC_lookup_thread().
5007 * win32_threads.c (GC_lookup_thread_inner): Define as STATIC.
5008 * win32_threads.c (UNPROTECT): Rename to UNPROTECT_THREAD (to have
5009 id different from that in os_dep.c).
5010
5011 * allchblk.c (GC_enough_large_bytes_left): Replace "inline static"
5012 with GC_INLINE.
5013 * include/private/gc_priv.h (fixed_getenv): Likewise.
5014 * alloc.c (GC_max, GC_min): Replace "static INLINE" with
5015 GC_INLINE.
5016 * mark_rts.c (rt_hash): Likewise.
5017 * win32_threads.c (GC_get_max_thread_index): Likewise.
5018 * include/private/gc_priv.h (INLINE): Prefix with "GC_"; include
5019 "static"; define for Sun CC; define for VC++ (and other
5020 compilers).
5021 * pthread_support.c: Don't define __inline__ for non-GNU compilers
5022 (not needed anymore).
5023
5024 * NT_THREADS_MAKEFILE: Remove file (since it duplicates gc.mak).
5025 * Makefile.in: Remove reference to NT_THREADS_MAKEFILE.
5026 * Makefile.am: Likewise.
5027 * Makefile.dj: Likewise.
5028 * Makefile.direct: Likewise.
5029 * doc/README.win32: Add reference to gc.mak.
5030 * NT_X64_THREADS_MAKEFILE: Likewise.
5031
5032 * Makefile.direct: Remove references to acinclude.m4, libtool.m4.
5033
5034 * autogen.sh: Update.
5035
5036 * Makefile.am: Don't add libtool.m4 to EXTRA_DIST.
5037 * acinclude.m4: Fix underquoting of GC_SET_VERSION.
5038 * README.QUICK: Update information for Makefile.
5039 * Makefile.am: Do not distribute the substituted bdw-gc.pc.
5040 * configure.ac: Add AM conditional analog to KEEP_BACK_PTRS.
5041 * tests/tests.am: Use it here to conditionally enable tracetest
5042 when possible.
5043
5044 * dyn_load.c (GC_wnt): Update the comment.
5045 * dyn_load.c (GC_register_dynamic_libraries): Add the comment for
5046 _WIN32_WCE_EMULATION; recognize GC_REGISTER_MEM_PRIVATE (new
5047 macro); call GC_is_heap_base() only if check for Type succeeded.
5048
5049 * mark_rts.c (GC_is_tmp_root): Don't define unless NO_DEBUGGING;
5050 update the comment.
5051 * include/private/gc_priv.h (GC_is_tmp_root): Remove declaration.
5052
5053 * include/private/gcconfig.h (CANCEL_SAFE, IF_CANCEL): new macros.
5054 * include/private/gc_priv.h (DISABLE_CANCEL, RESTORE_CANCEL,
5055 ASSERT_CANCEL_DISABLED): New macros.
5056 * alloc.c (GC_maybe_gc): Assert cancellation disabled.
5057 (GC_collect_a_little_inner,GC_try_to_collect, GC_collect_or_expand):
5058 Disable cancellation.
5059 (GC_add_to_our_memory): Check for overflow.
5060 * misc.c (GC_cancel_disable_count): declare.
5061 (GC_init, GC_write): Disable cancellation.
5062 (GC_init): Remove redundant GC_is_initialized test.
5063 * os_dep.c (GC_repeat_read): Assert cancellation disabled.
5064 (GC_get_stack_base): Disable cancellation.
5065 * pthread_stop_world.c (GC_suspend_handler_inner): Disable
5066 cancellation.
5067 * pthread_support.c (GC_mark_thread): Permanently disable
5068 cancellation.
5069 (GC_wait_for_gc_completion, GC_wait_builder, GC_wait_marker):
5070 Assert cancellation disabled.
5071 (fork handling): Disable cancellation, fix comment.
5072 (GC_pthread_create): Disable cancellation.
5073 (GC_unregister_my_thread): Disable cancellation.
5074 * Makefile.direct: Document NO_CANCEL_SAFE.
5075
5076 * Makefile: Remove outdated file (Makefile.direct should be used
5077 instead).
5078
5079 * include/gc.h (GC_use_DllMain): Refine the comment.
5080
5081 * configure.ac: Add documentation to AC_DEFINE for GC_THREADS and
5082 EMPTY_GETENV_RESULTS.
5083 * configure.ac: Fix a typo.
5084 * Makefile.am: Likewise.
5085
5086 * checksums.c (GC_checksum, GC_update_check_page): Remove
5087 "register" keyword in local variable declarations (for the code
5088 used only for debugging or which is not time-critical).
5089 * dbg_mlc.c (GC_has_other_debug_info, GC_store_debug_info,
5090 GC_store_debug_info_inner, GC_check_annotated_obj, GC_print_obj,
5091 GC_print_smashed_obj, GC_debug_end_stubborn_change,
5092 GC_debug_invoke_finalizer): Likewise.
5093 * dyn_load.c (GC_register_dynamic_libraries): Likewise.
5094 * mallocx.c (GC_realloc): Likewise.
5095 * mark_rts.c (GC_print_static_roots, GC_is_static_root,
5096 GC_clear_roots): Likewise.
5097 * misc.c (GC_write): Likewise.
5098 * os_dep.c (GC_print_callers): Likewise.
5099 * dyn_load.c (GC_register_dynamic_libraries): Rename "i" local
5100 variable to "j" for the nested loop (just not to hide the similar
5101 variable in the outer one).
5102 * mark_rts.c (GC_print_static_roots): Output an error message
5103 using GC_err_printf() (instead of GC_printf()).
5104
5105 * configure.ac: Move include flag from ${INCLUDE} ...
5106 * Makefile.am: ... to AM_CPPFLAGS and also add the build directory.
5107 * configure.ac: Call AM_CONFIG_HEADER([include/private/config.h]).
5108 * configure.ac: Add documentation to all AC_DEFINE either directly
5109 or using AH_TEMPLATE.
5110
5111 * win32_threads.c (GC_waitForSingleObjectInfinite): New static
5112 function (only if GC_WINMAIN_REDIRECT).
5113 * win32_threads.c (WinMain): Call GC_waitForSingleObjectInfinite()
5114 thru GC_do_blocking() instead of calling WaitForSingleObject()
5115 directly.
5116
5117 * pthread_support.c (start_mark_threads): Refine printed message.
5118 * win32_threads.c (GC_thr_init): Likewise.
5119
5120 * Makefile.direct (GC_WINMAIN_REDIRECT): Add the comment for.
5121 * Makefile.direct (NO_GETENV): Update the comment.
5122 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): Remove macro.
5123 * include/gc.h (GC_WinMain): Remove declaration.
5124 * include/gc.h (WinMain): Define (as GC_WinMain) if and only if
5125 GC_WINMAIN_REDIRECT.
5126 * tests/test.c (GC_COND_INIT): Define as GC_INIT() also in case of
5127 WinCE target unless GC_WINMAIN_REDIRECT is defined.
5128 * tests/test.c (WINMAIN_LPTSTR): New macro.
5129 * tests/test.c (WinMain): Use WINMAIN_LPTSTR instead of LP[W]STR
5130 and GC_WINMAIN_WINCE_LPTSTR.
5131 * win32_threads.c (start_mark_threads): Add the comment for
5132 MARK_THREAD_STACK_SIZE.
5133 * win32_threads.c: Recognize new GC_WINMAIN_REDIRECT macro.
5134 * win32_threads.c (WINMAIN_LPTSTR, WINMAIN_THREAD_STACK_SIZE): New
5135 macro (only if GC_WINMAIN_REDIRECT).
5136 * win32_threads.c: Undefine WinMain macro if GC_WINMAIN_REDIRECT.
5137 * win32_threads.c (GC_WinMain): Add prototype (only if
5138 GC_WINMAIN_REDIRECT).
5139 * win32_threads.c (main_thread_args, WinMain): Rename
5140 GC_WINMAIN_WINCE_LPTSTR to WINMAIN_LPTSTR.
5141 * win32_threads.c (WinMain): Call GC_INIT() instead of GC_init();
5142 use WINMAIN_THREAD_STACK_SIZE.
5143 * win32_threads.c (WinMain): Call GC_deinit() and
5144 DeleteCriticalSection() only if WinCE; add FIXME.
5145
5146 * os_dep.c (GC_get_main_stack_base): add assertion for mem_base
5147 value returned by GC_get_stack_base().
5148
5149 * Makefile.direct (MUNMAP_THRESHOLD, GC_FORCE_UNMAP_ON_GCOLLECT):
5150 Add the comment for.
5151 * alloc.c (GC_unmap_threshold, GC_force_unmap_on_gcollect):
5152 Declare external variable (only if USE_MUNMAP).
5153 * alloc.c (GC_try_to_collect): Temporarily set GC_unmap_threshold
5154 value to 1 if GC_force_unmap_on_gcollect and restore it before
5155 unlocking (only if USE_MUNMAP).
5156 * doc/README.environment (GC_FORCE_UNMAP_ON_GCOLLECT): Add
5157 information for.
5158 * include/gc.h (GC_set_force_unmap_on_gcollect,
5159 GC_get_force_unmap_on_gcollect): New public function prototype.
5160 * include/gc.h (GC_FORCE_UNMAP_ON_GCOLLECT): New macro is
5161 recognized.
5162 * misc.c (GC_FORCE_UNMAP_ON_GCOLLECT): Likewise.
5163 * include/gc.h (GC_INIT_CONF_FORCE_UNMAP_ON_GCOLLECT): New
5164 internal macro (used by GC_INIT only).
5165 * misc.c (GC_force_unmap_on_gcollect): New global variable.
5166 * misc.c (GC_init): Recognize new "GC_FORCE_UNMAP_ON_GCOLLECT"
5167 environment variable (and set GC_force_unmap_on_gcollect).
5168 * misc.c (GC_set_force_unmap_on_gcollect,
5169 GC_get_force_unmap_on_gcollect): New public function.
5170 * tests/test.c (window_proc): Call GC_set_force_unmap_on_gcollect
5171 to force the mode on if WM_HIBERNATE; restore the mode after
5172 GC_gcollect().
5173
5174 * Makefile.direct (LARGE_CONFIG): Update information.
5175 * include/gc.h (GC_stop_func): Refine the comment.
5176
5177 * configure.ac: Use EMPTY_GETENV_RESULTS instead of NO_GETENV for
5178 Win32 (workaround for Wine bug).
5179
5180 * allchblk.c (GC_freehblk): Adjust local variables indentation.
5181 * mallocx.c (GC_generic_malloc_many): Likewise.
5182 * typd_mlc.c (GC_malloc_explicitly_typed_ignore_off_page,
5183 GC_calloc_explicitly_typed): Likewise.
5184 * typd_mlc.c (GC_make_array_descriptor): Remove unnecessary
5185 brackets.
5186
5187 * configure.ac: Replace GC_WIN32_THREADS with GC_THREADS.
5188 * configure.ac: Process enable_parallel_mark option for Cygwin and
5189 Win32; define THREAD_LOCAL_ALLOC for Win32.
5190
5191 * include/private/gc_priv.h: Define AO_ASSUME_WINDOWS98 if
5192 PARALLEL_MARK (required for VC++ x86).
5193
5194 * dbg_mlc.c (GC_generate_random_backtrace): Call
5195 GC_try_to_collect(GC_never_stop_func) instead of GC_gcollect();
5196 if GC is disabled then print error message and return.
5197 * include/gc.h (GC_try_to_collect): Refine the comment.
5198 * include/private/gc_priv.h (GC_never_stop_func): Fix return type;
5199 refine the comment.
5200
5201 * add_gc_prefix.c: Move the file to the new "extra" directory.
5202 * AmigaOS.c: Likewise.
5203 * gcname.c: Likewise.
5204 * if_mach.c: Likewise.
5205 * if_not_there.c: Likewise.
5206 * MacOS.c: Likewise.
5207 * msvc_dbg.c: Likewise.
5208 * setjmp_t.c: Likewise.
5209 * threadlibs.c: Likewise.
5210 * EMX_MAKEFILE: Prepend setjmp_t.c with "extra" directory.
5211 * Makefile: Prepend AmigaOS.c, MacOS.c, add_gc_prefix.c, gcname.c,
5212 if_mach.c, if_not_there.c, msvc_dbg.c, setjmp_t.c, threadlibs.c
5213 with "extra" directory.
5214 * Makefile.am: Likewise.
5215 * Makefile.direct: Likewise.
5216 * Makefile.dj: Likewise.
5217 * Makefile.in: Likewise.
5218 * NT_MAKEFILE: Prepend msvc_dbg.obj with "extra" directory.
5219 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5220 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5221 * NT_X64_THREADS_MAKEFILE: Likewise.
5222 * NT_THREADS_MAKEFILE: Prepend msvc_dbg.c with "extra" directory.
5223 * gc.mak: Likewise.
5224 * PCR-Makefile: Prepend if_mach.c, if_not_there.c with "extra"
5225 directory.
5226 * SMakefile.amiga: Prepend AmigaOS.c, setjmp_t.c with "extra"
5227 directory.
5228 * doc/simple_example.html: Update for threadlibs.c.
5229 * os_dep.c: Prepend included AmigaOS.c with "extra" directory.
5230
5231 * include/gc.h (GC_do_blocking, GC_call_with_gc_active): New
5232 function prototype.
5233 * include/private/gc_priv.h (STOP_WORLD): Replace a no-op (for the
5234 single-threaded case) with an assertion check for the state to be
5235 not a "do-blocking" one.
5236 * include/private/gc_priv.h (blocking_data): Move the structure
5237 definition from pthread_support.c; change "fn" return type to void
5238 pointer.
5239 * include/private/gc_priv.h (GC_activation_frame_s): New structure
5240 type.
5241 * include/private/gc_priv.h (GC_push_all_stack_frames): New
5242 function declaration (only if THREADS).
5243 * include/private/gc_priv.h (GC_world_stopped): Don't declare
5244 unless THREADS.
5245 * include/private/gc_priv.h (GC_blocked_sp,
5246 GC_activation_frame_s): New declaration (only if not THREADS).
5247 * include/private/gc_priv.h (GC_push_all_register_frames): New
5248 function declaration (only for IA-64).
5249 * include/private/gc_priv.h (NURSERY, GC_push_proc): Remove
5250 obsolete (unused) symbols.
5251 * include/private/gc_priv.h (GC_push_all_stack_partially_eager):
5252 Remove declaration (since it is static now).
5253 * mark_rts.c (GC_push_all_stack_partially_eager): Move from mark.c
5254 (for code locality) and make STATIC.
5255 * mark_rts.c (GC_push_all_register_frames): New function (only for
5256 IA-64).
5257 * mark_rts.c (GC_push_all_stack_frames): New function (only if
5258 THREADS).
5259 * mark_rts.c (GC_add_trace_entry): New function prototype (used by
5260 GC_push_all_stack_partially_eager(), only if TRACE_BUF).
5261 * mark_rts.c (GC_push_all_stack_part_eager_frames): New function.
5262 * mar_rts.c (GC_save_regs_ret_val): Move the declaration out of a
5263 function body (only for IA-64).
5264 * mark_rts.c (GC_push_current_stack): Call
5265 GC_push_all_stack_part_eager_frames() instead of
5266 GC_push_all_stack_partially_eager().
5267 * mark_rts.c (GC_push_current_stack): Call
5268 GC_push_all_register_frames() instead of GC_push_all_eager() for
5269 IA-64 backing store.
5270 * misc.c (GC_do_blocking_inner): Declare function (if THREADS
5271 only).
5272 * misc.c (GC_blocked_sp, GC_blocked_register_sp,
5273 GC_activation_frame): New global variables (only if not THREADS).
5274 * misc.c (GC_call_with_gc_active, GC_do_blocking_inner): New API
5275 function (only if not THREADS).
5276 * misc.c (GC_do_blocking): Move the function from
5277 pthread_support.c.
5278 * include/private/pthread_support.h (GC_Thread_Rep): Add
5279 "activation_frame" field.
5280 * pthread_stop_world.c (GC_push_all_stacks): Call
5281 GC_push_all_stack_frames() and GC_push_all_register_frames instead
5282 of GC_push_all_stack() and/or GC_push_all_eager(); don't check for
5283 STACK_GROWS_UP here.
5284 * pthread_support.c (GC_do_blocking_inner): Remove "static"; store
5285 "fn" result back to "client_data" field.
5286 * pthread_support.c (GC_call_with_gc_active): New API function.
5287 * win32_threads.c (GC_call_with_gc_active): Likewise.
5288 * win32_threads.c (GC_Thread_Rep): Add "thread_blocked_sp" and
5289 "activation_frame" fields.
5290 * win32_threads.c (GC_new_thread): Add assertion checking for
5291 thread_blocked_sp is NULL.
5292 * win32_threads.c (GC_do_blocking_inner): New function.
5293 * win32_threads.c (GC_stop_world): Don't suspend a thread if its
5294 thread_blocked_sp is non-NULL.
5295 * win32_threads.c (GC_push_stack_for): Use thread
5296 "activation_frame" (if non-NULL); use "thread_blocked_sp" if
5297 non-NULL (instead of calling GetThreadContext()); "UNPROTECT" the
5298 thread before modifying its last_stack_min; call
5299 GC_push_all_stack_frames() instead of GC_push_all_stack(); update
5300 the comments.
5301
5302 * alloc.c (GC_default_stop_func): New static variable (initialized
5303 to GC_never_stop_func).
5304 * alloc.c (GC_set_stop_func, GC_get_stop_func): New function.
5305 * alloc.c (GC_timeout_stop_func): Define as GC_default_stop_func
5306 (instead of GC_never_stop_func) if SMALL_CONFIG (or NO_CLOCK),
5307 else call GC_default_stop_func() before getting "current_time".
5308 * alloc.c (GC_maybe_gc): Expand GC_gcollect_inner() macro (for
5309 FIXME comment).
5310 * alloc.c (GC_maybe_gc, GC_collect_a_little_inner): add FIXME for
5311 replacing GC_never_stop_func with GC_default_stop_func (if
5312 possible).
5313 * alloc.c (GC_gcollect): Use GC_default_stop_func.
5314 * alloc.c (GC_collect_or_expand): Use GC_default_stop_func
5315 (instead of GC_never_stop_func) unless it is trigged due to out of
5316 memory; don't increment GC_fail_count and don't output warning
5317 (before trying to collect again) in case the collection has been
5318 interrupted (by GC_default_stop_func) and the heap expansion has
5319 failed too.
5320 * include/gc.h (GC_set_stop_func, GC_get_stop_func): New function
5321 prototypes.
5322
5323 * os_dep.c (GC_get_stack_base): Add FIXME; add assertion for
5324 GC_get_writable_length() result.
5325
5326 * configure.ac: Don't use -lpthread -ldl for Cygwin.
5327
5328 * NT_THREADS_MAKEFILE: Make it back equal to gc.mak.
5329
5330 * include/private/gcconfig.h (GWW_VDB): Undefine if
5331 USE_GLOBAL_ALLOC (since incompatible).
5332 * os_dep.c (GetWriteWatch_alloc_flag): Define as 0 unless GWW_VDB
5333 is defined.
5334 * os_dep.c (GC_unmap_threshold): Declare (for use in
5335 GC_init_win32) if USE_MUNMAP.
5336 * os_dep.c (GC_init_win32): Turn off memory unmapping if
5337 GlobalAlloc() is used.
5338 * os_dep.c (GC_win32_get_mem): Define and use new
5339 VIRTUAL_ALLOC_PAD macro; don't waste an extra memory page unless
5340 MPROTECT_VDB is in use.
5341
5342 * Makefile: Replace "version.h" with "include/gc_version.h".
5343 * include/gc_version.h: Likewise.
5344
5345 * alloc.c (GC_collect_or_expand): Output heap size in WARN()
5346 (before returning FALSE) for convenience.
5347
5348 * allchblk.c (GC_allochblk_nth): Use GC_PRIdPTR in WARN() format
5349 string.
5350 * pthread_support.c (start_mark_threads, GC_thr_init): Likewise.
5351 * win32_threads.c (GC_delete_thread): Likewise.
5352 * include/private/gc_priv.h (GC_PRIdPTR): New macro.
5353 * pthread_stop_world.c (GC_suspend_handler_inner): Remove
5354 unnecessary cast for WARN argument.
5355 * pthread_support.c (start_mark_threads): if pthread_create()
5356 failed then don't try to create other marker threads and (after
5357 printing a warning) adjust GC_markers and GC_parallel values; log
5358 GC_markers value (possibly adjusted) after that.
5359
5360 * win32_threads.c (start_mark_threads): if pthread_create() is
5361 failed then don't try to create other marker threads and (after
5362 printing a warning) adjust GC_markers and GC_parallel values.
5363 * win32_threads.c (mark_mutex_event, builder_cv, mark_cv): Move
5364 the definition upper (to be visible in start_mark_threads()).
5365 * win32_threads.c (start_mark_threads): if CreateThread() or
5366 _beginthreadex() is failed then don't try to create other marker
5367 threads and (after printing a warning) adjust GC_markers,
5368 GC_parallel values, and destroy the event objects (either only
5369 some for the uncreated threads if DONT_USE_SIGNALANDWAIT or all if
5370 not a single thread is created).
5371 * win32_threads.c (GC_thr_init): Log GC_markers value (possibly
5372 adjusted) after start_mark_threads() call.
5373
5374 * Makefile.am: Back remove "GC_" prefix for PTHREADS,
5375 DARWIN_THREADS, WIN32_THREADS (for configure.ac).
5376
5377 * include/private/gc_priv.h: Change include of config.h to
5378 private/config.h.
5379 * include/private/gc_pmark.h: Likewise.
5380 * gc_cpp.cc: Likewise.
5381 * tests/test.c: Likewise.
5382 * tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
5383 undefine GC_BUILD.
5384
5385 * finalize.c (GC_general_register_disappearing_link): Return
5386 GC_SUCCESS, GC_DUPLICATE, GC_NO_MEMORY (instead of 0, 1 and 2,
5387 respectively).
5388 * include/gc.h (GC_NO_MEMORY): New macro (defined as 2).
5389 * include/gc.h (GC_register_disappearing_link,
5390 GC_general_register_disappearing_link): Update the comment.
5391 * typd_mlc.c (GC_calloc_explicitly_typed): Use GC_NO_MEMORY macro.
5392 * finalize.c (GC_general_register_disappearing_link,
5393 GC_register_finalizer_inner): Recalculate the hash table index
5394 after GC_oom_fn succeeded (since the table may grow while not
5395 holding the lock) and check again that the entry is still not in
5396 the table (free the unused entry otherwise unless DBG_HDRS_ALL).
5397 * finalize.c (GC_register_finalizer_inner): Initialize "hhdr"
5398 local variable (to prevent a compiler warning).
5399 * finalize.c (GC_register_finalizer_inner): Don't modify the data
5400 pointed by "ocd" and "ofn" in GC_register_finalizer_inner() failed
5401 (due to out of memory).
5402
5403 * alloc.c (GC_set_fl_marks, GC_clear_fl_marks): Transform loop to
5404 suppress compiler "variable might be uninitialized" warnings.
5405
5406 * Makefile.direct (DONT_USE_SIGNALANDWAIT): Add the comment for.
5407 * win32_threads.c (DONT_USE_SIGNALANDWAIT): Always define for
5408 WinCE.
5409 * win32_threads.c (THREAD_HANDLE): Cast Id (of DWORD type) to
5410 HANDLE thru word type (to avoid a compiler warning) for WinCE.
5411 * win32_threads.c (GC_marker_cv, GC_marker_Id): New static array
5412 (only if DONT_USE_SIGNALANDWAIT).
5413 * win32_threads.c (start_mark_threads): Initialize GC_marker_Id
5414 and GC_marker_cv for each helper thread (only if
5415 DONT_USE_SIGNALANDWAIT).
5416 * win32_threads.c (GC_mark_mutex_state): New static variable (only
5417 if DONT_USE_SIGNALANDWAIT).
5418 * win32_threads.c (GC_mark_mutex_waitcnt,
5419 signalObjectAndWait_func): Don't define if DONT_USE_SIGNALANDWAIT.
5420 * win32_threads.c (GC_acquire_mark_lock, GC_release_mark_lock):
5421 Use InterlockedExchange() over GC_mark_mutex_state (instead of
5422 AO_fetch_and_add()) if DONT_USE_SIGNALANDWAIT.
5423 * win32_threads.c (GC_wait_marker, GC_notify_all_marker):
5424 Implement wait/broadcast primitives using Win32 multiple events
5425 (one for each marker thread) if DONT_USE_SIGNALANDWAIT (instead of
5426 using Win32 SignalObjectAndWait).
5427 * win32_threads.c (GC_thr_init): Don't declare hK32 local
5428 variable, don't check for GC_wnt, and don't initialize
5429 signalObjectAndWait_func if DONT_USE_SIGNALANDWAIT.
5430
5431 * alloc.c (GC_finish_collection): Call GC_print_finalization_stats
5432 if GC_print_stats (after getting "done_time").
5433 * finalize.c (GC_old_dl_entries): New static variable (only if not
5434 SMALL_CONFIG).
5435 * finalize.c (GC_finalize): Save current GC_dl_entries value (only
5436 if not SMALL_CONFIG).
5437 * finalize.c (GC_print_finalization_stats): Define if and only if
5438 not SMALL_CONFIG; use GC_old_dl_entries value; use GC_log_printf()
5439 instead of GC_printf(); use "%lu" (instead of "%u") print format
5440 specifier; use unsigned long type for "ready" counter (for LP64
5441 targets).
5442 * misc.c (GC_dump): No longer call GC_print_finalization_stats()
5443 here (since it is called from GC_finish_collection()).
5444 * misc.c (STACKBASE): Remove unused macro undef (for NOSYS and
5445 ECOS).
5446
5447 * alloc.c (GC_expand_hp): Replace GC_init_inner() call with
5448 GC_init() one.
5449 * malloc.c (GC_alloc_large, GC_generic_malloc_inner): Likewise.
5450 * mallocx.c (GC_generic_malloc_many): Likewise.
5451 * misc.c (GC_enable_incremental): Likewise.
5452 * alloc.c (GC_expand_hp): Update the comment.
5453 * mark.c (GC_obj_kinds): Likewise.
5454 * win32_threads.c (GC_allow_register_threads): Likewise.
5455 * private/gc_priv.h (GC_init_inner): Remove function declaration.
5456 * misc.c (GC_init_inner): Replace with public GC_init().
5457
5458 * gcj_mlc.c (GC_gcj_fake_mark_proc): New static function.
5459 * gcj_mlc.c (GC_init_gcj_malloc): If mp is 0 then supply
5460 GC_gcj_fake_mark_proc (aborting with the appropriate message)
5461 instead.
5462
5463 * os_dep.c (GC_wince_get_mem): If VirtualAlloc() returns NULL (due
5464 to out of memory) then don't increment GC_n_heap_bases and don't
5465 call VirtualAlloc() again (with MEM_COMMIT).
5466 * os_dep.c (GC_remap): Abort with a more informatory message if
5467 VirtualAlloc() fails due to out of memory; update FIXME.
5468
5469 * Makefile: Fix typo for msvc_dbg.c.
5470 * Makefile.direct: Likewise.
5471 * Makefile.am: Prefix PTHREADS, DARWIN_THREADS, WIN32_THREADS with
5472 "GC_".
5473 * Makefile.dj: Don't reference remove files (nursery.c,
5474 gc_nursery.h, gc_copy_descr.h).
5475 * NT_MAKEFILE: Don't define __STDC__ macro (no longer used).
5476 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5477 * NT_THREADS_MAKEFILE: Likewise.
5478 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5479 * NT_X64_THREADS_MAKEFILE: Likewise.
5480 * gc.mak: Likewise.
5481 * NT_MAKEFILE: Remove unnecessary -DGC_BUILD (since it is always
5482 defined in the source files).
5483 * NT_THREADS_MAKEFILE: Likewise.
5484 * NT_X64_THREADS_MAKEFILE: Likewise.
5485 * gc.mak: Likewise.
5486 * NT_X64_THREADS_MAKEFILE: Fix typo for -DGC_NOT_DLL.
5487 * NT_STATIC_THREADS_MAKEFILE: Replace GC_WIN32_THREADS with
5488 GC_THREADS.
5489 * NT_THREADS_MAKEFILE: Likewise.
5490 * NT_X64_STATIC_THREADS_MAKEFILE: Likewise.
5491 * NT_X64_THREADS_MAKEFILE: Likewise.
5492 * gc.mak: Likewise.
5493 * NT_MAKEFILE: Define _CRT_SECURE_NO_DEPRECATE to suppress the
5494 compiler warnings.
5495 * NT_STATIC_THREADS_MAKEFILE: Likewise.
5496 * NT_X64_STATIC_THREADS_MAKEFILE: Place -D_CRT_SECURE_NO_DEPRECATE
5497 before "$*.C" (and "$*.CPP").
5498 * NT_X64_THREADS_MAKEFILE: Likewise.
5499
5500 * doc/README.solaris2: Replace GC_SOLARIS_THREADS with GC_THREADS.
5501 * doc/README.win32: Replace GC_WIN32_THREADS with GC_THREADS.
5502 * doc/README.win64: Add info about mingw-w64; add note for VC++
5503 warnings suppression.
5504
5505 * os_dep.c (GC_forward_exception): Fix logic in several places.
5506 (OSX-specific)
5507
5508 * include/private/gc_priv.h (MAX_HEAP_SECTS): Guard with ifndef.
5509
5510 * Makefile.direct: Copy missing information for -DSHORT_DBG_HDRS
5511 from Makefile.
5512 * Makefile: Remove the information about "define arguments" (which
5513 is incomplete and outdated compared to that in Makefile.direct);
5514 add help reference to Makefile.direct.
5515 * Makefile.dj: Likewise.
5516
5517 * alloc.c (world_stopped_total_time, world_stopped_total_divisor):
5518 Replace "STATIC" with "static" in the definition (since the
5519 symbols aren't prefixed with "GC_").
5520 * win32_threads.c (marker_sp, marker_bsp, marker_last_stack_min,
5521 start_mark_threads, mark_mutex, builder_cv, mark_cv,
5522 mark_mutex_event, signalObjectAndWait_func, main_thread_start):
5523 Likewise.
5524 * pthread_support.c (GC_wait_builder): Define as STATIC.
5525 * win32_threads.c (GC_wait_builder): Likewise.
5526
5527 * misc.c (GC_get_heap_size_inner, GC_get_free_bytes_inner): New
5528 API function.
5529 * include/gc_pmark.h (GC_get_heap_size_inner,
5530 GC_get_free_bytes_inner): New function declaration.
5531
5532 * include/gc.h: Recognize __CEGCC__ (as a synonym for _WIN32_WCE).
5533 * include/gc_config_macros.h: Likewise.
5534 * include/gc.h (GC_MAXIMUM_HEAP_SIZE): Recognize new macro.
5535 * include/gc.h (GC_INIT_CONF_MAXIMUM_HEAP_SIZE): New macro (for
5536 internal use).
5537 * include/gc_config_macros.h: Always include stddef.h if GCC.
5538 * include/gc_config_macros.h (GC_API): Define for CeGCC in the
5539 same way as for MinGW.
5540 * include/gc_config_macros.h (GC_API): Group the definition for
5541 all cases together (check for GC_DLL only once).
5542 * include/gc_pthread_redirects.h: Group non-Darwin code together.
5543 * tests/test.c: Recognize GC_PRINT_VERBOSE_STATS (only if GC_DLL).
5544
5545 * Makefile.direct (GC_PTHREADS_PARAMARK, GC_IGNORE_GCJ_INFO,
5546 GC_PRINT_VERBOSE_STATS, GC_DONT_EXPAND, GC_INITIAL_HEAP_SIZE,
5547 GC_FREE_SPACE_DIVISOR, GC_TIME_LIMIT, GC_FULL_FREQ): Add the
5548 comment for.
5549 * misc.c (GC_init_inner): Recognize GC_PRINT_VERBOSE_STATS (new
5550 macro).
5551 * dyn_load.c (GC_wnt): Change definition to TRUE for WinCE; add
5552 FIXME and the comment for WinCE.
5553 * gcj_mlc.c (GC_init_gcj_malloc): Recognize GC_IGNORE_GCJ_INFO
5554 (new macro).
5555 * include/gc.h (GC_HAVE_BUILTIN_BACKTRACE): Don't define for VC++
5556 WinCE (since backtrace() is unimplemented).
5557 * include/private/gc_priv.h (GC_n_heap_bases): Remove declaration
5558 (since static).
5559 * os_dep.c (GC_n_heap_bases): Define as STATIC; move the
5560 definition to be above GC_is_heap_base().
5561 * include/private/gcconfig.h: Don't define NOSYS for WinCE on ARM
5562 (both for MinGW and CeGCC toolchains).
5563 * include/private/gcconfig.h: Recognize __CEGCC__ and
5564 __MINGW32CE__ (as synonyms for __WIN32_WCE).
5565 * include/private/gcconfig.h: If SH4 then don't set config
5566 parameters for SH.
5567 * include/private/thread_local_alloc.h (GC_key_create): Don't
5568 abort on failures, just return -1 in these cases (this also
5569 prevents compilation error for targets where ABORT is defined
5570 indirectly as an inline assembler sequence).
5571 * mark.c (WRAP_MARK_SOME): Also define for WinCE; add FIXME for
5572 the GCC-based cross-compiler.
5573 * mark.c (ext_ex_regn, mark_ex_handler): Don't define unless
5574 WRAP_MARK_SOME is defined; define also for WinCE case; don't
5575 check for _WIN64 (since WRAP_MARK_SOME is undefined for it).
5576 * mark.c (GC_mark_some): Use __try/__except also for WinCE; update
5577 the comment.
5578 * misc.c: Include signal.h after gc_pmark.h included; check for
5579 MSWINCE instead of _WIN32_WCE.
5580 * misc.c (GC_init_inner): Remove duplicate GC_setpagesize() call.
5581 * misc.c: Don't include <crtdbg.h> for WinCE targets.
5582 * misc.c (GC_write): Define _MAX_PATH if undefined (workaround for
5583 CeGCC toolchain).
5584 * misc.c (GC_write): Use OutputDebugStringW() instead of
5585 _CrtDbgReport() for WinCE targets.
5586 * os_dep.c (GC_least_described_address): Define as STATIC.
5587 * os_dep.c (GC_register_data_segments): Fix code indentation.
5588 * os_dep.c (GC_wince_get_mem): Initialize "result" local variable
5589 (to prevent a compiler warning).
5590 * os_dep.c (GC_dirty_init): Add comment for WinCE target.
5591 * tests/test.c: Don't include winbase.h directly if GCC for WinCE,
5592 include assert.h instead.
5593 * tests/test.c (tiny_reverse_test): Define and use
5594 TINY_REVERSE_UPPER_VALUE macro (4 if VERY_SMALL_CONFIG else 10);
5595 useful for WinCE.
5596 * win32_threads.c (GC_Thread_Rep): Don't declare "handle" field
5597 for WinCE (since thread Id is used as a "real" thread handle).
5598 * win32_threads.c (THREAD_HANDLE): New macro.
5599 * win32_threads.c (GC_register_my_thread_inner): Don't recognize
5600 DONT_IMPORT_GETCURTHREAD anymore; don't record thread handle on
5601 WinCE.
5602 * Makefile.direct (DONT_IMPORT_GETCURTHREAD): Remove comment for.
5603 * win32_threads.c (UNPROTECT, GC_fault_handler_lock): Don't check
5604 for MSWINCE.
5605 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread): Don't
5606 close thread handle on WinCE (since it's a thread Id).
5607 * win32_threads.c (GC_suspend): Don't check for MSWINCE in the
5608 MPROTECT-related code (for the case if MPROTECT_VDB would be
5609 implemented for WinCE).
5610 * win32_threads.c (GC_suspend, GC_start_world, GC_push_stack_for):
5611 Use THREAD_HANDLE(t) to obtain thread handle.
5612 * win32_threads.c (GC_PTHREADS_PARAMARK): New macro recognized;
5613 implicitly define GC_PTHREADS_PARAMARK if GC_PTHREADS; include
5614 pthread.h; define NUMERIC_THREAD_ID(id) if undefined yet; replace
5615 GC_PTHREADS with GC_PTHREADS_PARAMARK where appropriate (for the
5616 parallel mark support).
5617 * win32_threads.c (start_mark_threads): Use int type for "i" local
5618 variable (instead of "unsigned") to prevent a compiler warning.
5619 * win32_threads.c (start_mark_threads): Don't check CreateThread()
5620 result for -1; call CloseHandle() for the handle created by
5621 CreateThread() (on WinCE); don't use errno (since errno.h is
5622 missing on some targets like WinCE) when printing warning on a
5623 marker thread creation failure.
5624 * win32_threads.c (signalObjectAndWait_func): Define for WinCE.
5625 * win32_threads.c (GC_wait_marker): Remove unnecessary assertion
5626 for non-zero signalObjectAndWait_func (to make the code compilable
5627 for WinCE).
5628 * win32_threads.c (GC_thr_init): Allow PARALLEL_MARK for WinCE;
5629 use GC_sysinfo to get processors count if WinCE; don't check for
5630 SignalObjectAndWait() if WinCE; replace GC_PTHREADS with
5631 GC_PTHREADS_PARAMARK.
5632 * win32_threads.c (GC_thr_init): Recognize GC_MIN_MARKERS new
5633 macro (useful for testing parallel marking on WinCE).
5634 * win32_threads.c (GC_win32_start, main_thread_start): Define as
5635 STATIC.
5636 * win32_threads.c: Don't define main_thread_args,
5637 main_thread_start(), WinMain() for WinCE if GC_DLL.
5638 * win32_threads.c (WINCE_MAIN_STACK_SIZE): Remove useless macro
5639 (since the stack size parameter is ignored on WinCE).
5640 * win32_threads.c (main_thread_start): Remove forward declaration;
5641 place its definition before WinMain() one.
5642 * win32_threads.c (WinMain): Abort if GC_CreateThread() or
5643 WaitForSingleObject() failed (for the main thread).
5644
5645 * allchblk.c (MUNMAP_THRESHOLD): Move macro definition out of
5646 a function.
5647 * allchblk.c (GC_unmap_threshold): New global variable definition
5648 (initialized to MUNMAP_THRESHOLD).
5649 * allchblk.c (GC_unmap_old): Use GC_unmap_threshold instead of
5650 MUNMAP_THRESHOLD; skip unmapping if GC_unmap_threshold is 0.
5651 * doc/README.environment (GC_UNMAP_THRESHOLD): Add information.
5652 * misc.c (GC_unmap_threshold): New variable declaration.
5653 * misc.c (GC_init_inner): Recognize "GC_UNMAP_THRESHOLD"
5654 environment variable to set GC_unmap_threshold value (only if
5655 USE_MUNMAP).
5656
5657 * dbg_mlc.c (OFN_UNSET): New macro (to detect
5658 GC_register_finalizer() failures).
5659 * dbg_mlc.c (store_old): Add a check for register_finalizer()
5660 failure caused by an out-of-memory event (leave *ofn and *ocd
5661 unmodified in that case).
5662 * dbg_mlc.c (GC_debug_register_finalizer,
5663 GC_debug_register_finalizer_no_order,
5664 GC_debug_register_finalizer_unreachable,
5665 GC_debug_register_finalizer_ignore_self): Initialize my_old_fn
5666 to OFN_UNSET; clear *ocd and *ofn for non-heap objects (the same
5667 as in GC_register_finalizer_inner()).
5668
5669 * Makefile.direct (GC_DLL): Add the comment for.
5670 * doc/README.macros: Fix a typo.
5671 * doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
5672 * doc/README.macros (__STDC__): Remove info.
5673 * dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
5674 GC_generate_random_valid_address, GC_print_backtrace,
5675 GC_generate_random_backtrace, GC_register_describe_type_fn): Add
5676 GC_API and GC_CALL to function definition.
5677 * malloc.c (GC_generic_malloc): Likewise.
5678 * mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Likewise.
5679 * mark.c (GC_mark_and_push): Likewise.
5680 * misc.c (GC_new_free_list_inner, GC_new_free_list,
5681 GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
5682 Likewise.
5683 * include/gc_backptr.h (GC_get_back_ptr_info,
5684 GC_generate_random_heap_address, GC_generate_random_valid_address,
5685 GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
5686 GC_CALL to function prototype.
5687 * include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
5688 GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
5689 GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
5690 GC_register_describe_type_fn): Likewise.
5691 * include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
5692 GC_generic_malloc_words_small): Likewise.
5693 * gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
5694 * include/private/gc_pmark.h: Likewise.
5695 * include/private/gc_priv.h: Likewise.
5696 * tests/test.c: Likewise.
5697 * gc_cpp.cc: Define GC_BUILD.
5698 * include/private/gc_pmark.h: Likewise.
5699 * include/private/gc_priv.h: Likewise.
5700 * gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
5701 * gc_dlopen.c (dlopen): Add GC_API to the wrapper function
5702 definition.
5703 * pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
5704 GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
5705 pthread_detach, pthread_create): Likewise.
5706 * win32_threads.c (GC_pthread_join, GC_pthread_create,
5707 GC_pthread_sigmask, GC_pthread_detach): Likewise.
5708 * gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
5709 * include/gc_backptr.h: Include "gc.h".
5710 * include/gc_backptr.h: Use extern "C" for the exported functions.
5711 * include/gc_mark.h: Likewise.
5712 * include/gc_config_macros.h (GC_THREADS): Define the macro if any
5713 GC_XXX_THREADS is defined.
5714 * include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
5715 Move the definitions below the place where GC_NETBSD_THREADS and
5716 GC_DGUX386_THREADS are defined.
5717 * include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
5718 is defined) for GCC.
5719 * include/gc_config_macros.h (GC_API): Define for Cygwin (in the
5720 same way as for VC++); define for GCC v4+ (other than already
5721 recognized MinGW/Cygwin) as a "default" visibility attribute if
5722 GC_DLL is defined.
5723 * include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
5724 New macro.
5725 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5726 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5727 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5728 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5729 GC_debug_malloc_atomic, GC_debug_strdup,
5730 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5731 GC_debug_malloc_ignore_off_page,
5732 GC_debug_malloc_atomic_ignore_off_page,
5733 GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
5734 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5735 GC_gcj_malloc_ignore_off_page): Likewise.
5736 * include/gc.h (GC_malloc, GC_malloc_atomic,
5737 GC_malloc_uncollectable, GC_malloc_stubborn,
5738 GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
5739 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5740 GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
5741 GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
5742 GC_debug_malloc_atomic_ignore_off_page,
5743 GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
5744 (for the first argument).
5745 * include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
5746 GC_gcj_malloc_ignore_off_page): Likewise.
5747 * include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
5748 GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
5749 (for the second argument).
5750 * include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
5751 GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
5752 GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
5753 GC_realloc, GC_expand_hp, GC_set_max_heap_size,
5754 GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
5755 GC_register_displacement, GC_debug_register_displacement,
5756 GC_try_to_collect, GC_malloc_ignore_off_page,
5757 GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
5758 GC_debug_malloc_atomic, GC_debug_strdup,
5759 GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
5760 GC_debug_malloc_ignore_off_page,
5761 GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
5762 GC_debug_realloc, GC_debug_malloc_replacement,
5763 GC_debug_realloc_replacement, GC_finalization_proc,
5764 GC_register_finalizer, GC_debug_register_finalizer,
5765 GC_register_finalizer_ignore_self,
5766 GC_debug_register_finalizer_ignore_self,
5767 GC_register_finalizer_no_order,
5768 GC_debug_register_finalizer_no_order,
5769 GC_register_finalizer_unreachable,
5770 GC_debug_register_finalizer_unreachable,
5771 GC_register_disappearing_link,
5772 GC_general_register_disappearing_link,
5773 GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
5774 GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
5775 GC_call_with_alloc_lock, GC_stack_base_func,
5776 GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
5777 GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
5778 GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
5779 GC_malloc_many, GC_CreateThread, GC_beginthreadex,
5780 GC_endthreadex): Comment out (or remove if single and meaningless)
5781 function argument names (to avoid identifiers out of the name
5782 space).
5783 * include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
5784 GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
5785 * include/gc.h (GC_try_to_collect): Update the comment.
5786 * include/gc.h (GC_size, GC_register_my_thread): Add const
5787 qualifier for the argument referent.
5788 * misc.c (GC_size): Likewise.
5789 * pthread_support.c (GC_register_my_thread_inner,
5790 GC_register_my_thread): Likewise.
5791 * win32_threads.c (GC_register_my_thread_inner,
5792 GC_register_my_thread): Likewise.
5793 * include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
5794 (define instead of GC_INIT() for Cygwin and AIX).
5795 * include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
5796 GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
5797 GC_INITIAL_HEAP_SIZE): Recognize new macro.
5798 * include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
5799 GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
5800 GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
5801 GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
5802 * include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
5803 * include/gc_mark.h: Prefix GC_H with '_'.
5804 * include/gc_mark.h (GC_least_plausible_heap_addr,
5805 GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
5806 for the public variable declaration.
5807 * include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
5808 GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Likewise.
5809 * include/gc_pthread_redirects.h (GC_pthread_create,
5810 GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
5811 Use GC_API for the wrapper prototype.
5812 * include/gc_pthread_redirects.h (pthread_create, pthread_join,
5813 pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
5814 before redirecting.
5815 * include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
5816 GC_incr_bytes_freed(); remove FIXME.
5817 * include/private/gc_priv.h (GC_make_closure,
5818 GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
5819 function.
5820 * tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
5821 the target.
5822
5823 * finalize.c (GC_general_register_disappearing_link,
5824 GC_register_finalizer_inner): Remove unnecessary "ifdef THREADS"
5825 guard for LOCK/UNLOCK().
5826 * finalize.c (GC_general_register_disappearing_link,
5827 GC_register_finalizer_inner): Get GC_oom_fn value before releasing
5828 the lock (to prevent data races).
5829 * gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
5830 GC_gcj_malloc_ignore_off_page): Likewise.
5831 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
5832 * include/gc_inline.h (GC_FAST_MALLOC_GRANS): Use GC_get_oom_fn()
5833 instead of GC_oom_fn (to prevent data races).
5834 * malloc.c (GC_generic_malloc): Likewise.
5835 * mallocx.c (GC_memalign): Likewise.
5836 * pthread_support.c (pthread_create): Likewise.
5837 * gcj_mlc.c (maybe_finalize): Acquire the lock before setting
5838 last_finalized_no value to prevent data races.
5839 * include/gc.h (GC_gc_no, GC_get_gc_no, GC_oom_fn, GC_set_oom_fn,
5840 GC_set_find_leak, GC_set_finalize_on_demand,
5841 GC_set_java_finalization, GC_set_finalizer_notifier,
5842 GC_set_dont_expand, GC_set_full_freq, GC_set_non_gc_bytes,
5843 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
5844 GC_set_dont_precollect, GC_set_time_limit, GC_warn_proc): Refine
5845 the comment.
5846 * misc.c (GC_set_oom_fn): Likewise.
5847 * include/gc.h (GC_general_register_disappearing_link): Refine the
5848 comment (replace "soft" word with "weak").
5849 * misc.c (GC_oom_fn, GC_get_gc_no, GC_get_parallel,
5850 GC_set_finalizer_notifier, GC_set_find_leak): Add the comment.
5851 * misc.c (GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
5852 GC_get_finalizer_notifier): Use LOCK/UNLOCK to prevent data races.
5853
5854 * dbg_mlc.c: Guard include <errno.h> with ifndef MSWINCE; include
5855 "private/dbg_mlc.h" before it.
5856 * malloc.c: Likewise.
5857 * dbg_mlc.c (GC_debug_strdup): Use memcpy() instead of strcpy()
5858 for WinCE (since deprecated); evaluate strlen() only once; don't
5859 set errno for WinCE.
5860 * malloc.c (GC_strdup): Likewise.
5861 * dyn_load.c (GC_wnt): Define as macro (FALSE) for WinCE.
5862 * include/gc.h (GC_unregister_my_thread): Refine the comment.
5863 * include/gc.h (GC_uintptr_t, GC_beginthreadex, GC_endthreadex):
5864 Don't declare for WinCE.
5865 * include/gc.h (GC_WINMAIN_WINCE_LPTSTR): New macro (WinCE only).
5866 * include/gc.h (GC_WinMain): Remove GC_API.
5867 * include/gc.h (GC_WinMain): Use GC_WINMAIN_WINCE_LPTSTR for
5868 lpCmdLine.
5869 * tests/test.c (GC_WinMain): Likewise.
5870 * win32_threads.c (main_thread_args, GC_WinMain): Likewise.
5871 * include/gc_config_macros.h (ptrdiff_t): Guard with
5872 ifndef _PTRDIFF_T_DEFINED; define _PTRDIFF_T_DEFINED macro.
5873 * include/private/gc_locks.h: Guard include "atomic_ops.h" with
5874 ifdef GC_PTHREADS (and not GC_WIN32_THREADS).
5875 * mark.c: Include "atomic_ops.h" if PARALLEL_MARK.
5876 * thread_local_alloc.c: Include "atomic_ops.h" if GC_GCJ_SUPPORT.
5877 * win32_threads.c: Include "atomic_ops.h" if MPROTECT_VDB.
5878 * include/private/gc_locks.h: Use include "atomic_ops.h" instead
5879 of include <atomic_ops.h>.
5880 * include/private/gc_priv.h: Likewise.
5881 * include/private/gc_locks.h (GC_allocate_ml, GC_need_to_lock):
5882 Don't export (replace GC_API to "extern").
5883 * win32_threads.c (GC_allocate_ml): Don't export.
5884 * include/private/gc_priv.h (DebugBreak): Define as macro for
5885 WinCE (if not UNDER_CE and DebugBreak is not defined yet).
5886 * include/private/gc_priv.h (UNALIGNED): Rename to UNALIGNED_PTRS
5887 (since "UNALIGNED" is defined in winnt.h of WinCE).
5888 * mark.c (UNALIGNED): Likewise.
5889 * include/private/gcconfig.h (ARM32): Recognize _M_ARM and _ARM_.
5890 * include/private/gcconfig.h (ALIGNMENT): Check always defined.
5891 * include/private/gcconfig.h: Allow GC_WIN32_THREADS for WinCE.
5892 * include/private/thread_local_alloc.h: Define USE_WIN32_SPECIFIC
5893 for WinCE (since __declspec(thread) is unsupported).
5894 * include/private/thread_local_alloc.h (TLS_OUT_OF_INDEXES):
5895 Define for WinCE (if undefined).
5896 * malloc.c (GC_malloc): Remove outdated comment about disabling
5897 signals.
5898 * misc.c: Don't include <tchar.h> (since not used anymore and may
5899 break TEXT() macro defined in winnt.h).
5900 * misc.c (GC_init_inner): Don't use GetModuleHandle() and
5901 InitializeCriticalSectionAndSpinCount() for WinCE.
5902 * misc.c (GC_init_inner): Replace GetModuleHandleA() with
5903 GetModuleHandle() (and use TEXT() macro controlled by UNICODE).
5904 * misc.c (LOG_FILE): Remove unused macro; don't use _T() macro.
5905 * misc.c (GC_CreateLogFile): New static function (Win32/WinCE
5906 only); move the code from GC_write(); replace GETENV() with
5907 GetEnvironmentVariable(); replace CreateFileA() with
5908 CreateFile(); use TEXT() macro (for Unicode support); replace
5909 strcat() with memcpy() (since deprecated in WinCE).
5910 * misc.c (GC_write): Define as STATIC.
5911 * win32_threads.c (GC_attached_thread): Likewise.
5912 * misc.c (GC_write): Use GC_CreateLogFile().
5913 * misc.c: Define vsnprintf macro as StringCchVPrintfA for WinCE.
5914 * misc.c (GC_abort): Try to invoke MessageBoxA() dynamically
5915 (Win32 only) if DONT_USE_USER32_DLL is defined.
5916 * misc.c (GC_abort): Duplicate msg to GC log file (for Win32 and
5917 WinCE).
5918 * misc.c (GC_abort): Use a more user-friendly abort if
5919 NO_DEBUGGING (Win32 only).
5920 * os_dep.c: Include "atomic_ops.h" only if MPROTECT_VDB (and
5921 THREADS).
5922 * os_dep.c (detect_GetWriteWatch): Use TEXT() for GetModuleHandle
5923 (for Unicode support); check GetModuleHandle() result.
5924 * tests/test.c: Don't define assert for WinCE (since may be
5925 redefined by "assert.h" included from libatomic_ops).
5926 * tests/test.c (FAIL): Define as ABORT for all targets (except
5927 for PCR).
5928 * tests/test.c (n_tests): Don't use AO_t.
5929 * tests/test.c (check_heap_stats): Don't cast n_tests.
5930 * tests/test.c (inc_int_counter): New function (for n_tests atomic
5931 incrementation).
5932 * tests/test.c (run_one_test): Test GC_memalign() for all targets.
5933 * tests/test.c (run_one_test): Avoid unbalanced brackets in
5934 #if-#else-#endif blocks.
5935 * tests/test.c (run_one_test): Replace AO_fetch_and_add1() and
5936 private LOCK/UNLOCK with GC_call_with_alloc_lock(inc_int_counter).
5937 * tests/test.c (check_heap_stats): Replace
5938 "if (sizeof(char *) > 4)" with "#if CPP_WORDSZ == 64" to suppress
5939 "unreachable code" compiler warning.
5940 * tests/test.c (WinMain): Set cmd type to LPWSTR (for WinCE
5941 "UNDER_CE" mode); else use LPSTR type (for Win32 and WinCE).
5942 * tests/test.c (thr_window): Replace "L" string prefix with
5943 TEXT().
5944 * thread_local_alloc.c: Check THREADS is defined (to prevent other
5945 compiler errors and warnings otherwise).
5946 * tests/test.c (WinMain): Recognize GC_NO_DLLMAIN macro (for
5947 GC_use_DllMain()).
5948 * Makefile.direct (GC_NO_DLLMAIN, DONT_IMPORT_GETCURTHREAD): Add
5949 the comments for.
5950 * win32_threads.c (GC_register_my_thread_inner): Recognize
5951 DONT_IMPORT_GETCURTHREAD macro.
5952 * win32_threads.c: Recognize GC_NO_DLLMAIN macro (to exclude
5953 DllMain support if needed).
5954 * win32_threads.c (GC_NO_DLLMAIN): Define implicitly if DllMain
5955 thread registration is unsupported for a given configuration.
5956 * win32_threads.c (GC_use_DllMain): Update the comment; refine
5957 ABORT message.
5958 * win32_threads.c (GC_use_DllMain,
5959 GC_started_thread_while_stopped, GC_register_my_thread_inner,
5960 GC_lookup_thread_inner, GC_delete_gc_thread,
5961 GC_allow_register_threads, GC_lookup_pthread,
5962 GC_push_thread_structures, GC_stop_world, GC_push_all_stacks):
5963 Check for GC_NO_DLLMAIN.
5964 * win32_threads.c (GC_Thread_Rep.tm_in_use, GC_attached_thread,
5965 DllMain): Don't define if GC_NO_DLLMAIN.
5966 * win32_threads.c (GC_stop_world): Declare "i" and "max" local
5967 variables only if not GC_NO_DLLMAIN (to suppress compiler
5968 warning).
5969 * win32_threads.c (GC_mark_thread, start_mark_threads): Use
5970 CreateThread() instead of _beginthreadex() for WinCE.
5971 * win32_threads.c (MARK_THREAD_STACK_SIZE, WINCE_MAIN_STACK_SIZE):
5972 New macros defined (used by start_mark_threads(), WinMain()).
5973 * win32_threads.c (GC_thr_init): Exclude parallel-specific code on
5974 WinCE for now (since getenv(), GetProcessAffinityMask() and
5975 SignalObjectAndWait() are missing on WinCE).
5976 * win32_threads.c (GC_thr_init): replace GetModuleHandleA() with
5977 GetModuleHandle(); replace CreateEventA() with CreateEvent(); use
5978 TEXT() macro (for Unicode support).
5979
5980 * include/gc.h (GC_has_static_roots_func): New typedef (user filter
5981 callback).
5982 * include/gc.h (GC_register_has_static_roots_callback): Use
5983 GC_has_static_roots_func type.
5984 * dyn_load.c (GC_has_static_roots,
5985 GC_register_has_static_roots_callback): Likewise.
5986 * dyn_load.c (GC_has_static_roots,
5987 GC_register_has_static_roots_callback): Define on all platforms.
5988 * dyn_load.c (GC_register_dynlib_callback,
5989 GC_register_dynamic_libraries, GC_init_dyld): Replace K&R-style
5990 functions definition with the ANSI C one.
5991 * dyn_load.c (GC_register_dynlib_callback): Use new local variable
5992 "callback" (initialized from GC_has_static_roots) to minimize data
5993 races.
5994 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr,
5995 GC_cond_add_roots): Define as STATIC.
5996 * mark_rts.c (GC_remove_roots_inner): Likewise.
5997 * dyn_load.c (GC_dyld_image_add): Don't call GC_add_roots() for
5998 sections smaller than pointer size (just to avoid acquiring the
5999 lock unnecessarily).
6000 * dyn_load.c (GC_dyld_name_for_hdr): Define unconditionally (not
6001 only for DARWIN_DEBUG).
6002 * dyn_load.c (GC_dyld_image_add): Replace GC_add_roots() call with
6003 LOCK + GC_add_roots_inner() + UNLOCK.
6004 * dyn_load.c (GC_dyld_image_add): Call GC_has_static_roots() user
6005 callback (if set) holding the lock; if it returns 0 then don't call
6006 GC_add_roots_inner() for that region.
6007 * dyn_load.c (GC_register_has_static_roots_callback): Put
6008 "callback" value to GC_has_static_roots on all platforms.
6009 * dyn_load.c (GC_has_static_roots): Update the comments.
6010 * include/gc.h (GC_exclude_static_roots, GC_add_roots,
6011 GC_remove_roots, GC_register_has_static_roots_callback): Likewise.
6012 * include/private/gc_priv.h (struct roots): Likewise.
6013 * include/private/gc_priv.h (GC_remove_roots_inner): Move prototype
6014 to mark_rts.c and declare it as STATIC.
6015 * include/private/gc_priv.h (GC_exclude_static_roots_inner): New
6016 prototype.
6017 * dyn_load.c (GC_register_dynamic_libraries_dl_iterate_phdr): Use
6018 GC_exclude_static_roots_inner() instead of GC_exclude_static_roots.
6019 * misc.c (GC_init_inner): Likewise.
6020 * mark_rts.c (GC_exclude_static_roots_inner): New function (move
6021 all the code from GC_exclude_static_roots(); add the comment.
6022 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots_inner):
6023 add alignment assertion for the lower bound; add assertion for the
6024 lower bound to be less than the upper one.
6025 * mark_rts.c (GC_add_roots_inner, GC_exclude_static_roots): Adjust
6026 the upper bound (round down to be of a pointer-aligned value);
6027 return in case of an empty range.
6028 * mark_rts.c (GC_exclude_static_roots): Acquire the lock and call
6029 GC_exclude_static_roots_inner().
6030 * mark_rts.c (GC_remove_roots): Quickly check the bounds and return
6031 in case of a do-nothing case (before acquiring the lock).
6032
6033 * finalize.c (GC_fail_count): New external variable declaration.
6034 * finalize.c (GC_reset_finalizer_nested,
6035 GC_check_finalizer_nested): New function declarations (if THREADS
6036 only).
6037 * finalize.c (GC_finalizer_nested, GC_finalizer_skipped): New
6038 static global variables (used internally by GC_finalize() and
6039 GC_check_finalizer_nested()).
6040 * finalize.c (GC_check_finalizer_nested): New static function
6041 definition (only if not THREADS, used internally by
6042 GC_notify_or_invoke_finalizers() to minimize the probability of
6043 a deep recursion when a client finalizer tries to allocate GC
6044 memory).
6045 * finalize.c (GC_finalize): Reset GC_finalizer_nested value (or
6046 call GC_reset_finalizer_nested()) if last heap expansion failed.
6047 * finalize.c (GC_notify_or_invoke_finalizers): Access GC_gc_no,
6048 GC_finalizer_now, GC_finalize_on_demand, GC_finalizer_notifier,
6049 last_finalizer_notification variables holding the lock (to avoid
6050 data races).
6051 * finalize.c (GC_finalizer_notifier): Add comment.
6052 * finalize.c (GC_notify_or_invoke_finalizers): Add "quick" check
6053 for an empty finalization queue (only if THREADS and not
6054 KEEP_BACK_PTRS/MAKE_BACK_GRAPH).
6055 * finalize.c (GC_notify_or_invoke_finalizers): Call
6056 GC_check_finalizer_nested() and skip GC_invoke_finalizers() call
6057 if appropriate.
6058 * include/private/pthread_support.h (GC_Thread_Rep): Add unsigned
6059 finalizer_nested and finalizer_skipped fields (for internal use
6060 by the multi-threaded GC_check_finalizer_nested()).
6061 * win32_threads.c (GC_Thread_Rep): Likewise.
6062 * pthread_support.c (GC_reset_finalizer_nested,
6063 GC_check_finalizer_nested): New function definitions (the
6064 multi-threaded variants of that in finalize.c).
6065 * win32_threads.c (GC_reset_finalizer_nested,
6066 GC_check_finalizer_nested): Likewise.
6067
6068 * alloc.c (GC_stopped_mark): Remove GC_log_printf("") (not needed
6069 anymore and GCC produces a warning for it).
6070 * alloc.c (GC_stopped_mark): Adjust printf argument type
6071 specifier.
6072 * backgraph.c: Include dbg_mlc.h before ifdef MAKE_BACK_GRAPH (for
6073 the case when the configuration information comes from a config.h
6074 file).
6075 * checksums.c: Likewise.
6076 * include/gc_allocator.h (GC_ATTR_UNUSED): Use "__unused__"
6077 keyword instead of "unused".
6078 * include/gc_allocator.h: Fix typos in comments.
6079 * thread_local_alloc.c: Likewise.
6080 * include/javaxfc.h (GC_finalize_all): Update comment.
6081 * include/private/gc_priv.h (GC_API_PRIV): New macro (defined as
6082 GC_API and serves only as a marker for the private but exported
6083 symbols used by test.c only).
6084 * include/private/gc_priv.h (GC_abort, GC_arrays, GC_is_marked,
6085 GC_printf, GC_err_printf, GC_log_printf): Replace GC_API decl with
6086 GC_API_PRIV one.
6087 * include/private/gc_priv.h (GC_fo_entries): Don't export it
6088 outside a DLL.
6089 * include/private/gc_priv.h (GC_ATTR_FORMAT_PRINTF): New macro
6090 designated to check the arguments correctness of printf-like
6091 functions (currently works only for GCC v3+).
6092 * include/private/gc_priv.h (GC_printf, GC_err_printf,
6093 GC_log_printf): Use GC_ATTR_FORMAT_PRINTF attribute.
6094
6095 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
6096 Define for FreeBSD 7.0+.
6097
6098 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
6099
6100 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
6101 comment.
6102
6103 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
6104 free blocks have different mapping status.  Correctly handle gap
6105 between blocks.
6106 (GC_split_block): Remove dead code setting hb_flags.  Add comment.
6107 (GC_allochblk): Split blocks also in generational-only mode.
6108 * os_dep.c (GC_unmap_gap): Don't really use munmap.
6109
6110 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
6111 not USE_MUNMAP case.
6112
6113 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
6114 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
6115 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
6116 PARALLEL_MARK, STATIC): Update the comments.
6117 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
6118 recognized (only if MPROTECT_VDB).
6119 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
6120 Add the comments for.
6121 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
6122 environment variable (only if MPROTECT_VDB, if the variable is
6123 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
6124 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
6125 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
6126 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
6127 the future).
6128 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
6129 space returned to OS (GC_unmapped_bytes).
6130 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
6131 comments.
6132 * misc.c (GC_get_unmapped_bytes): New API function.
6133 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
6134 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
6135 "ifdef MSWIN32" one (for Cygwin).
6136
6137 * pthread_support.c (GC_allow_register_threads): New API function.
6138 * win32_threads.c (GC_allow_register_threads): Likewise.
6139 * include/gc.h (GC_allow_register_threads): New API prototype.
6140 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
6141 Update the comments.
6142 * pthread_support.c (GC_register_my_thread): Check the collector
6143 is in the multi-threaded mode.
6144 * win32_threads.c (GC_register_my_thread): Likewise.
6145
6146 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
6147 instead, following Ivan's original patch.
6148
6149 * allchblk.c (GC_allochblk_nth): Add assertion.
6150 * checksums.c: Add GC_record_fault, GC_was_faulted,
6151 CC_n_faulted_dirty_errors.
6152 (GC_check_dirty): Remove register declarations, print
6153 dirty bit errors on faulted pages.
6154 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
6155 * os_dep.c (GC_remove_protection): Compute index correctly.
6156
6157
6158 == [7.2alpha2] 2009-06-12 ==
6159
6160 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
6161 calls into a single one (for output atomicity).
6162 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
6163 GC_finalization_failures variable; check the result of
6164 GC_general_register_disappearing_link() (for lack of memory)
6165 instead.
6166 * finalize.c (GC_finalization_failures): Remove unused global
6167 variable.
6168 * finalize.c (GC_general_register_disappearing_link,
6169 GC_general_register_disappearing_link): Don't update the value of
6170 GC_finalization_failures (since unused).
6171 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
6172 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
6173 word type now (as FIXUP_POINTER requires numeric argument).
6174 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
6175 requires the first parameter of word type.
6176 * mark.c (PUSH_GRANULE): Likewise.
6177 * mark.c (GC_push_one, GC_push_all_eager): Likewise.
6178 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
6179 GC_finalizer_notifier directly, instead
6180 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
6181 * include/javaxfc.h: Clarify GC_finalize_all comment.
6182 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
6183 after) for configuration information.
6184 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
6185 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
6186 variable for NULL before dereferencing it, return GC_oom_fn() in
6187 this case.
6188 * typd_mlc.c (GC_malloc_explicitly_typed,
6189 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
6190 suppress compiler warning (for uninitialized "lg" variable).
6191
6192 * win32_threads.c (GC_unregister_my_thread): add false assertion
6193 in unreachable code.
6194
6195 * pthread_support.c (GC_inner_start_routine): Don't release the
6196 GC lock between GC_register_my_thread_inner() and
6197 GC_init_thread_local() calls (post the "registered" even after
6198 calling GC_init_thread_local()).
6199 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
6200 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
6201 acquire the GC lock only once.
6202 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
6203 directly instead of GC_register_my_thread() since I_HOLD_LOCK
6204 and our (main) thread is not registered yet (add assertion for it).
6205 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
6206 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
6207 * win32_threads.c (GC_lookup_thread): Remove unused function.
6208 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
6209 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
6210 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
6211 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
6212 (for Cygwin).
6213 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
6214 (inside GC_ASSERT) to prevent compiler warning.
6215 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
6216 PARALLEL_MARK.
6217 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
6218 to a place before GC_get_next_stack().
6219 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
6220 as in pthread_support.c).
6221 * win32_threads.c (marker_last_stack_min): New static arrays (the
6222 same semantics as for last_stack_min of GC_Thread_Rep).
6223 * win32_threads.c (GC_get_next_stack): Handle marker threads.
6224 * win32_threads.c (GC_mark_thread): Save the current stack pointer
6225 to marker_[b]sp.
6226 * win32_threads.c (start_mark_threads): Initialize
6227 marker_last_stack_min elements (to "unset" value).
6228
6229 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
6230 GC_set_finalize_on_demand, GC_set_java_finalization,
6231 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
6232 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
6233 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
6234 Change return type to void (these API functions no longer return
6235 the old value).
6236 * include/gc.h: Likewise.
6237 * tests/test.c (main, WinMain, test): Remove explicit cast to void
6238 for GC_set_warn_proc().
6239 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
6240 GC_get_finalize_on_demand, GC_get_java_finalization,
6241 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
6242 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
6243 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
6244 API functions (to get the current value of the corresponding R/W
6245 public variables).
6246 * include/gc.h: Likewise.
6247 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
6248 Update the comment.
6249 * misc.c (GC_ignore_warn_proc): New API call-back function.
6250 * include/gc.h (GC_ignore_warn_proc): Likewise.
6251 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
6252 GC_get_non_gc_bytes): New API setter and getter functions (for the
6253 public GC_find_leak and GC_non_gc_bytes variables, respectively).
6254 * include/gc.h: Likewise.
6255 * include/gc.h (GC_memalign): Add proto to GC API.
6256 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
6257 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
6258 remove GC_memalign() proto.
6259 * misc.c (GC_write): Use multi-byte (A) variants of Win32
6260 GetModuleFileName() and CreateFile().
6261 * tests/test.c (main): Replace K&R-style function definition with the
6262 ANSI C one.
6263
6264 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
6265 recognized (for Linux on ARM32 without glibc).
6266 * include/private/gcconfig.h (STRTOULL): Define for all targets
6267 (define as "strtoul" for most targets except for LLP64/Win64).
6268 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
6269 (cast the result to word type) to decode values of "GC_TRACE",
6270 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment
6271 variables.
6272
6273 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
6274 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
6275
6276 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
6277 AO_load in assertion.
6278
6279 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
6280 is defined as FALSE (otherwise the size of dll_thread_table is near
6281 200 KiB for 32-bit).
6282 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
6283 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
6284 backing_store_ptr fields for IA64 support.
6285 * win32_threads.c (GC_register_my_thread_inner): Set
6286 backing_store_end field to reg_base value for IA64 (same as in
6287 pthread_support.c).
6288 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
6289 "right" places, remove ';'.
6290 * win32_threads.c (GC_fault_handler_lock): Declare only
6291 if MPROTECT_VDB (and not WinCE).
6292 * win32_threads.c (GC_suspend): Acquire and release
6293 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
6294 * win32_threads.c (GC_suspend): Define as STATIC.
6295 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
6296 (should be word-compliant, "%p" is used w/o "0x"), don't cast sp.
6297 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
6298 calls into a single one (for output atomicity).
6299 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
6300 before altering its last_stack_min ("thread" variable is added).
6301 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
6302 "s" is non-NULL.
6303 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
6304 if WinCE.
6305 * win32_threads.c (GC_get_next_stack): Pass current_min value to
6306 GC_get_stack_min as-is (without -1).
6307 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
6308 version of AO_fetch_and_sub1().
6309 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
6310 to pointer (and vice versa) thru word type to suppress warnings.
6311 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
6312 access atomically.
6313 * misc.c: Change GC_THREADS tests back to THREADS.
6314
6315 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
6316 a group of printf() calls into a single one (for output atomicity).
6317 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
6318 GC_set_time_limit): New prototypes.
6319 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
6320 GC_set_time_limit): New public setter/getter functions.
6321 * include/gc.h: Fix (and remove outdated) comments for thread-local
6322 allocation.
6323 * include/gc.h: Fix typos in comments.
6324 * misc.c (GC_init_inner, GC_printf): Likewise.
6325 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
6326 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
6327 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6328 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
6329 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
6330 GC_bytes_allocd_at_reset): Define as STATIC.
6331 * misc.c (GC_get_heap_size, GC_get_free_bytes,
6332 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
6333 avoid data races.
6334 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
6335 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
6336 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
6337 set the default initial value of initial_heap_sz.
6338 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
6339 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
6340 word-compliant, "%p" is used w/o "0x").
6341 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
6342 environment variable if SMALL_CONFIG.
6343 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
6344 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
6345 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
6346 * doc/README.environment (GC_MARKERS): Refine information.
6347 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
6348 possible.
6349 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
6350 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
6351 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
6352 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
6353 (to prevent possible infinite recursion).
6354
6355 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
6356 with ANSI C one.
6357 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
6358 GC_enqueue_all_finalizers): Remove outdated comments about disabling
6359 signals.
6360 * finalize.c (GC_general_register_disappearing_link): Fix assertion
6361 to catch NULL "obj" value.
6362 * finalize.c (GC_unregister_disappearing_link): Check "link"
6363 alignment before gaining the lock.
6364 * finalize.c (GC_finalize): Refine comment.
6365 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
6366 word-compliant, "%p" is used w/o "0x").
6367 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
6368 variable (to 0) to suppress compiler warning.
6369 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
6370 * include/gc_gcj.h: add "extern C" header and tail.
6371 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
6372 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
6373 the comments to the place where these symbols are defined in mark.c).
6374 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
6375 GC_mark_some_inner, if PARALLEL_MARK only).
6376 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
6377 GC_active_count, GC_do_parallel_mark): Define as STATIC.
6378 * pthread_support.c (GC_mark_thread): Likewise.
6379 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
6380 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
6381 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
6382 GC_arobjfreelist): Likewise.
6383 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
6384 for HBLKSIZE to GC_STATIC_ASSERT.
6385 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
6386 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
6387 * pthread_support.c (GC_do_blocking_inner): Likewise.
6388 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
6389 switch branch to suppress compiler warning.
6390 * mark.c (GC_return_mark_stack): Append new-line to printf message.
6391 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
6392 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
6393 suppress compiler warning.
6394 * pthread_support.c (start_mark_threads): Move the code limiting
6395 "GC_markers" value (and printing a warning) to GC_thr_init().
6396 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
6397 if based on the number of CPUs.
6398 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
6399 values as one.
6400 * pthread_support.c (GC_register_my_thread_inner): Add a check for
6401 "stack_end" is non-NULL (the same as in win32_threads.c).
6402 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
6403 with ENOMEM.
6404 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
6405 to "while" one to suppress "possible extraneous ';'" warning.
6406
6407 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
6408 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
6409 (Darwin only).
6410 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
6411 * include/private/gcconfig.h (ARM32): Define config parameters for
6412 DARWIN (iPhone).
6413
6414 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
6415 GC_TIME_LIMIT): New macros (used to control the default initial
6416 values of GC_full_freq variable, GC_dont_expand,
6417 GC_free_space_divisor, GC_time_limit respectively).
6418 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
6419 with GC_TIME_LIMIT in alloc.c).
6420 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
6421 Define as STATIC.
6422 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Likewise.
6423 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
6424 Move the prototypes to alloc.c, make STATIC.
6425 * include/private/gc_priv.h (GC_push_current_stack,
6426 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
6427 (move the comments to the places where these functions are defined).
6428 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
6429 as STATIC.
6430 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
6431 GC_print_heap_sects): Convert a group of printf() calls into
6432 a single one (for output atomicity).
6433 * mark_rts.c (GC_print_static_roots): Likewise.
6434 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
6435 convenience to delimit collections.
6436 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
6437 make "frames" local variable volatile (to prevent optimization).
6438 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6439 GC_finish_collection, GC_allocobj): Remove outdated comments about
6440 disabling signals.
6441 * include/private/gc_priv.h (GC_register_displacement_inner,
6442 GC_gcollect_inner): Likewise.
6443 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
6444 GC_finish_collection): Initialize "start_time" local variable (to 0)
6445 to suppress compiler warning.
6446 * mark_rts.c (GC_add_roots_inner): Likewise.
6447 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
6448 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
6449 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
6450 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
6451 K&R-style function prototypes with ANSI C one.
6452 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
6453 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
6454 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
6455 macros.
6456 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
6457 same as for Watcom.
6458 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
6459
6460 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
6461 outdated comment about disabling signals.
6462 * mallocx.c (GC_malloc_uncollectable,
6463 GC_malloc_atomic_uncollectable): Likewise.
6464 * os_dep.c: Likewise.
6465 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
6466 Add ARGSUSED tag.
6467 * pthread_stop_world.c (GC_suspend_handler,
6468 GC_suspend_handler_inner): Likewise.
6469 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
6470 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
6471 switch branch to suppress compiler warning.
6472 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
6473 * include/private/darwin_semaphore.h (sem_init): Likewise.
6474 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
6475 * include/private/dbg_mlc.h (GC_has_other_debug_info,
6476 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
6477 C one.
6478 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
6479 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Likewise.
6480 * include/private/pthread_support.h (GC_stop_init): Likewise.
6481 * include/private/gcconfig.h: Refine comment about setting
6482 GC_stackbottom.
6483 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
6484 "right" places.
6485 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
6486 for "stack_end" field.
6487 * mallocx.c (GC_malloc_uncollectable,
6488 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
6489 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
6490 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
6491 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
6492 format specifier (should be word-compliant, "%p" is used w/o "0x").
6493 * pthread_stop_world.c (GC_suspend_handler_inner): Likewise.
6494 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
6495 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
6496 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
6497 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
6498 as STATIC.
6499 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
6500 "thread_blocked" is not set for the current thread.
6501 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
6502 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
6503 suppress compiler warning.
6504
6505 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
6506
6507 * win32_threads.c: restructure parallel marking mutex initialization.
6508 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
6509 pthread_stop_world.c, pthread_support.c: Add runtime conditions
6510 on GC_parallel were appropriate.
6511 * pthread_support.c: Condition marker_bsp on ia64.
6512 (GC_segment_is_thread_stack): Fix loop upper bound.
6513 * reclaim.c: Limit some assertions to PARALLEL_MARK.
6514 * pthread_support.c: Don't acquire mark lock for thread-local
6515 allocation.
6516 * include/private/gc_priv.h: Don't define parallel mark sync
6517 support just for THREAD_LOCAL_ALLOC.
6518
6519 * include/private/gcconfig.h: refine MINGW32 test.
6520 * mark.c: Add win64/gcc tests.
6521
6522 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
6523 typed_test, run_one_test, check_heap_stats, main, test): Replace
6524 all K&R-style function definitions with ANSI C ones.
6525 * trace_test.c (main): Likewise.
6526 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
6527 THREAD_LOCAL_ALLOC.
6528 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
6529 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
6530 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
6531 local variables (to suppress "assigned value is never used"
6532 compiler warning).
6533 * test.c (tree_test): Use public GC_noop1() instead of private
6534 GC_noop().
6535 * test.c (typed_test): Likewise.
6536 * test.c (check_heap_stats): Define and assign value to
6537 "late_finalize_count" local variable only if its value is used
6538 (if FINALIZE_ON_DEMAND defined).
6539 * test.c (main): Remove DJGPP-specific initialization of
6540 GC_stackbottom (not needed anymore, handled in gcconfig.h).
6541 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
6542 * trace_test.c: Include "gc_backptr.h".
6543 * trace_test.c (main): Call GC_INIT().
6544 * trace_test.c (main): Add "return 0" statement.
6545
6546 * dyn_load.c (GC_register_dynlib_callback): Use new index j
6547 instead of i in the inner loop.
6548
6549 * tests/test.c: Increment n_tests with fetch_and_add when possible,
6550 avoiding need to export lock.
6551
6552 * include/gc_pthread_redirects.h:
6553 - dlfcn.h is included for dlopen() proto before undefining
6554 "dlopen" (so, it's possible now to include dlfcn.h after
6555 gc.h from user code);
6556 - GC_dlopen() proto is added (except for Darwin as
6557 it's missing there);
6558 - "dlopen" is explicitly undefined (before its redefinition).
6559 * include/gc.h:
6560 - "process.h" is included besides "windows.h"
6561 (for _beginthreadex/_endthreadex); win32 only.
6562 - GC_NO_THREAD_DECLS is moved to the right place
6563 (before closing "extern C").
6564 * pthread_support.c: Fix out of memory handling for Thread_Reps.
6565 * win32_threads.c: Don't include process.h on winCE,
6566 improve out of memory handling for thread structures, don't
6567 define GC_beginthreadex and GC_endthreadex for winCE.
6568
6569 * tests/test.c: Change gcj vtable decriptor type from size_t to
6570 GC_word.
6571
6572 * gcj_mlc.c: Add comment.
6573 * tests/test.c: Change NTEST to NTHREADS.  Fork 5 threads by default.
6574 Run reverse_test a second time in each thread.Add comments.
6575 Don't rely on AO_fetch_and_add.
6576
6577 * dyn_load.c (GC_register_dynlib_callback,
6578 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
6579 for GNU_PT_RELRO relocations.
6580
6581 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
6582 by GC_SOLARIS_THREADS.
6583 * include/gc.h: Improve finalizer documentation.
6584 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
6585 * pthread_stop_world.c, Makefile.dj: Fix typos.
6586
6587 * win32_threads.c (GC_new_thread): Make first_thread
6588 visible to the whole file.
6589 (UNPROTECT): New macro.
6590 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
6591 thread structures before writing.
6592 (GC_suspend): Acquire GC_fault_handler_lock before suspending
6593 thread.
6594 * os_dep.c: export GC_fault_handler_lock.
6595 (GC_remove_protection): Check if already unprotected.
6596
6597 * doc/README.win32: Add OpenWatcom warning.
6598 * include/private/gcconfig.h: Really check it in.
6599
6600 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
6601 code from gcc version.
6602 * os_dep.c: make gc compilable (optionally) for Cygwin with
6603 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
6604 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
6605 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
6606 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
6607 Watcom (Win32 only).  It works.
6608
6609 * mach_dep.c: Don't use __builtin_unwind_init for register
6610 state on PowerPC/Darwin.
6611
6612 * doc/gcdescr.html: Improve description of object freelist
6613 structure.
6614 * include/private/gc_priv.h: Fix comment for _size_map.
6615
6616 * os_dep.c (GC_linux_stack_base): Relax sanity test.
6617
6618 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
6619 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
6620
6621 * misc.c (GC_set_warn_proc): Implicitly initialize GC on
6622 non-Cygwin win32.
6623
6624 * configure.ac: Enable thread-local allocation for sparc-linux.
6625
6626 * alloc.c (GC_try_to_collect): Remove duplicate initialization
6627 check.
6628 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
6629 threaded warnings.
6630 * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
6631
6632 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
6633 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
6634 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
6635 thread_local_alloc.c.
6636 * misc.c: Refine comment.
6637
6638 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently.  Add FIXME
6639 comment.
6640
6641 * win32_threads.c (GC_push_stack_for): Yet another attempt
6642 at the stack_min finding logic.  Try to clean up the existing code
6643 while minimizing VirtualQuery calls.
6644 (GC_win32_start_inner): Register thread before GC_printf.
6645 Produce more output with DEBUG_THREADS.
6646 *include/gc.h: Update obsolete comments.
6647
6648 * tests/test.c:
6649 (gcj_class_struct2): Use cast instead of l suffix.
6650 Cast GetLastError to int in various places.
6651 Avoid unused result warning from incr/decr macros.
6652 Add cast for fake_gcj_mark_proc.
6653 Cast GC_gc_no to unsigned in printf.
6654
6655 * include/gc.h: Fix two typos in comments.
6656
6657 * finalize.c: Fix typo in comment.
6658
6659 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
6660 with lock.
6661
6662 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
6663 if we are checking for leaks.
6664
6665 * win32_threads.c: Remove mark lock spinning.
6666 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
6667 GC_spin_count, and GC_block_count using atomic operations.
6668 * tests/test.c: Declare n_tests as AO_t only if we have threads.
6669
6670 * win32_threads.c: Support PARALLEL_MARK.  Make printf arg
6671 types agree with format specifiers.
6672 Add STATIC for GC_threads.
6673 * include/private/gcconfig.h: Add FIXME comment.
6674 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
6675 AO_fetch_and_add1_full.  Declare n_tests as AO_t.
6676 (WinMain): Don't call GC_use_DllMain.
6677 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
6678
6679 * alloc.c (GC_try_to_collect_inner): Don't print redundant
6680 GC_bytes_allocd and GC_gc_no.
6681 (GC_stopped_mark): Print average world stop time.
6682 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
6683
6684 * misc.c, doc/README.environment: Add support  for
6685 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
6686 * include/gc.h: Make GC_set_free_space_divisor correspond to
6687 (somewhat unfortunate) reality.
6688
6689 (Mostly improves LLP64 support.)
6690 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
6691 misc.c, reclaim.c: Changed some int and long type to word or size_t
6692 (and vice versa where appropriate)
6693 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
6694 include/private/thread_local_alloc.h, mark.c,
6695 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
6696 casts to word type when casting from int to pointer (or pointer
6697 to int, or data pointer to code pointer) - just to remove the
6698 corresponding compiler warning.
6699 * ptr_chck.c (GC_is_visible): cast int const to word type to
6700 prevent left shift overflow.
6701 * os_dep.c: change the type of GC_mem_top_down global variable
6702 (containing a flag) to DWORD.
6703 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
6704 is defined on SunOS x86_64.
6705 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
6706 for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
6707 (the compiler gets hung if invoked with -Ox -D
6708 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
6709 * backgraph.c: cast GC_gc_no value to unsigned short when
6710 assigned/compared to height_gc_no field of back_edges.
6711 * os_dep.c (GC_remove_protection): Add ARGSUSED.
6712 * win32_threads.c (GC_thread_exit_proc): Remove unused local
6713 variable.
6714 * mark.c (GC_check_dirty): Move declaration out of func body.
6715
6716 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
6717 * include/gc.h (GC_register_my_thread): Improve comment.
6718
6719 * Makefile.direct: Add comment for -DCHECKSUMS.
6720
6721 * thread_local_alloc.c, include/private/thread_local_alloc.h:
6722 Fix typos in comments.
6723 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
6724 STATIC.
6725 * malloc.c (GC_free): Move size calculation below assertion.
6726
6727 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
6728 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
6729 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
6730
6731 * finalize.c (GC_general_register_disappearing_link): Add
6732 assertion.
6733 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
6734 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
6735 granules, not words.
6736
6737 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
6738 * configure.ac: Define mach_dep for sparc-linux.
6739
6740 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
6741 warning.
6742
6743 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
6744 order.
6745
6746 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
6747 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
6748 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
6749 include/javaxfc.h, include/private/gc_locks.h,
6750 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
6751 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
6752 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
6753 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
6754 * test.c: Remove some old K&R code.
6755
6756 * win32_threads.c (GC_may_be_in_stack): New.  (GC_Thread_Rep):
6757 Add last_stack_min.  (GC_push_stack_for): Use last_stack_min.
6758 (GC_get_next_stack): Add limit argument, use_last_stack_min.
6759 (GC_suspend): make stack_base assignment conditional.
6760 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
6761 GC_get_next_stack.
6762 * configure_atomic_ops.sh: Remove.
6763 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
6764 Makefile.direct: Partially support build directories whose path
6765 name contains blanks.
6766 * Makefile.am: Support new files (build_atomic_ops.sh,
6767 build_atomic_ops.sh.cygwin)
6768
6769 * include/private/gc_locks.h, include/private/gc_pmark.h,
6770 include/private/gc_priv.h, include/private/gcconfig.h,
6771 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
6772 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
6773 Fix comments.
6774
6775 * pthread_support.c: Comment out LOCK_STATS.
6776 * include/gc.h: Fix comments.
6777
6778 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
6779 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
6780 * os_dep.c (GC_get_main_stack_base): Use alternate definition
6781 with USE_MMAP.
6782 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
6783
6784 * doc/README: Make it clearer when Makefile.direct is assumed.
6785 * cord/cord.am: install include/cord.h.
6786
6787 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
6788 Remove unused variables.
6789 * darwin_stop_world.c: Always declare GC_thr_init().
6790 * dbg_mlc.c (GC_debug_free_inner): Don't touch oh_sz if
6791 SHORT_DBG_HDRS is defined.
6792 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
6793 mark, USE_MARK_BITS version): Refer to correct parameter name.
6794
6795 * finalize.c (GC_general_register_disappearing_link): Remove
6796 redundant code.
6797 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
6798 * os_dep.c: (GC_write_fault_handler): Remove remaining
6799 references to deleted variable "code".  Remove redundant
6800 FREEBSD definitions.
6801 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
6802 defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
6803
6804 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
6805
6806 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
6807 smashed string, (GC_debug_free_inner): Mark as free.
6808 * mallocx.c (GC_malloc_many): Always clear new block if
6809 GC_debugging_started.
6810 * reclaim.c: Move GC_debugging_started from
6811 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
6812 which is also called directly.
6813 * doc/README: Fix spelling error.  Update license summary.
6814 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
6815 * tests/test.c: Don't define GC_DEBUG if already defined.
6816
6817 * doc/simple_example.html: update --enable-full-debug reference,
6818 Make HTML formatting standards compliant.
6819 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
6820 * doc/gcinterface.html: specify encoding.
6821
6822 * doc/simple_example.html: Update thread-local allocation
6823 description.
6824
6825 * configure.ac: Check for gc-debug earlier; replace remaining
6826 full-debug tests.
6827 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
6828 Use signed offset type.  Use ptr_t internally.
6829 * doc/gcinterface.html: Update LOCAL_MALLOC description.
6830 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
6831 Fix full-debug reference.
6832 * include/gc.h: Rewrite GC_..._INCR and friends.
6833 * tests/test.c: Minimally test GC_..._INCR and friends.
6834
6835 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
6836 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
6837 on free hblk.
6838 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
6839 (GC_header_cache_miss): Always blacklist pointers for free
6840 hblks.  Add assertion and comment.
6841 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
6842 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
6843 Delete it.
6844 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
6845
6846 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
6847
6848 * configure.ac: Set win32_threads on MinGW.
6849
6850 Ivan's description of the patch follows. Note that a few pieces like
6851 the GC_malloc(0) patch, were not applied since an alternate had been
6852 previously applied.  A few differed stylistically from the rest of
6853 the code (mostly casts to void * instead of target type),
6854 or were classified as too minor to bother.  Note that
6855 all of Ivan's static declarations which did not correct outright
6856 naming bugs (as a few did), where replaced by STATIC, which is
6857 ignored by default.
6858
6859 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
6860 GC_malloc(0));
6861 - addition of missing getter/setter functions for public variables
6862 (may be useful if compiled as Win32 DLL);
6863 - addition of missing GC_API for some exported functions;
6864 - addition of missing "static" declarator for internal functions
6865 and variables (where possible);
6866 - replacement of all remaining K&R-style definitions with ANSI
6867 C ones (__STDC__ macro is not used anymore);
6868 - addition of some Win32 macro definitions (that may be missing in
6869 the standard headers supplied with a compiler) for GWW_VDB mode;
6870 - elimination of most compiler warnings (except for
6871 "uninitialized data" warning);
6872 - several typos correction;
6873 - missing parenthesis addition in macros in some header files of
6874 "libatomic_ops" module.
6875
6876 My highlights based on reading the patch:
6877
6878 * allchblk.c: Remove GC_freehblk_ptr decl.
6879 Make free_list_index_of() static.
6880 * include/gc.h: Use __int64 on win64, define GC_oom_func,
6881 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
6882 add getter and setters: GC_get_gc_no, GC_get_parallel,
6883 GC_set_oom_fn, GC_set_finalize_on_demand,
6884 GC_set_java_finalization, GC_set_dont_expand,
6885 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
6886 GC_set_finalizer_notifier.  Always define GC_win32_free_heap.
6887 gc_config_macros.h: Define _REENTRANT after processing
6888 GC_THREADS.
6889 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
6890 handling of operator new[] for old Windows compilers.
6891 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
6892 around arguments.
6893 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
6894 * mark.c (GC_mark_and_push_stack): Fix source argument for
6895 blacklist printing.
6896 * misc.c: Fix log file naming based on environment variable
6897 for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
6898 just return current value with 0 argument.  Add DONT_USE_USER32_DLL.
6899 Add various getters and setters as in gc.h.
6900 * os_dep.c: Remove no longer used GC_disable/enable_signals
6901 implementations.  (GC_get_stack_base): Add pthread_attr_destroy
6902 call.  No longer set GC_old_bus_handler in DARWIN workaround.
6903 * pthread_support.c: GC_register_my_thread must also
6904 call GC_init_thread_local.
6905
6906 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
6907 * mach_dep.c: Include signal.h.
6908 * gc_priv.h: Factor out INLINE declaration.
6909
6910 * include/private/gcconfig.h: Update MIPS/LINUX config.
6911 * doc/gcdescr.html: Fix typo.
6912 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
6913 for MIPS/LINUX.
6914
6915 * configure.ac: SPARC fixes.
6916 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
6917 size 0, except for gcj.
6918 * doc/gc.man: Expand C++ cautions.
6919 * include/gc_inline.h: Fix comments.
6920
6921
6922 == [7.1] 2008-05-03 ==
6923
6924 * doc/gcinterface.html: Improve C++ interface documentation.
6925
6926 * allchblk.c (GC_allochblk): Check for overflow during size
6927 rounding.
6928 * tests/huge_test.c: New.
6929 * Makefile.direct, tests/tests.am: Add huge_test.c
6930
6931 * pthread_support.c: Fix typo in comment.
6932 * os_dep.c (GC_win32_get_mem): Add heap section only if
6933 allocation succeeded.
6934
6935 * malloc.c: (free replacement) Fix caller address space check.
6936
6937 * finalize.c (GC_grow_table): Dereference table in null-check.
6938
6939 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
6940 Consistently call CloseHandle. (GC_suspend): Call
6941 GC_delete_gc_thread.
6942 * tests/test.c: Don't reference GC_print_stats if not exported.
6943
6944 * tests/test.c (run_one_test): Don't mention pthread_self().
6945 * misc.c: Declare GC_thr_init().
6946
6947 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
6948 and refine assertions to handle huge unmergable blocks.
6949 (GC_allochblk_nth): Add comment.
6950
6951 * include/private/gcconfig.h: Add missing FREEBSD macro
6952 consistency test.
6953
6954 * allchblk.c (GC_enough_large_bytes_left): No longer take
6955 parameters; return free list index bound.
6956 (GC_merge_unmapped): Don't access nexthdr until after null test.
6957 (Fixes bug in 1/29/08 check-in.)  (GC_allochblk): Calculate
6958 when splitting is allowable only once here, not when considering each
6959 block. (GC_allchblk_nth): Accept new may_split parameter.
6960 Avoid some redundant tests for exact size matches.
6961 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
6962 (GC_maybe_gc): Make locking assertion testable.
6963 * mark_rts.c: Fix indentation.
6964 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
6965 * tests/test.c: Remove (void) casts.  Optionally print some
6966 timing information.
6967
6968 * windows-untested/gc.def: Remove CreateThread line.
6969 * windows-untested/README: New file.
6970 * win32_threads.c (GC_use_DllMain): Force collector initialization.
6971 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
6972 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
6973 * include/gc_cpp.h: Add matching placement delete overloads
6974 everywhere.
6975 * include/private/gc_locks.h (NO_THREAD): Add cast.
6976 * include/private/gcconfig.h: Add test for __HP_aCC.
6977 * configure.ac, tests/tests.am:  Avoid libgccpp on HP/UX.
6978
6979 * doc/README.win32: Fix typo.
6980 * configure.ac: Fix printing of enable-shared result.
6981
6982 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
6983 defined.  (GC_call_with_stack_base): Add GC_API.
6984 * os_dep.c (GC_get_stack_base): Add GC_API.
6985 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
6986 Add GC_API.
6987 * include/gc.h: Add GC_API annotations.
6988 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
6989 PCR.
6990 * include/private/gc_pmark.h: Fix comments.
6991
6992 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
6993 Add GC_push_typed_structures() to push GC_ext_descriptors.
6994
6995 * tests/test.c: Call GC_INIT for DARWIN; test system type using
6996 gcconfig.h-defined macros.
6997
6998 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
6999 blocks large enough that their size, when interpreted as a signed
7000 value, would be negative.
7001 * include/private/gc_priv.h: Comment hb_sz range limit.
7002
7003 * mark.c (GC_push_next_marked): correct comment.
7004 * Makefile.direct: document NO_PROC_STAT.
7005 * include/private/gcconfig.h: Accommodate NO_PROC_STAT.
7006
7007
7008 == [7.1alpha2] 2008-01-10 ==
7009
7010 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
7011 again.  Refer to build directory as ".".
7012
7013 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
7014 * darwin_stop_world.c: Add FIXME comment for parallel marker.
7015
7016 * include/private/gc_priv.h: Update MAX_ROOT_SETS
7017 and LOG_PHT_ENTRIES to handle larger heaps.
7018
7019 * include/gc.h (GC_INIT,GC_init): Update comments.
7020
7021 * allchblk.c, alloc.c, include/private/gc_priv.h:
7022 Track GC_bytes_dropped and use in GC triggering decisions.
7023 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
7024
7025 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
7026 adjusting p.
7027
7028 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
7029
7030 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
7031 * alloc.c: Add declaration for GC_add_current_malloc_heap.
7032 * win32_threads.c (GC_beginthreadex): Clean up error
7033 return code.
7034 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
7035 Add NT_X64_THREADS_MAKEFILE.
7036
7037 * alloc.c: Define GC_version instead of in version.h.
7038 * version.h: Remove.
7039 * include/gc_version.h: Move most of version.h here.
7040 * include/gc.h: Include gc_version.h.
7041 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
7042 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
7043 Adjust for version.h rename.
7044
7045 * configure.ac: Put libatomic_ops links in build directory.
7046 * Makefile.am: Don't mention atomic_ops.c and atomic_ops_sysdeps.S
7047 as nodist sources.
7048
7049 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
7050 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
7051
7052 * alloc.c: Deal correctly with address wrapping for
7053 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
7054 * finalize.c, include/gc.h (GC_register_disappearing_link,
7055 GC_register_finalizer_inner): Improve out-of-memory handling.
7056 * include/private/gc_pmark.h: Fix comment spelling.
7057
7058 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
7059 in other contexts.
7060
7061 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
7062
7063 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
7064
7065 * allchblk.c, configure.ac (add --enable-munmap)
7066
7067 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
7068 GC_GETSECTBYNAME instead.
7069 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
7070 architecture (Darwin).
7071
7072 * reclaim.c (GC_bytes_found): Expand comment.
7073 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
7074 granules, not bytes, to GC_FAST_MALLOC_GRANS.
7075 * include/gc.h: Never include gc_local_alloc.h.
7076 * tests/test.c: Add size zero allocation tests.
7077
7078 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
7079 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
7080
7081 * Makefile.direct: Invoke $(MAKE) instead of make.
7082
7083 * doc/scale.html: Reflect gc7 thread local allocation behavior.
7084
7085 * include/extra/gc.h, include/extra/gc_cpp.h: New.
7086 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
7087 again.
7088
7089 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
7090 for HURD.
7091
7092 * include/private/gcconfig.h: Add Linux/mips-64 support.
7093
7094 * dbg_mlc.c: Use random() on all glibc systems.
7095 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
7096 HURD.  Add comment.
7097 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accommodate
7098 systems without SA_SIGINFO.
7099
7100 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
7101 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
7102 No longer test for RS6000.
7103
7104 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
7105 Maintain GC_our_memory and GC_n_memory.
7106 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
7107 (GC_print_all_smashed_proc): Pass client object address instead of
7108 base.
7109 * dyn_load.c (sort_heap_sects): New.  (GC_register_map_entries):
7110 Register sections that are contiguous and merged with our heap.
7111 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
7112 of libraries.
7113 * malloc.c (calloc): Check for special callers even with
7114 USE_PROC_FOR_LIBRARIES. Move assertion.  Add rudimentary
7115 malloc/free tracing.
7116 * misc.c: No longer call GC_init_lib_bounds explicitly.
7117 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
7118 initialize on demand.
7119 * tests/test.c: Call GC_INIT only when required.
7120
7121 * Makefile.direct: Remove comment fragment.
7122 * tests/tests.am: Add smashtest.
7123 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
7124 * pthread_support.c: Fix comment spelling.
7125 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
7126 GC_LINUX_THREADS and REDIRECT_MALLOC.
7127 * tests/smash_test.c: Initial check-in.
7128 * obj_map.c: Print log entry to correct file.
7129 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
7130
7131 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
7132 while world is still running.
7133 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
7134 with world stopped.
7135 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
7136 * misc.c (GC_init/GC_init_inner): Perform all work in
7137 GC_init_inner.
7138 * Makefile.direct: Expand -DUSE_MUNMAP comment.
7139
7140 * include/gc.h: Define uintptr_t explicitly for VC++6.
7141 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
7142 exist.
7143
7144
7145 == [7.0] 2007-07-02 ==
7146
7147 * include/gc_config_macros.h: Also check for IA64 when setting
7148 GC_HPUX_THREADS.
7149 * mallocx.c: Change my_bytes_allocd to signed_word.
7150 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
7151 (as opposed to pthreads) support.
7152
7153 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
7154 on ARM/Linux.  Check getcontext() return value.
7155
7156 * backgraph.c (per_object_func): Make argument types consistent.
7157 (GC_traverse_back_graph): Mark GC_deepest_obj.
7158
7159 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
7160 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
7161
7162 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
7163 anachronisms.
7164 * dyn_load.c: Partially support cygwin, but don't enable it yet.
7165
7166 * Makefile.am: Use -no-undefined for libgc.
7167 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
7168 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
7169 consistently.
7170 * misc.c: Fix some WARN calls.  Move GC_is_initialized setting and
7171 GC_thr_init() call.
7172 * os_dep.c: Consistently use WARN where appropriate.
7173 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test.  Instead
7174 remove inappropriate pthread.h include.
7175 * doc/README.linux: Remove some anachronisms.
7176
7177 * alloc.c: Also use GC_check_tls on non-Linux systems.
7178 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
7179 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
7180 with prototype.
7181
7182 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
7183 (GC_print_heap_sects): Use size_t instead of unsigned long.
7184 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
7185 context.
7186 * win32_threads.c, include/gc_config_macros.h: The last of Romano
7187 Paolo Tenca's patch.  Move stdint.h include to gc_config_macros.h.
7188 * include/gc_inline.h: Avoid gc_priv.h dependencies.
7189 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
7190
7191 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
7192 * mark_rts.c (GC_push_roots): Fix kind type.
7193
7194 * doc/README.win64: New file.
7195 * doc/doc.am, Makefile.direct: Add README.win64.
7196
7197 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
7198 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
7199 * allochblk.c, alloc.c, blacklst.c, dbg_mlc.c, dyn_load.c,
7200 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
7201 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
7202 win32_threads.c, cord/de_win.c, include/gc_mark.h,
7203 include/private/gc_hdrs.h, include/private/gc_pmark.h,
7204 include/private/gc_priv.h, tests/test_cpp.cc:
7205 Replace old style function declarations.  Clean up integral types.
7206 Remove register declarations.  The change in malloc.c and the
7207 "int descr" declaration in mark.c are the most likely to have
7208 been real bugs outside of win64.
7209 * msvc_dbg.c: Disable on win64.
7210 * win32_threads.c: Add AMD64 support.
7211 * include/gc.h: no backtrace on AMD64 for now.
7212
7213 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
7214
7215 * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
7216 Don't include windows.h in an extern "C" context.
7217 * include/private/gcconfig.h: Fix win64/X86_64 configuration.
7218 * tests/test.c: Eliminate more old style function definitions.
7219 Cleanup pointer and integer casts for win64.
7220 * tests/test_cpp.cc: Don't include gc_priv.h.
7221 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
7222 * NT_X64_STATIC_THREADS_MAKEFILE: New.
7223
7224 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK.  Ignore
7225 FINISHED threads for suspension.  (GC_pthread_join): Add
7226 pthread_self() cast.  (GC_pthread_start_inner): Execute cleanup
7227 handler when popping it.
7228 * include/private/gc_locks.h: Inline THREAD_EQUAL for
7229 GC_WIN32_PTHREADS.  Define USE_PTHREAD_LOCKS only if we have
7230 pthreads.
7231
7232 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
7233 tests/test.c: Accommodate GC_WIN32_PTHREADS.
7234 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
7235 * include/gc_config_macros.h: Define both PTHREADS and
7236 GC_WIN32_THREADS.
7237 * include/private/gc_locks.h: Nonstandard definitions of
7238 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
7239 * doc/README.win32, Makefile.direct: Include documentation
7240 for GC_WIN32_PTHREADS.
7241 * Makefile.direct: Remove some anachronisms in the documentation.
7242
7243 * Makefile.am: Move includes to bottom.  Add better library
7244 dependencies.  Increment library version.  Remove "SUBDIRS += .".
7245 * cord/cord.am, tests/tests.am: Add better library dependencies.
7246 Remove now unnecessary dependencies.
7247 * include/gc.h (GC_beginthreadex, GC_endthreadex, GC_ExitThread):
7248 Move to define on all Windows platforms.  (_beginthread): define
7249 to generate error if used.
7250
7251 * include/private/gc_locks.h: Format to 80 columns.
7252
7253 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
7254 * NT_MAKEFILE: msvc_dbg.h is in include/private.  Don't use cvars
7255 rc.
7256 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
7257 case.
7258 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
7259 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
7260 * include/gc.h: Add GC_reachable_here().  (GC_WinMain): Add GC_API.
7261 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
7262 * tests/test.c: Add GC_reachable_here() call.
7263
7264 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
7265 * tests/thread_leak_test.c: Don't unconditionally define
7266 GC_LINUX_THREADS.
7267
7268 * Makefile.am: Remove extra_ldflags_libgc definition.
7269
7270 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
7271
7272 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
7273 value.
7274
7275
7276 == [7.0alpha9] 2007-05-15 ==
7277
7278 * Some gc6.9 changes.
7279 * Change FindTopOfStack decl in darwin_stop_world.c.
7280 * Move some static tests from misc.c to gcconfig.h.  Use #error.
7281 * Add GC_print_free_list() function (thanks to Bruce Hoult).
7282 * Add GC_GNU_THREADS support on HURD (thanks to Aleksey Demakov,
7283 Barry DeFreese, and possibly other Debian maintainers).
7284 * __GNUC__ was misspelled as __GNUC in thread_local_alloc.h (thanks to
7285 Peter Wang).
7286 * Integrated various MacOSX patches and tried to reconcile them (thanks to
7287 Allan Hsu, several contributors at Apple, and probably others).
7288 * Added some casts to powerpc.h in libatomic_ops to silence warnings.
7289
7290 * Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
7291 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
7292 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New.  GC_lock_holder: now
7293 unsigned long.  I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
7294 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
7295 NUMERIC_THREAD_ID, THREAD_EQUAL.
7296 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
7297 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
7298 ARM.
7299
7300 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
7301 GC_debug_register_finalizer_unreachable() patch from gcc tree.
7302 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
7303 to check GC has been initialized.
7304
7305 * include/gc_cpp.h: Documentation updates.
7306 * include/gc_config_macros.h: Don't check for __ppc__ to set
7307 DARWIN_THREADS.
7308 * Makefile.am: Include configure_atomic_ops.sh in dist.
7309
7310 * Makefile.am: Don't distribute copied atomic_ops files.  Include
7311 libatomic_ops with "make dist".
7312 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
7313 * win32_threads.c: Report error for Cygwin + GC_DLL.
7314
7315 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
7316 * cord/de_win.c: Rename and move AboutBox.  Call GC_INIT.  Remove
7317 MakeProcInstance anachronism.
7318 * doc/README.macros: Officially remove elif prohibition.
7319 Remove documentation for defunct SRC_M3 support.
7320 * include/gc.h: Remove more SRC_M3 references.
7321 * include/private/gcconfig.h: Remove still more SRC_M3 references.
7322 GC_SOLARIS_THREADS no longer needs to be checked separately.
7323
7324 * thread_local_alloc.c, include/private/thread_local_alloc.h:
7325 Spell __declspec correctly.
7326 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
7327
7328 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
7329
7330 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
7331 GC_started_thread_while_stopped.
7332 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
7333 * win32_threads.c: (client_has_run): remove,
7334 GC_started_thread_while_stopped, GC_attached_thread: add.
7335 (GC_push_all_stacks): Add verbose output.
7336 (DllMain): Avoid initializing collector or the like.
7337 Never update both thread tables.
7338 * doc/README.win32: Adjust GC_win32_dll_threads rules.
7339
7340 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
7341 GC_PRINT_VERBOSE_STATS.
7342
7343 * configure.ac: Comment out redundant
7344 AC_DEFINE(NO_EXECUTE_PERMISSION).
7345 * sparc_mach_dep.S: Remove single quote in comment.
7346 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
7347 * win32_threads.c: Include stdint.h for Mingw.  Add GC_API for DllMain.
7348 (GC_use_DllMain): Fix assertion.
7349
7350 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
7351 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
7352 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
7353 targets. Remove comments.
7354 Prepare ppc64 support for Darwin.
7355
7356 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
7357 Make i unsigned.
7358 (GC_stop_world): Likewise. Remove unused GC_thread p.
7359 (GC_start_world): Likewise.
7360
7361 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
7362 Remove double SIG_HNDLR_PTR definition.
7363 (GC_forward_exception): Fix compiler warnings, make i unsigned.
7364 Initialize thread_state to NULL.
7365 (catch_exception_raise): Fix compiler warnings, make i unsigned.
7366
7367 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
7368 also define for X86_64.
7369 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
7370 * README.changes: Point to ChangeLog.
7371
7372 * darwin_stop_world.c: Move THREAD_FLD defines to ...
7373 * include/private/gc_priv.h: ... here.
7374 Fix THREAD_STATE definitions for ppc64.
7375 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
7376 access.
7377
7378 * configure.ac (i586-darwin): Replaced HAS_I386_THREAD_STATE_* with
7379 HAS_X86_THREAD_STATE32_*.
7380 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
7381 HAS_X86_THREAD_STATE64_*.
7382 Added value 1 in the above AC_DEFINE's. Important for the upcoming
7383 Leopard.
7384 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
7385 Removed __x86_64__ check in POWERPC section. Added base definitions
7386 for the X86_64 Darwin port.
7387 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
7388 to distinguish between 32 and 64-bit applications. Added definitions
7389 for X86_64 Darwin.
7390 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
7391 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
7392 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
7393 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
7394 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
7395 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
7396 Distinguish between getsectbynamefromheader_64 and
7397 getsectbynamefromheader.
7398 * os_dep.c (catch_exception_raise): Introduce exception definition for
7399 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
7400 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
7401
7402
7403 == [7.0alpha7] 2006-09-19 ==
7404
7405 * More 6.7 changes.
7406 * Declare GC_dump() in gc.h.
7407 * Add --enable-large-config, which just defines the LARGE_CONFIG macro.
7408 * Make GlobalAlloc address alignment a bit more intuitive (thanks to
7409 Charles Mills).
7410 * Use #elif in the definitions of GET_MEM.
7411 * Overhaul porting.html.  Remove corresponding text from README.
7412 * Fix typo in DARWIN section of gcconfig.h.
7413 * Fix Darwin thread memory leak (thanks to Bruce Mitchener).
7414 * Update x86 AO_test_and_set implementation to use "=q".
7415 * Add $(EXEEXT) to many tests in tests/tests.am.  (Corresponds to a
7416 6.7 fix, which no longer applied.)
7417 * Fix Darwin/PPC port.
7418 * Fix Cygwin/threads port.
7419 * Fix gcj malloc support.
7420 * For GNU-style make, don't build libatomic_ops unless threads are requested.
7421 This should allow single-threaded builds on platforms which do not
7422 currently support libatomic_ops.
7423 * Clean up and hopefully fix the CFLAGS calculation for GNU build.
7424 (Substantially improves things on HP/UX.)
7425 * Integrated Andrei Polushin's Visual C++ patches.  These provide for
7426 stack traces, better C++ debug support, and better log file handling.
7427 Note that these change the location of the log file to a the path of the
7428 executable with a .log extension.  To get the old behavior back, define
7429 OLD_WIN32_LOG_FILE.  For the time being, I'm checking his project
7430 files and the like into a windows-untested subdirectory.  They
7431 are almost certainly already out of date, but better than what we had
7432 before.
7433 * Fixed some win32 threads bugs, and added support for _beginthreadex.
7434 * Fix zero size thread local allocation so that explicit deallocation
7435 works correctly.
7436 * Removed serious bug in GC_malloc_uncollectable(large size).
7437 * Do not try to do thread-local gcj allocation in incremental mode.  There
7438 are races in setting up the descriptor.
7439 * Add GC_INIT() to middle.c, fix some more GC_printfn calls.
7440 * Some assertions erroneously used I_HOLD_LOCK() negatively, even though
7441 it can now spuriously return TRUE.
7442 * Rename SUNOS5 macro and OS name to SOLARIS and SUNOS5DL to SOLARISDL.
7443 * On Linux and some Un*x variants, allocate memory by first trying sbrk,
7444 and then switching to mmap if that fails.
7445 * Fixed /proc/x/maps reading to deal with asynchronous deletions.
7446 * Fix REDIRECT_MALLOC with threads on Linux.  It now usually seems to work
7447 with ugly hacks that include having calloc behave differently when it is
7448 called from ld.so or the pthreads library.  A reasonable amount of
7449 infrastructure was added to support some of this.  (Thanks to Roland McGrath
7450 for ideas and information.)
7451 * Import various updated build scripts.
7452 * Add GC_register_has_static_roots_callback (thanks to Andrew Haley).
7453 * Fix serious bugs in GC_malloc_atomic_uncollectable().
7454 * Return GC_SUCCESS form GC_get_stack_base().
7455 * Fix several atomic_ops problems on IA64 with HP Compiler.
7456 * Update to atomic_ops-1.2.
7457 * Fix hb_n_marks description and reclaim.c assertion.
7458 * Various additional win32 threads fixes.
7459 * Enable GC_ASSERTIONS for Debug build with NT_THREADS_MAKEFILE.
7460
7461
7462 == [7.0alpha5] 2005-09-29 ==
7463
7464 * More 6.6, 6.7 changes.
7465 * Some Solaris fixes, including some more general changes in how
7466 the assembly pieces of mach_dep.c are handled.
7467 * Removed a lot of SOLARIS_THREADS-specific code that was only
7468 needed with the old implementation.  This included many (mostly no-op)
7469 versions of GC_is_fresh.
7470 * Don't use atomic_ops in gc_locks.h unless we need threads.
7471 * Fixed USE_MARK_BITS, which is once again the default without PARALLEL_MARK.
7472 * Removed Solaris GC_INIT hack.  It's a workaround for a long dead bug,
7473 and it seemed to be wrong anyway.
7474 * Changed win32_threads.c to require preprocessor-based interception
7475 of thread routines by default.  A client call to GC_use_DllMain is
7476 now required to get the old behavior in which DllMain is used to implicitly
7477 register threads.  This was done for uniformity with other platforms, and
7478 because the DllMain solution seemed to require very tricky code which,
7479 at least in the past, imposed hard bounds on the number of threads.
7480 * Many small changes to make thread support work again on Cygwin.
7481 * Moved definition of allocator lock etc. to pthread_support.c and
7482 win32_threads.c for those two cases.
7483 * Got rid of the FASTLOCK() machinery.  It doesn't seem useful on modern
7484 platforms.
7485 * Cleaned up the uncollectible allocation routines, speeding up the
7486 slower paths.  The code did enough unnecessary work off the critical path
7487 that the underlying logic was getting hard to extract.
7488 * No longer turn off THREAD_LOCAL_ALLOC with DBG_HDRS_ALL.  Indications
7489 are it just works, and I think the reasons for it not working disappeared
7490 a while ago.
7491 * Fixed bugs in hb_n_marks calculation and assertion.
7492 * Don't use __builtin_expect for pre-3.0 gcc.
7493 * Define GWW_VDB only for recent Microsoft tool chains.
7494 * Add overview.html to doc directory.
7495 * Fix NT_STATIC_THREADS_MAKEFILE, various compiler warnings.
7496 * Made thread local allocation sort of work with Cygwin.  The code should
7497 be there to deal with other Windows variants, But non-Cygwin Windows
7498 threads need more bug fixes.
7499
7500
7501 == [7.0alpha4] 2005-08-02 ==
7502
7503 * Various 6.5, 6.6 changes.
7504 * Removed GC_brief_async_signal_safe_sleep and used atomic_ops instead
7505 (thanks to Ben Maurer).
7506 * Integrated build patches from Davide Angelocola and Petter Urkedal.
7507 * Fix dynamic-linker-based pthread call redirection.
7508 * Renamed RS6000 to POWERPC/AIX.
7509 * Allow recovery from SIGSEGV in marker on Linux.  This works around
7510 a race in thread stack marking if /proc is used to find roots.  We do
7511 that by default with malloc redirection and threads.  This involved
7512 moving some GC_find_limit and SETJMP related declarations to gc_priv.h.
7513 * Added doc/porting.html file.
7514 * Added ADD_HEAP_GUARD_PAGES for sbrk/*nix platforms to debug extreme
7515 memory overwrite errors.
7516 * Added trivial NO_INCREMENTAL flag to facilitate debugging.
7517 * Added GC_getattr_np-based GC_get_stack_base (untested).
7518 * Separated thread local allocation into a separate file and added the
7519 beginning of win32 support for that.
7520
7521
7522 == [7.0alpha3] 2005-04-28 ==
7523
7524 * Added support for dlopen-based interception of pthread functions.
7525 This is only half done.  The gc.h redefinitions currently interfere.
7526 * Integrated major automake overhaul from Petter Urkedal.
7527
7528
7529 == [7.0alpha2] 2005-04-07 ==
7530
7531 * GC_bytes_allocd was incremented by a possibly uninitialized variable
7532 in GC_generic_malloc_inner.  (Bug introduced in gc7.0alpha1.  Thanks
7533 to Ben Hutchings for tracking it down.)
7534 * Win32 fixes (thanks to Ben Hutchings and Maurizio Vairani).
7535 * Integrated Ben Hutchings' GetWriteWatch-based virtual dirty bit
7536 implementation for win32.
7537 * Removed pc_gc.tar and floppy targets in Makefile.direct.  Removed
7538 pc_excludes file.
7539 * No longer include GC_bytes_wasted when evaluating allocation progress.
7540 Since we are now counting live memory, it no longer makes sense.
7541 * Applied Davide Angelocola's configure patch.  There are now separate
7542 Makefile.am's in the cord and tests subdirectory, more tests, etc.
7543 * Renamed configure.in to configure.ac.
7544 * Merged a very small number of Nathanael Nerode's configure.ac
7545 cleanups from the gcc tree.  Unfortunately, that file is a bit
7546 different from ours.
7547 * Changed EINTR handling in sem_wait slightly.
7548 * Restructure the root marking code.  Remove all traces of
7549 USE_GENERIC_PUSH_REGS, and effectively make it the default.
7550 Make it easier to pass a context pointer to the mark routine, in
7551 case we ever want to do precise stack marking.
7552 * Replace GC_start_blocking() and GC_end_blocking() with GC_do_blocking().
7553 This remains undocumented, and only implemented for pthreads.  But it
7554 removes an otherwise unavoidable race with stores of callee-save
7555 registers.
7556 * Fix GC_n_mark_bits for the default MARK_BIT_PER_GRANULE case.  This
7557 resulted in bogus complaints in heap dumps.
7558 * Upgrade to libatomic_ops-1.0, and update build structure to match.
7559 * Remove SRC_M3 support. Clean up lock initialization code in misc.c.
7560 * Removed gc_local_alloc.h.  If THREAD_LOCAL_ALLOC is defined, the
7561 thread local allocation routines are now called automatically.
7562 * Renamed gc_inl.h back to gc_inline.h.  Changed the interface appreciably
7563 since locking has turned into a dominant issue, and in-line allocation
7564 only makes sense if it's no worse than thread-local allocation.
7565 Gc_inline.h is now also used to implement thread-local allocation.
7566 * Finished replacing stubborn allocation with manual write barrier.
7567 Untested.
7568 * Use thread-local allocation code by default.
7569 * Added GC_register_my_thread and friends for Posix and win32.
7570 * Patch for GWW_VDB from Ben Hutchings.
7571 * Removed explicit THREAD_LOCAL_ALLOC tests, since that now always
7572 redefines GC_malloc.
7573 * Removed now unused AIX memory allocation code.
7574 * Various minor fixes for bugs introduced in 7.0alpha1.
7575
7576
7577 == [7.0alpha1] 2004-11-09 ==
7578
7579 * Remove GC_PROTO, VOLATILE, GC_PTR, and GC_CONST.  Assume ANSI C compiler
7580 and use ANSI constructs unconditionally.
7581 * Introduce #elif and #error in some of the appropriate places.
7582 * Remove GC_printf cruft. Use stdargs.
7583 * Remove separate Solaris threads support.  Use the more generic Posix
7584 implementation.
7585 * Use atomic_ops for atomic operations and memory barriers.
7586 * Clean up MPROTECT_VDB implementation.  Use SA_SIGINFO wherever
7587 possible.
7588 * Remove broken SIGNALS stuff.
7589 * Use size_t instead of word, where appropriate.
7590 * Add .S.o rule to Makefile.am.
7591 * Officially discontinue SunOS4, several old flavors of M68K (SunOS4,
7592 A/UX, HP), IBM PC/RTs and RISCOS/Irix4.  (I doubt the old code worked.
7593 If anyone cares, these should be easy to resurrect.)
7594 * Add EXPECT() in some critical places.
7595 * Redefined hb_sz and hb_body to deal with bytes rather than words.
7596 This affected a great deal of code.  I would like to consistently use
7597 byte offsets and sizes where there's not a convincing reason to do
7598 otherwise.
7599 * Redefined several other variables (GC_mem_found, GC_words_allocd)
7600 etc. to use units of bytes.  Most of these were also renamed to
7601 reflect that fact.
7602 * Killed as many "register" declarations as possible.
7603 * Partially replaced stubborn allocation with manual write barrier.
7604 It's currently broken.
7605 * Restructured mark code, to allow mark bits to be kept either on
7606 a per allocation granule or per object basis.  The emphasis is
7607 now on the -DUSE_MARK_BYTES option, since individual bits perform
7608 quite badly on hyper-threaded P4s, and are probably suboptimal on
7609 other architectures.  -DUSE_MARK_BITS is currently broken, and may
7610 be resurrected only for the single-threaded case.  This significantly
7611 reduced the cache footprint required by auxiliary GC data structures.
7612 It also reduces space overhead for small heaps.  It probably slows
7613 things down slightly if interior pointers are very common.
7614 * As part of the above, we now maintain an approximate count of set
7615 mark bits in each heap block.
7616 * As part of the above, the semantics of hb_map changed drastically.
7617 For MARK_BIT_PER_OBJ, it doesn't exist.  For MARK_BIT_PER_GRANULE,
7618 it is purely a way to replace a mod instruction with a table lookup.
7619 (Somewhat to my surprise, this still wins on modern hardware.)
7620 * Removed PRINTSTATS, GATHERSTATS, and SILENT macros.  Everything is
7621 now controlled by GC_print_stats variable and GC_PRINT_STATS
7622 and new GC_PRINT_VERBOSE_STATS environment variables.
7623 * Add GC_log_printf and use it consistently for logging output.
7624 * Unconditionally count the objects we reclaim in the sweep phase.
7625 For thread local allocation, we need that anyway, and we expect
7626 that's increasingly the only case that matters.  And it simplifies
7627 the code.  In general expect minor performance hacks that benefit
7628 only the single-threaded case to disappear.
7629 * Remove GC_quiet from gc.h and elsewhere.
7630 * Changed the heap expansion heuristic, and the definition of
7631 GC_free_space_divisor, to refer to live data size, instead of total
7632 heap size.  I believe this is much more robust.  It wasn't previously
7633 possible, because we didn't have access to live data size.
7634 * Thread local allocation added the extra byte in twice: Once in
7635 thread_local_alloc, and once in malloc_many.
7636 * Removed GC_malloc_words_small and GC_gcj_fast_malloc.  A new
7637 mechanism based on the thread local allocation data structures
7638 is expected to be added instead.  This should allow inlined code
7639 that is both fast and doesn't rely on collector internals.
7640 * Changed both free lists and reclaim lists to be indexed by granules
7641 instead of words, norming halving their size.
7642 * MERGE_SIZE is now the only option, and the macro was removed.
7643 (Without it, we need a memory reference to GC_all_interior_pointers
7644 anyway.  Thus it costs us nothing.)
7645 * Change GC_size_map to map to granules instead of words.  Make sure
7646 that every possible size up to TINY_FREELISTS is present.
7647 * Split of macros need for fast inline allocation into gc_tiny_fl.h
7648 in anticipation of a new inline allocator that doesn't rely on GC
7649 internals.
7650 * Changed thread local allocation to use GRANULE_BYTES and TINY_FREELISTS
7651 in anticipation of a merge with the inline allocation code.
7652 * Removed ALIGN_DOUBLE.  This is mostly handled by GRANULE_BYTES.
7653 * Make locking on most platforms conditional on GC_need_to_lock.
7654
7655
7656 == [6.9] ==
7657
7658 * Fix typo in PREFETCH implementation for X86_64 (thanks to Peter Wang).
7659 * Fix M68K LINUX port (thanks to Debian packagers).
7660 * __GNUC__ was misspelled as __GNUC in new_gc_alloc.h (thanks to Peter Wang).
7661 * Integrated Allan Hsu's patch for OS X VM deallocation problems.
7662 * Applied FreeBSD/X86_64 patch.
7663
7664
7665 == [6.8] 2006-07-08 ==
7666
7667 * Added some support for Dragonfly BSD (thanks to Joerg Sonnenberger and
7668 Thomas Klausner).
7669 * Improvements to the HP/UX section of configure.in/configure.ac (thanks
7670 to Andreas Tobler).
7671 * GC_unix_get_mem could neglect to release the malloc lock on Irix, under
7672 extremely unlikely circumstances.  (Thanks to Jean-Baptiste Nivois for
7673 some careful code inspection.)
7674 * Added support for kFreeBSD + glibc (thanks to Petr Salinger).
7675 * Fix more MacOS threads memory leaks (thanks to Allan Hsu).
7676 * Added initial Solaris/X86-64 support (thanks to Rainer Orth).
7677
7678
7679 == [6.7] 2006-03-03 ==
7680
7681 * Add "int" to Solaris "end" and "etext" declaration in gc.h.  Declared
7682 the symbols with underscores and as arrays, since that's what's actually
7683 used.  Perhaps this could all just be removed.  (Thanks to John Bowman.)
7684 * Fixed ARM GC_test_and_set code (thanks to Kazu Hirata and Paul Brook).
7685 * Added casts for assignments to hb_last_reclaimed, which truncate the
7686 value.  Added a cast to GC_adj_words_allocd.  Use GetModuleHandleA
7687 when retrieving a handle to kernel32.dll under win32.
7688 * Added Tandem S-Series support.  (Thanks to Craig McDaniel.  A modified
7689 version of his patch was applied, and hence breakage is probably not
7690 his fault.)
7691 * Remove spurious gc:: qualifier for operator delete[] in gc_cpp.h (thanks
7692 to Hanno Boeck).
7693 * Changed a test for LINUX in config_macros.h to one for __linux__.
7694 * Add prototypes for GC_finalizer_notifier and GC_thr_init (thanks to
7695 David Ayers).
7696 * Use ld instead of nonexistent ldz instruction in Darwin FindTopOfStack
7697 (thanks to Andreas Tobler).
7698 * Add support for Darwin/X86 (thanks to Geoff Norton and the Mono
7699 developers).
7700 * Merge in some recent gcc fixes.  Add ppc64 asm code.  (Thanks to
7701 Bryce McKinlay and other GCJ developers.)
7702 * Scan MEM_PRIVATE sections under Windows ME and predecessors.
7703 * Interior pointers with some largish offsets into large objects could
7704 be ignored, if GC_all_interior_pointers was set.  (Oddly this worked
7705 correctly for stack references if it was not set.  Otherwise it failed
7706 for both stack and heap references.  Thanks to Andrew McKinlay for the
7707 critical test case.)
7708 * Integrated Tatsuya Bizenn's NETBSD threads support, with some
7709 untested changes.
7710 * Added GC_strdup and friends to make leak detection work correctly
7711 for strdup clients (thanks to Jon Moore).  Fixed the existing strdup
7712 with malloc redirection to handle a null malloc return correctly.
7713
7714
7715 == [6.6] 2005-09-09 ==
7716
7717 * Fix CPU count detection for Irix and FreeBSD (thanks to Dan Bonachea).
7718 * Integrate Dan Bonachea's patch for the IBM XLC compiler on Darwin.
7719 * Integrated Andreas Tobler's FreeBSD/PowerPC patch.
7720 * Don't access the GC thread structure from the restart handler.  It's
7721 unsafe, since the handler may run too late.  (Thanks to Ben Maurer for
7722 tracking this down.)
7723 * Applied Christian Thalinger's patch to change comment syntax in
7724 alpha_mach_dep.S.
7725 * Added test for GC_no_dls in GC_dyld_image_add for DARWIN (thanks to
7726 Juan Jose Garcia-Ripoll).
7727 * Use LINUX_STACKBOTTOM for Linux/SH and LINUX/ARM (thanks to
7728 Sugioka Toshinobu and Christian Thalinger).
7729 * Rewrote GC_parse_map_entry.  This assumed a fixed column layout of
7730 /proc/self/maps on Linux.  This ceased to be true about 2 years ago.
7731 The old code is probably quite problematic with -DREDIRECT_MALLOC.  It
7732 is also used by default for IA64, though I haven't seen actual failures
7733 there.
7734 * More consistently define HBLKSIZE to 4096 on 64 bit architectures with
7735 4K pages (thanks to Andrew Haley).
7736 * With win32 threads, GC_stop_world needs to acquire GC_write_cs (thanks
7737 to Ben Hutchings for the observation and patch).
7738 * Move up struct callinfo declaration to make gcc 4.0.2 happy.
7739
7740
7741 == [6.5] 2005-05-22 ==
7742
7743 * Integrated Paolo Molaro's patch to deal with EINTR in sem_wait.
7744 * Make GC_approx_sp() write to dummy location to ensure that stack
7745 is grown here, when sp looks reasonable, rather than later, when
7746 it might look like a bad memory reference.  (Problem was never
7747 observed that I know of.  But on rereading the code it seemed
7748 dubious.)
7749 * Separate out GC_with_callee_saves_pushed and sometimes call
7750 it from GC_suspend_handler in pthread_stop_world.c.  Callee-save
7751 register values sometimes failed to get traced under HP/UX on
7752 PA-RISC.  Linux/IA64 had the same problem, though non-stacked
7753 callee-save registers seem to be so rarely used there that nobody
7754 ever noticed.
7755 * Integrated an ancient Darwin powerpc_darwin_machine_dep.s patch
7756 from Andreas Tobler, which I had lost.
7757 * Fix compare_and_exchange implementation for gcc/IA64 to deal with
7758 pickier compiler versions.
7759 * Fixed Itanium 32-bit ABI support (HP/UX).  In particular, the
7760 compare_and_exchange implementation didn't consider that possibility.
7761 * Undefine GC_pthread_detach in win32_threads.c (thanks to
7762 Tommaso Tagliapietra).
7763 * Fixed inclusion of frame.h for NETBSD in os_dep.c.
7764 * Applied Dan Bonachea's patch to use mmap on AIX.
7765 * Several fixes to resurrect the Irix port on recent OS versions.
7766 * Change ALPHA to use LINUX_STACKBOTTOM.
7767 * Change SPARC64/LINUX to also use LINUX_STACKBOTTOM.  Deal with potential
7768 bad values of __libc_stack_end on that platform (thanks to David Miller).
7769 * Relax gctest to allow larger heap if ALIGN_DOUBLE isn't set.
7770 (Unnecessary in 7.0)
7771 * Force a define of __STDC__=0 for the IBM compiler on AIX, so that
7772 we get prototypes.  (Unnecessary in 7.0)
7773 * GC_INIT definition for AIX and CYGWIN referred to DATASTART and DATAEND
7774 which are only defined in private include files.
7775 * Integrated some small gcconfig.h patches from Dan Bonachea.  Also
7776 relaxed assertion about FreeBSD stack size in pthread_support.c.
7777 * Integrated Andrew Begel's darwin_stop_world.c patch for 64-bit
7778 support.  This may need additional work.
7779 * Avoided potentially infinite recursion in GC_save_callers if
7780 the system backtrace calls malloc.  The workaround currently requires
7781 __thread support if this code is used with threads.
7782 * Avoided another similar infinite recursion by conditionally
7783 invoking GC_save_callers in alloc.c (thanks to Matthias Andree
7784 for helping to track down both of these).
7785 * Removed all traces of aix_irix_threads.c.  AIX and Irix now use
7786 pthread_support.c and pthread_stop_world.c.  The old code appeared
7787 to be unreliable for AIX, and was not regularly maintained.
7788 * On Irix, ignore segments with MA_FETCHOP or MA_NOTCACHED attributed;
7789 they're not always safe to read.
7790 * Fixed a previously vacuous assertion (diagnosed by the SGI compiler)
7791 in GC_remove_from_fl.
7792 * Fix stack_size assertion in GC_pthread_create.
7793 * Fix assertion in GC_steal_mark_stack.
7794
7795
7796 == [6.4] 2004-12-21 ==
7797
7798 * Merge gcconfig.h changes from gcc tree.
7799 * Unconditionally include gc_priv.h in solaris_pthreads.c, win32_threads.h,
7800 aix_irix_threads.c, and solaris_threads.c to get thread definitions.
7801 * Start marker threads in GC_thr_init, so that they get started even
7802 if no other threads are ever started.  (Oddly enough, the parallel
7803 collector worked correctly, though not well, with no helper threads.)
7804 * Go ahead and split large blocks in GC_allochblk_nth if GC_dont_gc
7805 is set (thanks to Alexander Petrossian).
7806 * GC_PRINT_BACK_HEIGHT would deadlock with thread support.
7807 * Let in_progress_space in backgraph.s grow dynamically.
7808 * Fix README.solaris2.  The GC_thr_init() hack doesn't work anymore.
7809 * Convert GC_finalizer_mem_freed to bytes in allchblk.c.
7810 * Add missing declaration for GC_generic_malloc_words_small_inner.
7811 Without it, s390x breaks.  (Thanks to Ulrich Weigand.)
7812 * Applied several MacOSX patches to support older tool chains (thanks
7813 to Stefan Ring).
7814 * Bug fix for NetBSD/amd64 (thanks to Marc Recht).
7815 * Add NetBSD/sh3 support (thanks to Uchiyama Yasushi).
7816 * Fixed an uninitialized variable in cordprnt.c.
7817 * Eliminated some, but not all, gcc -Wall warnings.
7818 * Changed some old style casts to reinterpret_cast in new_gc_alloc.h
7819 (thanks to Dan Grayson).
7820 * GC_extend_size_map shouldn't adjust for GC_all_interior_pointers if
7821 GC_DONT_ADD_BYTE_AT_END is set.
7822 * Changed some (long) casts to (word) in preparation for win64 (thanks
7823 to Peter Colson).
7824 * Changed "int stack_size" declaration in pthread_support.c to use
7825 size_t.  (Only mattered with GC_ASSERTIONS enabled.)
7826 * Added CRIS (etrax) support (thanks to Simon Posnjak and Hans-Peter Nilsson).
7827 * Removed GC_IGNORE_FB frame buffer recognition, and replaced
7828 it with a check that the mapping type is MEM_IMAGE.
7829 In theory, this should work much better, but it is a high
7830 risk change for win32.  (Thanks to Ashley Bone for the crucial
7831 experimental data behind this, and to Rutger Ovidius for
7832 some further experiments.)
7833 * GC_allochblk_nth incremented GC_words_wasted by bytes rather than
7834 words.
7835 * Consider GC_words_wasted in GC_adj_words_allocd only if it is within
7836 reason.  (A hack to avoid some extremely unlikely scenarios in which
7837 we manage to allocate only "wasted" space.  7.0 has a better fix.)
7838 * Changed PowerPC GC_clear implementation to use lwsync instead of
7839 eieio, since the documentation recommends against eieio, and
7840 it seems to be incorrect if the preceding memory op is a load.
7841 * Fixed print_block_list to print the correct kind number for
7842 STUBBORN (thanks to Rutger Ovidius).
7843 * Have configure.in generate an error if it is asked to support
7844 pthreads, but doesn't know how to.
7845 * Added Kazuhiro Inaoka's patch for Renesas M32R support.
7846 * Have the GNU build mechanism link with -ldl.  Rename THREADLIBS
7847 to THREADDLLIBS to reflect this.  (Thanks to Sven Verdoolaege.)
7848 * Added Hannes Mehnert's patch for FreeBSD/SPARC support.
7849 * Merged some FreeBSD specific patches to threadlibs.c and dyn_load.c.
7850 (Thanks to John Merryweather Cooper.)
7851 * Define MPROTECT_VDB on MACOSX only if threads are being used, since the
7852 dirty page tracking mechanism uses threads.  (This avoids an undefined
7853 reference to _GC_darwin_register_mach_handler_thread.)
7854 * By popular demand, use __libc symbols only if we are built with
7855 USE_LIBC_PRIVATES, which is off by default, and not otherwise documented.
7856 * Ignore GC_enable_incremental() requests when KEEP_BACK_PTRS is set.
7857 The GC itself will dirty lots of pages in this cases, probably making
7858 it counterproductive on all platforms.  And the DARWIN port crashes.
7859
7860
7861 == [6.3] 2004-07-08 ==
7862
7863 * Compile test_cpp.cc with CXXCOMPILE instead of COMPILE.
7864 * Very large allocations could cause a collector hang.  Correct
7865 calculation of GC_collect_at_heapsize.
7866 * GC_print_hblkfreelist printed some bogus results if USE_MUNMAP
7867 was defined.
7868 * Include gc_config_macros.h in threadlibs.c.
7869 * Correct MacOSX thread stop code (thanks to Dick Porter).
7870 * SMALL_OBJ definition was off by one.  This could cause crashes
7871 at startup.  (Thanks to Zoltan Varga for narrowing this down to
7872 a trivial test case.)
7873 * Integrate Paolo Molaro's patch to deal with a race in the Darwin
7874 thread stopping code.
7875 * Changed X86_64 implementation to use SA_SIGINFO in the MPROTECT_VDB
7876 implementation.  The old approach appears to have been broken by
7877 recent kernels.
7878 * Added GC_ATTR_UNUSED to eliminate a warning in gc_allocator.h (thanks
7879 to Andrew Begel).
7880 * Fix GC_task_self declaration in os_dep.c (thanks to Andrew Pinski).
7881 * Increase INITIAL_BUF_SZ in os_dep.c for Solaris /proc reads.
7882
7883
7884 == [6.3alpha6] 2004-05-06 ==
7885
7886 * Define USE_GENERIC_PUSH_REGS for NetBSD/M68K.
7887 * Fixed the X86_64 PREFETCH macros to correctly handle ia32e (which uses
7888 different prefetch instructions from AMD64).  (Thanks to H.J. Lu.)
7889 * GC_config_macros.h did not correctly define GC_WIN32_THREADS from
7890 GC_THREADS.
7891 * Added simple_example.html.
7892 * Merged Andrew Gray's patch to correctly restore signal handlers on
7893 FreeBSD.
7894 * Merged a patch from Andreas Jaeger to deal with prefetch-related warnings
7895 on x86-64.  Added some other casts so that the PREFETCH macros
7896 always get a ptr_t argument.  Removed some casts in the PREFETCH
7897 implementations.
7898 * Added a header guard for gc_allocator.h and changed GC_debug_free to
7899 clobber contents of deallocated object (suggested by Jesse Jones).
7900 * The signal masking code in pthread_stop_world.c contained some errors.
7901 In particular SIGSEGV was masked in the handler, in spite of the fact that
7902 it wrote to the heap.  This could lead to an uncaught SIGSEGV, which
7903 apparently became much more likely in Linux 2.6.  Also fixed some
7904 typos, and reduced code duplication in the same area.
7905 * Remove ltconfig, clean up configure messages for DG/UX (thanks to
7906 Adrian Bunk for the patches).
7907 * Integrated NetBSD/OpenBSD patches from Marc Recht and Matthias Drochner.
7908
7909
7910 == [6.3alpha5] 2004-03-30 ==
7911
7912 * Fix & vs && typo in GC_generic_malloc and
7913 GC_generic_malloc_ignore_off_page.  (Propagated from the gcc tree.)
7914 * Removed SA_NODEFER hack from NetBSD and Solaris write-protect handler.
7915 (According to Christian Limpach, the NetBSD problem is fixed.
7916 Presumably so is the Solaris 2.3 problem.)
7917 * Removed placement delete from gc_cpp.h for the SGI compiler (thanks
7918 to Simon Gornall for the patch).
7919 * Changed semantics of the GC_IGNORE_FB environment variable, based
7920 on experimentation by Nicolas Cannasse pointing out that the old
7921 interpretation was useless.  We still need help in identifying win32
7922 graphics memory mappings.  The current "solution" is a hack.
7923 * Removed "MAKEOVERRIDES =" from Makefile.am and thus Makefile.in.
7924 It probably made more sense in the gcc context.
7925 * Explicitly ensure that NEED_FIND_LIMIT is defined for {Open,Net}BSD/ELF.
7926 * Replaced USE_HPUX_TLS macro by USE_COMPILER_TLS, since gcc often
7927 supports the same extension on various platforms.
7928 * Added some basic (completely untested) defines for win64, in support
7929 of future work.
7930 * Declared GC_jmp_buf in os_dep.s as JMP_BUF instead of jmp_buf, fixing
7931 a memory overwrite bug on Solaris and perhaps other platforms.
7932 * Added 0 != __libc_stack_end test to GC_linux_stack_base (thanks to
7933 Jakub Jelinek for the patch and explaining the problem).
7934 Otherwise pre-linking could cause the collector to fail.
7935 * Changed default thread local storage implementation to USE_PTHREAD_SPECIFIC
7936 for HP/UX with gcc.  The compiler-based implementation appears to work
7937 only with the vendor compiler.
7938 * Export GC_debug_header_size and GC_USR_PTR_FROM_BASE from gc_mark.h,
7939 making client mark code cleaner and less dependent on GC version.
7940 * Export several new procedures and GC_generic_malloc from gc_mark.h
7941 to support user-defined kinds.  Use the new procedures to replace existing
7942 code in gcj_mlc.c and typd_mlc.c.
7943 * Added support for GC_BACKTRACES.
7944 * Fixed a remaining problem in CORD_str with signed characters (thanks
7945 to Alexandr Petrosian for the patch).
7946 * Removed supposedly redundant, but very buggy, definitions of finalizer
7947 macros from javaxfc.h.  Fortunately this file probably has no users.
7948 The correct declarations were already in gc.h.
7949 * Also need to set GC_in_thread_creation while waiting for GC during
7950 thread termination, since it is also possible to collect from an
7951 unregistered thread in that case.
7952 * Define NO_GETENV for Windows CE, since getenv doesn't appear to exist.
7953 Plus some other minor WinCE fixes (thanks to Alain Novak).
7954 * Added GC_register_describe_type_fn.
7955 * Arrange for debugging finalizer registration to ignore non-heap
7956 registrations, since the regular version of the routine also behaves
7957 that way.
7958 * GC_gcj_malloc and friends need to check for finalizers waiting to be run.
7959 One of the more obscure allocation routines with missing a LOCK() call.
7960 * Fixed cvtres invocations in NT_MAKEFILE and NT_STATIC_THREADS_MAKEFILE
7961 to work with VS.NET.
7962 * Cleaned up GC_INIT calls in test.  Updated gc.man to encourage GC_INIT
7963 use in portable code.
7964 * Taught the GC to use libunwind if --enable-full-debug is specified on
7965 IA64 and libunwind is present.
7966 * The USE_MUNMAP code could get confused about the age of a block and
7967 prematurely unmap it.  GC_unmap_old had a bug related to wrapping of
7968 GC_gc_no.  GC_freehblk and GC_merge_unmapped didn't maintain
7969 hb_last_reclaimed reasonably when blocks were merged.  The code was
7970 fixed to reflect original intent, but that may not always be an
7971 improvement.
7972
7973
7974 == [6.3alpha4] 2004-01-01 ==
7975
7976 * USE_MMAP was broken by confusion in the code dealing with USE_MMAP_ANON.
7977 * Darwin support was broken in alpha3 as a result of my mis-integration of
7978 Andrew Begel's patches.  Fixed with another patch from Andrew Begel.
7979 * A new sanity check in pthread_stop_world.c:GC_push_all_stacks() was
7980 overly aggressive.  We may collect from an unregistered thread during
7981 thread creation.  Fixed by explicitly checking for that case.  (Added
7982 GC_in_thread_creation.)
7983
7984
7985 == [6.3alpha3] 2003-12-20 ==
7986
7987 * Removed -DSMALL_CONFIG from BCC_MAKEFILE.
7988 * Changed macros to test for an ARM processor (Patch from Richard Earnshaw.)
7989 * Mostly applied a DJGPP patch from Doug Kaufman.  Especially Makefile.dj
7990 had suffered from serious bit rot.
7991 * Rewrote GC_apply_to_maps, eliminating an off-by-one subscript error,
7992 and a call to alloca (for lcc compatibility).
7993 * Changed USE_MUNMAP behavior on POSIX platforms to immediately remap
7994 the memory with PROT_NONE instead of unmapping it.  The latter risks
7995 an intervening mmap grabbing the address space out from underneath us.
7996 Updated this code to reflect a cleaner patch from Ulrich Drepper.
7997 * Replaced _T with _Tp in new_gc_alloc.h to avoid a MACOS X conflict.
7998 (Patch from Andrew Begel.)
7999 * Dynamically choose whether or not lock should spin on win32 (thanks
8000 to Maurizio Vairani for the patch).  This may be a significant performance
8001 improvement for win32.
8002 * Fix Makefile.direct to actually include NT_STATIC_THREADS_MAKEFILE
8003 in the distribution (thanks to Maurizio Vairani).
8004 * Maybe_install_looping_handler() was accidentally exported, violating
8005 our name space convention.
8006 * Made os_dep.c use sigsetjmp and SA_NODEFER for NetBSD.  (Thanks to
8007 Christian Limpach.  I generalized the patch to use sigsetjmp on all
8008 UNIX_LIKE platforms, admittedly a slightly risky move.  But it may avoid
8009 similar problems on some other platforms.  I also cleaned up the definition
8010 of UNIX_LIKE a bit.)
8011 * Integrated Andrew Begel's Darwin threads patch, adjusted according to
8012 some of Fergus Hendersons's comments.  (Patch didn't apply cleanly,
8013 errors are possible.)
8014 * Added another test or two for the Intel 8.0 compiler to avoid
8015 confusing it with gcc.  The single-threaded collector should now build
8016 with icc, at least on ia64.
8017
8018
8019 == [6.3alpha2] 2003-11-04 ==
8020
8021 * Re-enabled I_HOLD_LOCK assertion in aix_irix_threads.h.
8022 * Put back the WINABI qualifier for GC_CreateThread.  (Thanks to
8023 Danny Smith for the patch.  6.3alpha1 had the qualifier in one place
8024 but not elsewhere, which was clearly wrong.)
8025 * Sometimes explicitly define __private_extern__ before DARWIN dyld.h
8026 include.  (Thanks to Andreas Tobler for posting the patch.)
8027 * Included signal.h from pthread_support.c.  Removed GC_looping_handler,
8028 which was dead code.
8029 * GC_find_start was misdeclared by gc_pmark.h if PRINT_BLACK_LIST was
8030 defined (thanks to Glauco Masotti for testing and reporting this).
8031 Changed GC_find_start to never just return 0.  According to its
8032 comment it doesn't, and it's unclear that's correct.
8033 * GC_alloc_large had several largely compensating bugs in the
8034 computation of GC_words_wasted.  (It was confused about bytes vs.
8035 words in two places.)
8036 * Integrated Slava Sysoltsev's patch to support more recent versions of
8037 the Intel compiler on IA64/Linux.
8038 * Changed win32 spinlock initialization to conditionally set a spin count.
8039 (Emmanual Stumpf pointed out that enabling this makes a large performance
8040 difference on win32 multiprocessors.)  Also cleaned up the win32 spinlock
8041 initialization code a bit.
8042 * Fixed thread support for HP/UX/IA64.  The register backing store base for
8043 the main thread was sometimes not set correctly.  (Thanks to
8044 Laurent Morichetti.)
8045 * Added -DEMPTY_GETENV_RESULTS flag to work around Wine problem.
8046 * Declare GC_stack_alloc and GC_stack_free in solaris_threads.h to
8047 avoid 64-bit size mismatches (thanks to Bernie Solomon).
8048 * Fixed GC_generic_push_regs to avoid a potential and very unfortunate
8049 tail call optimization.  This could lead to prematurely reclaimed
8050 objects on configurations that used the generic routine and the new
8051 build infrastructure (which potentially optimizes mach_dep.c).
8052 This was a serious bug, but it's unclear whether it has resulted in
8053 any real failures.
8054 * Fixed CORD_str to deal with signed characters (thanks to Alexandr Petrosian
8055 for noticing the problem and supplying the patch).
8056 * Merged a couple of NOSYS/ECOS tests into os_dep.c from gcj (thanks
8057 to Anthony Green).
8058 * Partially merged a win32 patch from Ben Hutchings, and substantially
8059 revised other parts of win32_threads.c.  It had several problems.
8060 Under MinGW with a statically linked library, the main thread was
8061 not registered.  Cygwin detached threads leaked thread descriptors.
8062 There were several race conditions.  For now, unfortunately the
8063 static threads limit remains, though we increased it, and made table
8064 traversal cost depend on the actual thread count.
8065 There is also still some code duplication with pthread_support.c.
8066 (Thread descriptors did become much smaller, since Ben Hutchings
8067 removed the thread context from them.)
8068 * Integrated a Solaris configure.in patch from Rainer Orth.
8069 * Added GC_IGNORE_FB and associated warning to very partially address
8070 the issue of the collector treating a mapped frame buffer as part
8071 of the root set.  (Thanks to David Peroutka for providing some
8072 insight.  More would be helpful.  Is there anything that can be used
8073 to at least partially identify such memory segments?)
8074
8075
8076 == [6.3alpha1] 2003-07-26 ==
8077
8078 * Integrated some NetBSD patches by Marc Recht.  These
8079 were already in the NetBSD package.
8080 * GC_pthread_create waited for the semaphore even if pthread_create failed.
8081 (Thanks to Dick Porter for the pthread_support.c patch.)  Applied the
8082 analogous fix for aix_irix_threads.c.
8083 * Added Rainer Orth's Tru64 fixes.
8084 * The check for exceeding the thread table size in win32 threadDetach
8085 was incorrect (thanks to Alexandr Petrosian for the patch).
8086 * Applied Andrew Begel's patch to correct some reentrancy issues
8087 with dynamic loading on Darwin.
8088 * GC_CreateThread() was neglecting to duplicate the thread handle in
8089 the table (thanks to Tum Nguyen for the patch).
8090 * Pass +ESdbgasm only on PA-RISC machines with vendor compiler (thanks to
8091 Roger Sayle for the patch).
8092 * Applied more AIX threads patches from Scott Ananian.
8093
8094
8095 == [6.2] 2003-06-21 ==
8096
8097 * Integrated a second round of Irix/AIX patches from Dan Bonachea.
8098 Renamed mips_sgi_mach_dep.S back to mips_sgi_mach_dep.s, since it requires
8099 the Irix assembler to do the C preprocessing; gcc -E doesn't work.
8100 * Fixed Makefile.direct for DARWIN (thanks to Manuel Serrano).
8101 * There was a race between GC_pthread_detach and thread exit that could
8102 result in a thread structure being deallocated by GC_pthread_detach
8103 even though it was still needed by the thread exit code (thanks to
8104 Dick Porter for the small test case that allowed this to be debugged).
8105 * Fixed version parsing for non-alpha versions in acinclude.m4 and
8106 version checking in version.h.
8107 * Issues identified (not yet fixed):
8108 - A dynamic libgc.so references dlopen unconditionally, but doesn't link
8109 against libdl.
8110 - GC_proc_fd for Solaris is not correctly updated in response to a
8111 fork() call.  Thus incremental collection in the child won't work
8112 correctly.  (Thanks to Ben Cottrell for pointing this out.)
8113 - --enable-redirect-malloc is mostly untested and known not to work
8114 on some platforms.
8115 - There seem to be outstanding issues on Solaris/X86, possibly with
8116 finding the data segment starting address.
8117 - Very large root set sizes (> 16 MB or so) could cause the collector
8118 to abort with an unexpected mark stack overflow.  (Thanks to
8119 Peter Chubb.)  NOT YET FIXED.  Workaround is to increase the initial
8120 size.
8121 - The SGI version of the collector marks from mmapped pages, even
8122 if they are not part of dynamic library static data areas.  This
8123 causes performance problems with some SGI libraries that use mmap
8124 as a bitmap allocator.  NOT YET FIXED.  It may be possible to turn
8125 off DYNAMIC_LOADING in the collector as a workaround.  It may also
8126 be possible to conditionally intercept mmap and use GC_exclude_static_roots.
8127 The real fix is to walk rld data structures, which looks possible.
8128 - Incremental collector should handle large objects better.  Currently,
8129 it looks like the whole object is treated as dirty if any part of it is.
8130
8131
8132 == [6.2alpha6] 2003-06-05 ==
8133
8134 * There was an extra underscore in the name of GC_save_registers_in_stack
8135 for NetBSD/SPARC (thanks to Jaap Boender for the patch).
8136 * Integrated Brian Alliet's patch for Darwin.  This restructured the
8137 linuxthreads/pthreads support to separate generic pthreads support
8138 from more the system-dependent thread-stopping code.  I believe this
8139 should make it easier to eliminate the code duplication between
8140 pthreads platforms in the future.  The patch included some other
8141 code cleanups.
8142 * Integrated Dan Bonachea's patch to support AIX threads.  This required
8143 substantial manual integration, mostly due to conflicts with other
8144 recent threads changes.  It may take another iteration to
8145 get it to work.
8146 * Removed HPUX/PA-RISC support from aix_irix_threads.c.  It wasn't used
8147 anyway and it cluttered up the code.  And anything we can do to migrate
8148 towards generic pthreads support is a good thing.
8149 * Added a more explicit test for tracing of function arguments to test.c.
8150 * Added Akira Tagoh's PowerPC64 patch.
8151 * Fixed some bit rot in the Cygwin port (thanks to Dan Bonachea for
8152 pointing it out).  gc.h now includes just windows.h, not winbase.h.
8153 * Declared GC_save_regs_in_stack() in gc_priv.h.  Remove other declarations.
8154 * Changed --enable-cplusplus to use automake consistently.  The old way
8155 confused libtool.  "Make install" didn't work correctly for the old version.
8156 Previously --enable-cplusplus was broken on cygwin.
8157 * Changed the C version of GC_push_regs to fail at compile time if it is
8158 generated with an empty body.  This seems to have been the cause of one
8159 or two subtle failures on unusual platforms.  Those failures should
8160 now occur at build time and be easily fixable.
8161
8162
8163 == [6.2alpha5] 2003-05-14 ==
8164
8165 * GC_invoke_finalizers could, under rare conditions, set
8166 GC_finalizer_mem_freed to an essentially random value.  This could
8167 possibly cause unbounded heap growth for long-running applications
8168 under some conditions.  (The bug was introduced in 6.1alpha5, and
8169 is not in gcc3.3.)
8170 * Attempted to sanitize the various DLL macros.  GC_USE_DLL disappeared.
8171 GC_DLL is used instead.  All internal tests are now on GC_DLL.
8172 README.macros is now more precise about the intended meaning.
8173 * Include DllMain in the multi-threaded win32 version only if the
8174 collector is actually built as a dll (thanks to Mohan Embar for
8175 a version of the patch).
8176 * Hide the cygwin threadAttach/Detach functions.  They were violating our
8177 namespace rules.
8178 * Fixed an assertion in GC_check_heap_proc.  Added GC_STATIC_ASSERT
8179 (thanks again to Ben Hutchings).
8180 * Removed some obsolete definitions for Linux/PowerPC in gcconfig.h.
8181 * CORD_cat was not rebalancing unbalanced trees in some cases, violating
8182 a CORD invariant.  Also tweaked the re-balancing rule for
8183 CORD_cat_char_star.  (Thanks to Alexandr Petrosian for the bug report
8184 and patch.)
8185 * Added hand-coded structured exception handling support to mark.c.
8186 This should enable support of dynamic libraries under win32 with
8187 gcc-compiled code.  (Thanks to Ranjit Mathew for the patch.)
8188 Turned on dynamic library scanning for win32/gcc.
8189 * Removed some remnants of read wrapping (thanks to Kenneth Schalk).
8190 GC_USE_LD_WRAP was probably broken in recent versions.
8191 * The build could fail on some platforms since gcconfig.h could include
8192 declarations mentioning ptr_t, which was not defined, e.g. when if_mach
8193 was built (thanks to Yann Dirson for pointing this out).  Also
8194 cleaned up tests for GC_PRIVATE_H in gcconfig.h a bit.
8195 * The GC_LOOP_ON_ABORT environment variable interfered with incremental
8196 collection, since the write fault handler was erroneously overridden.
8197 Handlers are now set up in the correct order.
8198 * It used to be possible to call GC_mark_thread_local_free_lists() while
8199 the world was not stopped during an incremental GC.  This was not safe.
8200 Fortunately, it was also unnecessary.  Added GC_world_stopped flag
8201 to avoid it.  (This caused occasional crashes in GC_set_fl_marks
8202 with thread local allocation and incremental GC.  This probably happened
8203 primarily on old, slow multiprocessors.)
8204 * Allowed overriding of MAX_THREADS in win32_threads.c from the build
8205 command line (thanks to Yannis Bres for the patch).
8206 * Taught the IA64/linux code to determine the register backing store base from
8207 /proc/self/maps after checking the __libc symbol, but before guessing.
8208 (__libc symbols are on the endangered list, and the guess is likely to not
8209 always be right for 2.6 kernels.)  Restructured the code to read and parse
8210 /proc/self/maps so it only exists in one place (all platforms).
8211 * The -DUSE_PROC_FOR_LIBRARIES code was broken on Linux.  It claimed that it
8212 also registered the main data segment, but didn't actually do so.  (I don't
8213 think anyone actually uses this configuration, but ...)
8214 * Made another attempt to get --enablecplusplus to do the right thing.
8215 Since there are unavoidable problems with C programs linking against a
8216 dynamic library that includes C++ code, I separated out the c++ code into
8217 libgccpp.
8218
8219
8220 == [6.2alpha4] 2003-03-10 ==
8221
8222 * Use LINUX_STACKBOTTOM for >= glibc2.2 on Linux/MIPS.  (See Debian bug
8223 # 177204)
8224 * Integrated Jeff Sturm and Jesse Rosenstock's MACOSX threads patches.
8225 * Integrated Grzegorz Jakacki's substantial GNU build patch.  "Make dist"
8226 should now work for the GNU build process.  Documentation files
8227 are installed under share/gc.
8228 * Tweaked gc_cpp.h to again support the Borland compiler (thanks to
8229 Rene Girard for pointing out the problems).
8230 * Updated BCC_MAKEFILE (thanks to Rene Girard).
8231 * Added GC_ASSERT check for minimum thread stack size.
8232 * Added --enable-gc-assertions.
8233 * Added some web documentation to the distribution.  Updated it in the
8234 process.
8235 * Separate gc_conf_macros.h from gc.h.
8236 * Added generic GC_THREADS client-defined macro to set the appropriate
8237 GC_XXX_THREADS internal macro.  (gc_config_macros.h.)
8238 * Add debugging versions of _ignore_off_page allocation primitives.
8239 * Moved declarations of GC_make_closure and GC_debug_invoke_finalizer
8240 from gc.h to gc_priv.h.
8241 * Reset GC_fail_count even if only a small allocation succeeds.
8242 * Integrated Brian Alliet's patch for dynamic library support on Darwin.
8243 * gc_cpp.h's gc_cleanup destructor called GC_REGISTER_FINALIZER_IGNORE_SELF
8244 when it should have called the lower case version, since it was
8245 explicitly computing a base pointer.
8246
8247
8248 == [6.2alpha3] 2003-01-30 ==
8249
8250 * Don't include execinfo.h in os_dep.c when it's not needed, and may not
8251 exist.
8252
8253
8254 == [6.2alpha2] ==
8255
8256 * Fixed the completely broken FreeBSD code in 6.2alpha1 (thanks to
8257 Hironori Sakamoto for the patch).
8258 * Changed IRIX reference in dbg_mlc.c to IRIX5 (thanks to Marcus Herbert).
8259 * Attempted to work around the problems with .S filenames and the SGI
8260 compiler.  (Untested.)
8261 * Worked around an HP/UX make issue with the GNU-style build process.
8262 * Fixed the --enable-cplusplus build machinery to allow builds without
8263 a C++ compiler.  (That was always the intent ...)
8264 * Changed the debugging allocation macros to explicitly pass the return
8265 address for Linux and XXXBSD on hardware for which we can't get stack
8266 traces.  Use __builtin_return_address(0) to generate it when possible.
8267 Some of the configuration work was cleaned up (good) and moved to gc.h
8268 (bad, but necessary).  This should make leak detection more useful
8269 on a number of platforms.  (Thanks to Fabian Thylman for the suggestion.)
8270 * Fixed compilation problems in dbg_mlc.c with GC_ADD_CALLER.
8271 * Bumped revision number for dynamic library.
8272
8273
8274 == [6.2alpha1] 2003-01-23 ==
8275
8276 * Guard the test for GC_DUMP_REGULARLY in misc.c with
8277 "#ifndef NO_DEBUGGING".  Otherwise it fails to build with NO_DEBUGGING
8278 defined.  (Thanks to Manuel Serrano.)
8279 * Message about retrying suspend signals was incorrectly generated even when
8280 flag was not set.
8281 * Cleaned up MACOSX/NEXT root registration code.  There was apparently a
8282 separate ifdef case in GC_register_data_segments() for no reason.
8283 * Removed MPROTECT_VDB for MACOSX port, based on one negative report.
8284 * Arrange for gc.h and friends to be correctly installed with GNU-style
8285 "make install".
8286 * Enable the GNU-style build facility include C++ support in the library
8287 with --enable-cplusplus (thanks to Thomas Maier for some of the patch).
8288 * Mark from GC_thread_key in linux_threads.c, in case that's allocated
8289 from the garbage collected heap, as it is with our own thread-specific
8290 storage implementation (thanks to Jeff Sturm).
8291 * Mark all free list header blocks if they are heap allocated.  This avoids
8292 some unnecessary tracing.  And it remains correct if we clear the
8293 root set.  (Thanks to Jeff Sturm for identifying the bug.)
8294 * Improved S390/Linux support.  Add S390/Linux 64-bit support (thanks to
8295 Ulrich Weigand).
8296 * Corrected the spelling of GC_{M,C}ALLOC_EXPLICTLY_TYPED to
8297 GC_{M,C}ALLOC_EXPLICITLY_TYPED in gc_typed.h.  This is technically
8298 an interface change.  Based on the fact that nobody reported this,
8299 I suspect/hope there were no clients.
8300 * Cleaned up gc_typed.h so that (1) it adds an extern "C" declaration
8301 when appropriate, (2) doesn't generate references to undefined internal
8302 macros, and (3) allows easier manual construction of descriptors.
8303 * Close the file descriptor used by GC_print_address_map().
8304 * Set the "close-on-exec" bit for various file descriptors maintained
8305 for the collector's internal use.
8306 * Added a hack to find memory segments owned by the system allocator
8307 under win32.  Based on my tests, this tends to eventually find all
8308 segments, though it may take a while.  There appear to be cleaner,
8309 but slower solutions under NT/XP.  But they rely on an API that's
8310 unsupported under 9X.
8311 * Changed Linux PowerPC stack finding to LINUX_STACKBOTTOM.  (Thanks
8312 to Akira Tagoh for pointing out that HEURISTIC1 does not work on
8313 64-bit kernels.)
8314 * Added GC_set_free_space_divisor to avoid some Windows dll issues.
8315 * Added FIXUP_POINTER, POINTER_SHIFT, POINTER_MASK to allow preprocessing
8316 of candidate pointers for tagging, etc.
8317 * Always lock around GC_notify_full_gc().  Simplified code for
8318 invoking GC_notify_full_gc().
8319 * Changed the way DATASTART is defined on FreeBSD to be robust against
8320 an unmapped page after etext.  (Thanks to Hironori Sakamoto for
8321 tracking down the intermittent failure.)
8322 * Made GC_enable() and GC_disable() official.  Deprecated direct update
8323 of GC_dont_gc.  Changed GC_gcollect to be a noop when garbage collection
8324 is disabled.
8325 * Call GC_register_dynamic_libraries before stopping the world on Linux,
8326 in order to avoid a potential deadlock due to the dl_iterate_phdr lock.
8327 * Introduced a more general mechanism for platform-dependent code to
8328 decide whether the main data segment should be handled separately
8329 from dynamic libraries, or registered by GC_register_dynamic_libraries.
8330 The latter is more reliable and easier on Linux with dl_iterate_phdr.
8331
8332
8333 == [6.1] ==
8334
8335 * Added GC_MAXIMUM_HEAP_SIZE environment variable.
8336 * Fix configure.in for MIPS/LINUX (thanks to H.J. Lu).
8337 * Double page hash table size for -DLARGE_CONFIG.
8338 * Integrated Bo Thorsen's X86-64 support.
8339 * STACKBOTTOM definition for LINUX/MIPS was partially changed back
8340 (thanks to H.J. Lu and Hiroshi Kawashima for resolving this).
8341 * Replaced all occurrences of LINUX_DATA_START in gcconfig.h with
8342 SEARCH_FOR_DATA_START.  It doesn't hurt to fall back to a search.
8343 And __data_start doesn't seem to get defined correctly of the GC
8344 library is loaded with LD_PRELOAD, e.g. for leak detection.
8345 * If the GC_find_leak environment variable is set, do a
8346 atexit(GC_gcollect) to give us at least one chance to detect leaks.
8347 This may report some very benign leaks, but ...
8348 * Addeded REDIRECT_FREE.  It's necessary if we want leak detection with
8349 LD_PRELOAD.
8350 * Defer printing of leaked objects, as for smashed objects.
8351 * Fixed process and descriptor leak in GC_print_callers.  Try for
8352 line number even if we got function name.)
8353 * Ported parallel GC support and thread local allocation to Alpha.
8354 Not yet well-tested.
8355 * Added GC_DUMP_REGULARLY and added finalization statistics to GC_dump().
8356 * Fixed Makefile.am to mention alpha_mach_dep.S instead of the defunct
8357 alpha_mach_dep.s.
8358 * Incorporated a change to new_gc_alloc.h,
8359 which should make it work with gcc3.1.
8360 * Use alpha_mach_dep.S only on Linux.  (It's not clear that this is
8361 optimal, but it otherwise didn't build on Tru64.  Thanks to Fergus Henderson.)
8362 * Added ifdef to guard free() in os_dep.c.  Otherwise we get a
8363 compilation error on Irix (thanks to Dai Sato).
8364 * Added an experimental version of GC_memalign to mallocx.c.  This can't
8365 always work, since we don't handle alignment requests in the hblk-level
8366 allocator, and we can't handle arbitrary pointer displacements unless
8367 GC_all_interior_pointers is enabled.  But it should work for alignment
8368 requests up to HBLKSIZE.  This is not yet documented in the standard
8369 places.
8370 * Finally debugged the OSF1/Tru64 thread support.  This needs more testing,
8371 since I needed to add a somewhat unconvincing workaround for signal
8372 delivery issues that I don't yet completely understand.  But it does
8373 pass my tests, even in parallel GC mode.  Incremental GC support is
8374 disabled if thread support is enabled, due to the signal issues.
8375 * Eliminated name-space-incorrect definition of _cdecl from gc_cpp.h.
8376 * Added GC_debug_malloc_replacement and GC_debug_realloc_replacement
8377 declarations to gc.h.  On IA64, this is required for REDIRECT_MALLOC
8378 to work correctly with these.
8379 * Fixed Linux USE_PROC_FOR_LIBRARIES to work with a 64-bit /proc format.
8380
8381
8382 == [6.1alpha5] 2002-06-19 ==
8383
8384 * Added GC_finalizer_mem_freed, and changed some of the code that
8385 decided on heap expansion to look at it.  Memory explicitly
8386 deallocated by finalizers essentially needs to be counted as reclaimed
8387 by the GC.  Otherwise there are cases in which the heap can grow
8388 infinitely.  (Thanks to Mark Reichert for the test case.)
8389 * Integrated Adam Megacz patches to not scan dynamic libraries if
8390 we are compiling with gcc on win32.  Otherwise we need structured
8391 exception handling to deal with asynchronously unmapped root
8392 segments, and gcc doesn't directly support that.
8393 * Integrated Anthony Green's patch to support Wine.
8394 * GC_OPERATOR_NEW_ARRAY was misspelled OPERATOR_NEW_ARRAY in several
8395 places, including gc_cpp.cc (thanks to Wink Saville for pointing this out).
8396 * Integrated Loren J. Rittle's Alpha FreeBSD patches.  These also
8397 changed the declarations of symbols like _end on many platforms to
8398 that they wouldn't mistakenly be declared as short data symbols (suggested by
8399 Richard Henderson).
8400 * Integrated changes from the Debian distribution (thanks to Ryan Murray
8401 for pointing these out).
8402 Fix C++ comments in POWERPC port.  Add ARM32
8403 incremental GC support.  Get rid of USE_GENERIC_PUSH_REGS for alpha/Linux,
8404 this time for real.  Use va_copy to get rid of cord printf problems
8405 (finally).
8406 * Close file descriptor used to count CPUs (thanks to Jeff Sturm for
8407 pointing out the omission).
8408 * Don't just drop gcj free lists in GC_start_reclaim, since that can
8409 eventually cause the marker to see a bogus mark descriptor in the
8410 dropped objects.  The usual symptom was a very intermittent segmentation
8411 fault in the marker.  This mattered only if one of the GC_gcj_malloc
8412 variants was used (thanks to Michael Smith, Jeff Sturm, Bryce McKinlay and
8413 Tom Tromey for helping to track this down).
8414 * Fixed Linux and Solaris/64 SPARC configuration (thanks to David Miller,
8415 Jeff Sturm, Tom Tromey, and Christian Joensson).
8416 * Fixed a typo in strdup definition (thanks to Gerard A Allan).
8417 * Changed Makefile.direct to invoke $(CC) to assemble alpha_mach_dep.S.
8418 This is needed on Linux.  I'm not sure whether it's better or worse
8419 on Tru64.
8420 * Changed gc_cpp.h once more to declare operator new and friends only in
8421 a Microsoft environment.  This may need further fine tuning (thanks to
8422 Johannes Schmidt for pointing out that the older code breaks on gcc3.0.4).
8423 * Don't ever override strdup if it's already macro defined (thanks to
8424 Adnan Ali for pointing out the problem).
8425 * Changed gc_cpp.h yet again to also overload placement new.  Due to the
8426 C++ overloading rules, the other overloaded new operations otherwise hide
8427 placement new, which causes many STL uses to break (thanks to Reza Shahidi
8428 for reporting this, and to Matt Austern for proposing a fix).
8429 * Integrated cygwin pthreads support from Dan Bonachea.
8430 * Turn on DYNAMIC_LOADING for NetBSD (thanks to Krister Walfridsson).
8431 * Changed printing code to print more complete GC times.
8432 * Applied Mark Mitchell's Irix patch to correct some bit rot.
8433 * Clarified which object-printing routines in dbg_mlc.c should hold
8434 the allocation lock.  Restructured the code to allow reasonable object
8435 printing with -DREDIRECT_MALLOC.
8436 * Fix the Linux mmap code to always start with 0x1000 as the initial hint.
8437 Minor patches for 64-bit AIX, particularly to STACKBOTTOM (thanks to
8438 Jeffrey Mark Siskind).
8439 * Renamed "SUSPENDED" flag for Solaris threads support to avoid a conflict
8440 with a system header (thanks to Philip Brown).
8441 * Cause win32_threads.c to handle an out of range stack pointer correctly,
8442 though currently with a warning.  (Thanks to Jonathan Clark for
8443 observing that win32 applications may temporarily use the stack
8444 pointer for other purposes, and suggesting a fix.  Unfortunately, it's
8445 not clear that there is a complete solution to this problem.)
8446
8447
8448 == [6.1alpha4] 2002-06-16 ==
8449
8450 * Fixed typo in sparc_mach_dep.S, preventing the 64-bit version from
8451 building.  Increased 64-bit heap size limit in test.c slightly, since
8452 a functional SPARC collector seems to slightly exceed the old limits.
8453 * Use NPRGREG in solaris_threads.c, thus printing all registers if things
8454 go wrong.
8455 * Added GC_MARKERS environment variable to allow use of a single marker
8456 thread on an MP without confusing the lock implementation.
8457 * Collect much less aggressively in incremental mode with GC_TIME_UNLIMITED.
8458 This is really a purely generational mode, and we can afford to
8459 postpone the collection until the heap is (nearly) full.
8460 * Remove read() wrapper for MPROTECT_VDB.  It was causing more harm than
8461 good.  It is often no longer needed if system calls avoid writing to
8462 pointerful heap objects.
8463 * Fix MACOSX test in gcconfig.h (thanks to John Clements).
8464 * Change GC_test_and_set so that it consistently has one argument.
8465 Add spaces to ::: in powerpc assembly code in gc_locks.h (thanks to
8466 Ryan Murray).
8467 * Fixed a formatting error in dbg_mlc.c.  Added prototype to GC_abort()
8468 declaration (thanks to Michael Smith).
8469 * Removed "source" argument to GC_find_start().  Eliminate GC_FIND_START().
8470 * Added win32 recognition code in configure.in.  Changed some of the
8471 dllimport/export defines in gc.h (thanks to Adam Megacz).
8472 * GC_malloc_many didn't set hb_last_reclaimed when it called
8473 GC_reclaim_generic.  (I'm not sure this matters much, but ...)
8474 * Allocating uncollectible objects with debug information sometimes
8475 allocated objects that were one byte too small, since uncollectible
8476 objects don't have the extra byte added at the end (thanks to
8477 Wink Saville for pointing this out).
8478 * Added a bit more assertion checking to make sure that gcj objects
8479 on free lists never have a nonzero second word.
8480 * Replaced BCC_MAKEFILE with an up-to-date one (thanks to Andre Leiradella).
8481 * Upgraded libtool, configure.in and some related files to hopefully
8482 support NetBSD/SPARC (thanks to Adrian Bunk).  Unfortunately,
8483 libtool 1.4.2 seemed to be buggy due to missing quotes in several
8484 "test" invocations.  Fixed those in the ltmain.sh script.
8485 * Some win32-specific patches, including the introduction of
8486 GC_CreateThread (thanks to Adam Megacz).
8487 * Merged in gcj changes from Anthony Green to support embedded systems.
8488 * Tried to consistently rename preprocessed assembly files with a capital
8489 .S extension.
8490 * Use alpha_mach_dep.S on ALPHA again.  It doesn't really matter, but this
8491 makes our distribution consistent with the gcc one, avoiding future merge
8492 problems.
8493 * Move GET_MEM definition into gcconfig.h.  Include gcconfig.h slightly
8494 later in gc_priv.h to avoid forward references to ptr_t.
8495 * Add some testing of local allocation to test.c.
8496 * Change definition of INVALID_QTID in specific.h.  The -1 value was used
8497 inconsistently, and too likely to collide with a valid stack address.
8498 Some general clean-up of specific.[ch].  Added assertions.  (Thanks
8499 to Michael Smith for tracking down an intermittent bug to this
8500 general area.  I'm not sure it has been squashed yet, however.)
8501 * On Pthread systems it was not safe to call GC_malloc() between fork()
8502 and exec().  According to the applicable standards, it doesn't appear
8503 to be safe to call malloc() or many other libc functions either, thus
8504 it's not clear this is fixable.  Added experimental support for
8505 -DHANDLE_FORK in linux_threads.c which tries to support it.  It may
8506 succeed if libc does the right thing.  I'm not sure whether it does.
8507 (Thanks to Kenneth Schalk for pointing out this issue.)
8508 * Documented thread local allocation primitives to require an
8509 explicit GC_init call.  GC_init_parallel is no longer declared to
8510 be a constructor function, since that isn't portable and often
8511 seems to lead to initialization order problems.
8512 * Changed gc_cpp.cc and gc_cpp.h in one more attempt to make them
8513 compatible with Visual C++ 6 (thanks to Wink Saville for the patch).
8514 * Some more patches for Linux on HP PA-RISC.
8515 * Added include/gc_allocator.h.  It implements (hopefully) standard
8516 conforming (as opposed to SGI-style) allocators that allocate
8517 collectible (gc_allocator) or GC-traceable, but not collectible
8518 (traceable_allocator) objects.  This borrows heavily from libstc++,
8519 which borrows heavily from the SGI implementation, this part of
8520 which was written by Matt Austern.  Changed test_cpp.cc to very
8521 minimally test this.
8522 * On Linux/X86, retry mmap with a different start argument.  That should
8523 allow the collector to use more (closer to 3GB) of the address space.
8524 * Force 64 bit alignment with GCJ support (reflects Bryce McKinlay's
8525 patch to the gcc tree).
8526 * Refined the choice of sa_handler vs. sa_sigaction in GC_dirty_init
8527 to accommodate some glibc5 systems (thanks to Dan Fandrich for the patch).
8528 * Compensated for the fact that current versions of glibc set
8529 __libc_stack_end incorrectly on Linux/IA64 while initialization code
8530 is running.  This could cause the collector to miss 16 bytes of
8531 the memory stack if GC_malloc or friends where called before main().
8532 * Mostly integrated Takis Psarogiannakopoulos' port to DG/UX Inix 86.
8533 This will probably take another iteration to work, since his
8534 patch conflicted with the libtool upgrade.
8535 * Added README.arm.cross containing some information about cross-
8536 compiling to an ARM processor from Margaret Fleck (original code provided by
8537 Bradley D. LaRonde; edited by Andrej Cedilnik using some of solutions by
8538 Tilman Vogel; also ported for iPAQ by Oliver Kurth).
8539
8540
8541 == [6.1alpha3] 2002-02-07 ==
8542
8543 * Minor cleanup on the gcconfig.h section for SPARC.
8544 * Minor fix to support Intel compiler for I386/Linux (thanks to
8545 Sven Hartrumpf).
8546 * Added SPARC V9 (64-bit) support (thanks to Jeff Sturm).
8547 * Restructured the way in which we determine whether or not to keep
8548 call stacks for debug allocation.  By default SAVE_CALL_COUNT is
8549 now zero on all platforms.  Added SAVE_CALL_NARGS parameters.
8550 If possible, use execinfo.h to capture call stack.  (This should
8551 add support for a number of new platforms, though often at
8552 considerable runtime expense.)
8553 * Try to print symbolic information for call stacks.  On Linux, we
8554 do this with a combination of execinfo.h and running addr2line in
8555 a separate process.  This is both much more expensive and much more
8556 useful.  Amazingly, it seems to be fast enough for most purposes.
8557 * Redefined strdup if -DREDIRECT_MALLOC is given.
8558 * Changed incremental collector and MPROTECT_VDB implementation so that,
8559 under favorable conditions, pointer-free objects are not protected.
8560 Added GC_incremental_protection_needs() to determine ahead of time whether
8561 pointer-free objects may be protected.  Replaced GC_write_hint() with
8562 GC_remove_protection().
8563 * Added test for GC_ENABLE_INCREMENTAL environment variable.
8564 * Made GC_time_limit runtime configurable.  Added GC_PAUSE_TIME_TARGET
8565 environment variable.
8566 * Eliminated GC_page_sz, a duplicate of GC_page_size.
8567 * Caused the Solaris and Irix thread creation primitives to call
8568 GC_init_inner().
8569
8570
8571 == [6.1alpha2] 2001-12-20 ==
8572
8573 * No longer wrap read by default in multi-threaded applications.  It was
8574 pointed out on the libgcj list that this holds the allocation lock for
8575 way too long if the read blocks.  For now, reads into the heap are
8576 broken with incremental collection.  It's possible to turn this back on
8577 if you make sure that read calls don't block (e.g. by calling select
8578 first).
8579 * Fix ifdef in Solaris_threads.h to refer to GC_SOLARIS_THREADS.
8580 * Added check for environment variable GC_IGNORE_GCJ_INFO.
8581 * Added printing of stop-the-world GC times if GC_PRINT_STATS environment
8582 variable is set.
8583 * The calloc definition in leak_detector.h was missing parentheses, and
8584 realloc was missing a second argument to GC_REALLOC (thanks to
8585 Elvenlord Elrond).
8586 * Added GC_PRINT_BACK_HEIGHT environment variable and associated
8587 code, mostly in the new file backgraph.c.  See doc/README.environment.
8588 * Added -DUSE_GLOBAL_ALLOC to work around a Windows NT issue (thanks to
8589 Jonathan Clark).
8590 * Integrated port to NEC EWS4800 (MIPS-based workstation, with somewhat
8591 different address-space layout).  This may help for other machines with
8592 holes in the data segment.  (Thanks to Hironori Sakamoto.)
8593 * Changed the order in which GC_push_roots and friends push things onto
8594 the mark stack.  GC_push_all calls need to come first, since we can't
8595 necessarily recover if those overflow the mark stack.  (Thanks to
8596 Matthew Flatt for tracking down the problem.)
8597 * Some minor cleanups to mostly support the Intel compiler on Linux/IA64.
8598
8599
8600 == [6.1alpha1] 2001-09-22 ==
8601
8602 * Non-debug, atomic allocations could result in bogus smashed object
8603 reports with debugging on (thanks to Patrick Doyle for the small test case).
8604 * Fixed GC_get_register_stack_base (Itanium only) to work around a glibc
8605 2.2.4 bug.
8606 * Initial port to HP/UX on Itanium.  Thread support and both 32 and 64
8607 bit ABIs appear to work.  Parallel mark support doesn't yet, due to
8608 some inline assembly code issues.  Thread local allocation does appear
8609 to work.
8610 * ifdef'ed out glibc2.1/Itanium workaround.  I suspect nobody is using
8611 that combination anymore.
8612 * Added a patch to make new_gc_alloc.h usable with gcc3.0 (thanks to
8613 Dimitris Vyzovitis for the patch).
8614 * Debugged 64-bit support on HP/UX PA-RISC.
8615 * Turned on dynamic loading support for FreeBSD/ELF (thanks to Peter Housel).
8616 * Unregistering of finalizers with debugging allocation was broken (thanks
8617 to Jani Kajala for the test case).
8618 * Old finalizers were not returned correctly from GC_debug_register_finalizer.
8619 * Disabled MPROTECT_VDB for Linux/M68K based on a report that it doesn't work.
8620 * Cleaned up some statistics gathering code in reclaim.c (thanks to
8621 Walter Bright).
8622 * Added some support for OpenBSD/ELF/Linux (thanks to Suzuki Toshiya).
8623 * Added Jakub Jelinek's patch to use dl_iterate_phdr for dynamic library
8624 traversal to dyn_load.c.  Changed it to weakly reference dl_iterate_phdr,
8625 so that the old code is still used with old versions of glibc.
8626 * Cleaned up feature test macros for various threads packages and
8627 integrated (partially functional) FreeBSD threads code from Loren J. Rittle.
8628 It's likely that the cleanup broke something, since it touched lots of
8629 code.  It's also likely that it fixed some unreported bugs in the
8630 less common thread implementations, since some of the original code
8631 didn't stand up to close scrutiny.  Support for the next pthreads
8632 implementation should be easier to add.
8633
8634
8635 == [6.0] 2001-07-26 ==
8636
8637 * Two more bug fixes for KEEP_BACK_PTRS and DBG_HDRS_ALL.
8638 * Fixed a stack clearing problem that resulted in SIGILL with a
8639 misaligned stack pointer for multi-threaded SPARC builds.
8640 * Integrated another HURD patch (thanks to Igor Khavkine).
8641
8642
8643 == [6.0alpha9] ==
8644
8645 * added README.macros.
8646 * Made gc.mak a symbolic link to work around winzip's tendency to ignore
8647 hard links.
8648 * Simplified the setting of NEED_FIND_LIMIT in os_dep.c, possibly breaking
8649 it on untested platforms.
8650 * Integrated initial GNU HURD port (thanks to Chris Lingard and
8651 Igor Khavkine).
8652 * A few more fixes for Digital Mars compiler (by Walter Bright).
8653 * Fixed gcc version recognition.  Renamed OPERATOR_NEW_ARRAY to
8654 GC_OPERATOR_NEW_ARRAY.  Changed GC_OPERATOR_NEW_ARRAY to be the default.
8655 It can be overridden with -DGC_NO_OPERATOR_NEW_ARRAY (thanks to
8656 Cesar Eduardo Barros).
8657 * Changed the byte size to free-list mapping in thread local allocation
8658 so that size 0 allocations are handled correctly.
8659 * Fixed Linux/MIPS stackbottom for new toolchain (thanks to Ryan Murray).
8660 * Changed finalization registration to invoke GC_oom_fn when it runs out
8661 of memory.
8662 * Removed lvalue cast in finalize.c.  This caused some debug configurations
8663 not to build with some non-gcc compilers.
8664
8665
8666 == [6.0alpha8] 2001-06-15 ==
8667
8668 * Changed GC_debug_malloc_replacement and GC_debug_realloc_replacement
8669 so that they compile under Irix (thanks to Dave Love).
8670 * Updated powerpc_macosx_mach_dep.s so that it works if the collector
8671 is in a dynamic library (thanks to Andrew Begel).
8672 * Transformed README.debugging into debugging.html, updating and
8673 expanding it in the process.  Added gcdescr.html and tree.html
8674 from the web site to the GC distribution.
8675 * Fixed several problems related to PRINT_BLACK_LIST.  This involved
8676 restructuring some of the marker macros.
8677 * Fixed some problems with the sizing of objects with debug information.
8678 Finalization was broken KEEP_BACK_PTRS or PRINT_BLACK_LIST.  Reduced the
8679 object size with SHORT_DEBUG_HDRS by another word.
8680 * The "Needed to allocate blacklisted ..." warning had inadvertently
8681 been turned off by default, due to a buggy test in allchblk.c.  Turned
8682 it back on.
8683 * Removed the marker macros to deal with 2 pointers in interleaved fashion.
8684 They were messy and the performance improvement seemed minimal.  We'll
8685 leave such scheduling issues to the compiler.
8686 * Changed Linux/PowerPC test to also check for __powerpc__ in response
8687 to a discussion on the gcc mailing list.
8688 * Removed the "static" from the jmp_buf declaration in GC_generic_push_regs
8689 (suggested by Matthew Flatt).  This was causing problems in
8690 systems that register all of their own roots.  It looks far more correct
8691 to me without the "static" anyway.
8692 * Fixed several problems with thread local allocation of pointer-free or
8693 typed objects.  The collector was reclaiming thread-local free lists, since
8694 it wasn't following the link fields.
8695 * There was apparently a long-standing race condition related to
8696 multi-threaded incremental collection.  A collection could be started and
8697 a thread stopped between the memory unprotect system call and the setting of
8698 the corresponding dirt bit.  I believe this did not affect Solaris or PCR,
8699 which use a different dirty-bit implementation.  Fixed this by installing
8700 signal handlers with sigaction instead of signal, and disabling the thread
8701 suspend signal while in the write-protect handler.  (It is unclear
8702 whether this scenario ever actually occurred.)
8703 * Incremental collection did not cooperate correctly with the PARALLEL_MARK
8704 implementation of GC_malloc_many or the local_malloc primitives.  It still
8705 doesn't work well, but it shouldn't lose memory anymore.
8706 * Integrated some changes from the gcc source tree that I had previously
8707 missed (thanks to Bryce McKinlay for the reminder and patch).
8708 * Added Makefile.direct as a copy of the default Makefile, which would
8709 normally be overwritten if configure is run.
8710 * Changed the gc.tar target in Makefile.direct to embed the version number
8711 in the gc directory name.  This will affect future tar file distributions.
8712 * Changed the Irix dynamic library finding code to no longer try to
8713 eliminate writable text segments under Irix6.x, since that is probably no
8714 longer necessary, and can apparently be unsafe on occasion (thanks to
8715 Shiro Kawai for pointing this out).
8716 * GC_cleanup with GC_DEBUG enabled passed a real object base address to
8717 GC_debug_register_finalizer_ignore_self, which expected a pointer past the
8718 debug header.  Call GC_register_finalizer_ignore_self instead, even with
8719 debugging enabled (thanks to Jean-Daniel Fekete for catching this).
8720 * The collector didn't build with call chain saving enabled but NARGS=0.
8721 * Fixed up the GNU-style build files enough so that they work in some
8722 obvious cases (thanks to Maarten Thibaut).
8723 * Added initial port to Digital Mars compiler for win32 (thanks to Walter
8724 Bright).
8725
8726
8727 == [6.0alpha7] 2001-04-19 ==
8728
8729 * Added GC_finalizer_notifier.  Fixed GC_finalize_on_demand.  (The variable
8730 actually wasn't being tested at the right points.  The build-time flag
8731 was.)
8732 * Added Tom Tromey's S390 Linux patch.
8733 * Added code to push GC_finalize_now in GC_push_finalizer_structures
8734 (thanks to Matthew Flatt).
8735 * Added GC_push_gc_structures() to push all GC internal roots.
8736 * Integrated some FreeBSD changes from Matthew Flatt.
8737 * It looks like USRSTACK is not always correctly defined under Solaris.
8738 Hacked gcconfig.h to attempt to work around the problem.  The result
8739 is not well tested.  (Thanks again to Matthew Flatt for pointing this out.)
8740 * Added Ji-Yong Chung's win32 threads and C++ fixes.
8741 * Arranged for hpux_test_and_clear.s to no longer be needed or built.
8742 It was causing build problems with gas, and it's not clear this is
8743 better than the pthreads alternative on this platform.
8744 * Some MINGW32 fixes from Hubert Garavel.
8745 * Added initial Hitachi SH4 port from Kaz Kojima.
8746 * Ported thread-local allocation and parallel mark code to HP/UX on PA_RISC.
8747 * Made include/gc_mark.h more public and separated out the really private
8748 pieces.  This is probably still not quite sufficient for clients that
8749 want to supply their own kind of type information.  But it's a start.
8750 This involved lots of identifier renaming to make it namespace clean.
8751 * Added GC_dont_precollect for clients that need complete control over
8752 the root set.
8753 * GC_is_visible didn't do the right thing with gcj objects.  (Not that
8754 many people are likely to care, but ...)
8755 * Don't redefine read with GC_USE_LD_WRAP.
8756 * Initial port to LINUX/HP_PA.  Incremental collection and threads are not
8757 yet supported.  (Incremental collection should work if you have the
8758 right kernel.  Threads may work with a sufficiently patched pthread
8759 library.)
8760 * Changed gcconfig.h to recognize __i386__ as an alternative to i386 in
8761 many places (thanks to Benjamin Lerman).
8762 * Made win32_threads.c more tolerant of detaching a thread that it didn't
8763 know about (thanks to Paul Nash).
8764 * Added Makefile.am and configure.in from gcc to the distribution, with
8765 minimal changes.  For the moment, those are just placeholders.  In the
8766 future, we're planning to switch to a GNU-style build environment for
8767 Un*x-like systems, though the old Makefile will remain as a backup.
8768 * Turned off STUBBORN_ALLOC by default, and added it back as a Makefile
8769 option.
8770 * Redistributed some functions between malloc.c and mallocx.c, so that
8771 simple statically linked apps no longer pull in mallocx.o.
8772 * Changed large object allocation to clear the first and last few words
8773 of each block before releasing the lock.  Otherwise the marker could see
8774 objects with nonsensical type descriptors.
8775 * Fixed a couple of subtle problems that could result in not recognizing
8776 interior pointers from the stack.  (I believe these were introduced
8777 in 6.0alpha6.)
8778 * GC_debug_free_inner called GC_free, which tried to reacquire the
8779 allocator lock, and hence deadlocked.  (DBG_HDRS_ALL probably never worked
8780 with threads.)
8781 * Fixed several problems with back traces.  Accidental references to a free
8782 list could cause the free list pointer to be overwritten by a back pointer.
8783 There seemed to be some problems with the encoding of root and finalizer
8784 references.
8785
8786
8787 == [6.0alpha6] ==
8788
8789 * Changed the definition of DATASTART on ALPHA and IA64, where data_start
8790 and __data_start are not defined by earlier versions of glibc.  This might
8791 need to be fixed on other platforms as well.
8792 * Changed the way the stack base and backing store base are found on IA64.
8793 This should now remain reliable on future kernels.  But since it relies
8794 on /proc, it will no longer work in the simulated NUE environment.
8795 * Made the call to random() in dbg_mlc.c with -DKEEP_BACK_PTRS dependent
8796 on the OS.  On non-Unix systems, rand() should be used instead.  Handled
8797 small RAND_MAX (thanks to Peter Ross for pointing this out).
8798 * Fixed the cord make rules to create the cord subdirectory, if necessary
8799 (thanks to Doug Moen).
8800 * Changed fo_object_size calculation in finalize.c.  Turned finalization
8801 of non-heap object into a no-op.  Removed anachronism from GC_size()
8802 implementation.
8803 * Changed GC_push_dirty call in solaris_threads.c to GC_push_selected.
8804 It was missed in a previous renaming (thanks to Vladimir Tsichevski
8805 for pointing this out).
8806 * Arranged to not mask SIGABRT in linux_threads.c (thanks to Bryce McKinlay).
8807 * Added GC_no_dls hook for applications that want to register their own
8808 roots.
8809 * Integrated Kjetil Matheussen's Amiga changes.
8810 * Added FREEBSD_STACKBOTTOM.  Changed the X86/FreeBSD port to use it
8811 (thanks to Matthew Flatt).
8812 * Added pthread_detach interception for platforms supported by linux_threads.c
8813 and irix_threads.c.
8814 * Changed the USE_MMAP code to check for the case in which we got the
8815 high end of the address space, i.e. mem_ptr + mem_sz == 0.  It appears
8816 that this can happen under Solaris 7.  It seems to be allowed by what
8817 I would claim is an oversight in the mmap specification.  (Thanks to
8818 Toshio Endo for pointing out the problem.)
8819 * Cleanup of linux_threads.c.  Some code was originally cloned from
8820 irix_threads.c and now unnecessary.  Some comments were obviously wrong.
8821 * (Mostly) fixed a longstanding problem with setting of dirty bits from
8822 a signal handler.  In the presence of threads, dirty bits could get lost,
8823 since the getting of a bit in the bit vector was not atomic with respect
8824 to other updates.  The fix is 100% correct only for platforms for which
8825 GC_test_and_set is defined.  The goal is to make that all platforms with
8826 thread support.  Matters only if incremental GC and threads are both
8827 enabled.
8828 * made GC_all_interior_pointers (a.k.a. ALL_INTERIOR_POINTERS) an
8829 initialization time, instead of build-time option.  This is a
8830 nontrivial, high risk change.  It should slow down the code measurably
8831 only if MERGE_SIZES is not defined, which is a very nonstandard
8832 configuration.
8833 * Added doc/README.environment, and implemented what it describes.  This
8834 allows a number of additional configuration options to be set through
8835 the environment.  It documents a few previously undocumented options.
8836 * Integrated Eric Benson's leak testing improvements.
8837 * Removed the option to throw away the beginning of each page (DISCARD_WORDS).
8838 This became less and less useful as processors enforce stricter alignment.
8839 And it hadn't been tested in ages, and was thus probably broken anyway.
8840
8841
8842 == [6.0alpha5] ==
8843
8844 * Changed the definition of GC_pause in linux_threads.c to use a volatile
8845 asm.  Some versions of gcc apparently optimize away writes to local volatile
8846 variables.  This caused poor locking behavior starting at about
8847 4 processors.
8848 * Added GC_start_blocking(), GC_end_blocking() calls and wrapper for sleep
8849 to linux_threads.c.
8850 The first two calls could be used to generally avoid sending GC signals to
8851 blocked threads, avoiding both premature wakeups and unnecessary overhead.
8852 * Fixed a serious bug in thread-local allocation.  At thread termination,
8853 GC_free could get called on small integers.  Changed the code for thread
8854 termination to more efficiently return left-over free-lists.
8855 * Integrated Kjetil Matheussen's BeOS support.
8856 * Rearranged the directory structure to create the doc and tests
8857 subdirectories.
8858 * Sort of integrated Eric Benson's patch for OSF1.  This provided basic
8859 OSF1 thread support by suitably extending hpux_irix_threads.c.  Based
8860 on earlier email conversations with David Butenhof, I suspect that it
8861 will be more reliable in the long run to base this on linux_threads.c
8862 instead.  Thus I attempted to patch up linux_threads.c based on Eric's code.
8863 The result is almost certainly broken, but hopefully close enough that
8864 someone with access to a machine can pick it up.
8865 * Integrated lots of minor changes from the NetBSD distribution.  (These
8866 were supplied by David Brownlee.  I'm not sure about the original
8867 authors.)
8868 * Hacked a bit more on the HP/UX thread-support in linux_threads.c.  It
8869 now appears to work in the absence of incremental collection.  Renamed
8870 hpux_irix_threads.c back to irix_threads.c, and removed the attempt to
8871 support HPUX there.
8872 * Changed gc.h to define _REENTRANT in cases in which it should already
8873 have been defined. It is still safer to also define it on the command
8874 line.
8875
8876
8877 == [6.0alpha4] ==
8878
8879 * Moved up the detection of mostly full blocks to the initiation of the
8880 sweep phase.  This eliminates some lock contention in the PARALLEL_MARK case,
8881 as multiple threads try to look at mostly full blocks concurrently.
8882 * Restored the code in GC_malloc_many that grabs a prefix of the global
8883 free list.  This avoids the case in which every GC_malloc_many call
8884 tries and fails to allocate a new heap block, and the returns a single
8885 object from the global free list.
8886 * Some minor fixes in new_hblk.c.  (Attempted to build free lists in order
8887 of increasing addresses instead of decreasing addresses for cache performance
8888 reasons.  But this seems to be only a very minor gain with -DEAGER_SWEEP,
8889 and a loss in other cases.  So the change was backed out.)
8890 * Fixed some of the documentation (thanks in large part to Fergus Henderson).
8891 * Fixed the Linux USE_PROC_FOR_LIBRARIES code to deal with apps that perform
8892 large numbers of mmaps (thanks to Eric Benson).  Also fixed that code to
8893 deal with short reads.
8894 * Added GC_get_total_bytes().
8895 * Fixed leak detection mode to avoid spurious messages under linuxthreads.
8896 (This should also now be easy for the other supported threads packages.
8897 But the code is tricky enough that I'm hesitant to do it without being able
8898 to test.  Everything allocated in the GC thread support itself should be
8899 explicitly deallocated.)
8900 * Made it possible (with luck) to redirect malloc to GC_local_malloc.
8901
8902
8903 == [6.0alpha3] 2000-09-26 ==
8904
8905 * Fixed the /proc/self/maps code to not seek, since that apparently is not
8906 reliable across all interesting kernels.
8907 * Fixed some compilation problems in the absence of PARALLEL_MARK
8908 (introduced in alpha2).
8909 * Fixed an algorithmic problem with PARALLEL_MARK.  If work needs to
8910 be given back to the main mark "stack", the BOTTOM entries of the local
8911 stack should be given away, not the top ones.  This has substantial
8912 performance impact, especially for > 2 processors, from what I can tell.
8913 * Extracted gc_lock.h from gc_priv.h.  This should eventually make it a
8914 bit easier to avoid including gc_priv.h in clients.
8915 * Moved all include files to include/ and removed duplicate links to the
8916 same file.  The old scheme was a bad idea because it was too easy to get the
8917 copies out of sync, and many systems don't support hard links.
8918 Unfortunately, it's likely that I broke some of the non-Unix Makefiles in
8919 the process, although I tried to update them appropriately.
8920 * Removed the partial support for a copied nursery.  It's not clear that
8921 this would be a tremendous win, since we don't consistently lose to
8922 generational copying collectors.  And it would significantly complicate
8923 many things.  May be reintroduced if/when it really turns out to win.
8924 * Removed references to IRIX_JDK_THREADS, since I believe there never
8925 were and never will be any clients.
8926 * Added some code to linux_threads.c to possibly support HPUX threads
8927 using the Linux code.  Unfortunately, it doesn't work yet, and is
8928 currently disabled.
8929 * Added support under Linux/X86 for saving the call chain, both in (debug)
8930 objects for client debugging, and in GC_arrays._last_stack for GC
8931 debugging.  This was previously supported only under Solaris.  It is
8932 not enabled by default under X86, since it requires that code be compiled
8933 to explicitly gave frame pointers on the call stack.  (With gcc this
8934 currently happens by default, but is often turned off explicitly.)
8935 To turn it on, define SAVE_CALL_CHAIN.
8936
8937
8938 == [6.0alpha2] ==
8939
8940 * Added USE_MARK_BYTES to reduce the need for compare-and-swap on platforms
8941 for which that's expensive.
8942 * Fixed a locking bug ib GC_gcj_malloc and some locking assertion problems.
8943 * Added a missing volatile to OR_WORD and renamed the parameter to
8944 GC_compare_and_swap so it's not a C++ reserved word (thanks to
8945 Toshio Endo for pointing out both of those).
8946 * Changed Linux dynamic library registration code to look at /proc/self/maps
8947 instead of the rld data structures when REDIRECT_MALLOC is defined.
8948 Otherwise some of the rld data data structures may be prematurely garbage
8949 collected.
8950 * Fixed USE_LD_WRAP a bit more, so it should now work without threads.
8951 * Renamed XXX_THREADS macros to GC_XXX_THREADS for namespace correctness.
8952 Temporarily added some backward compatibility definitions.  Renamed
8953 USE_LD_WRAP to GC_USE_LD_WRAP.
8954 * Many MACOSX POWERPC changes, some additions to the gctest output, and
8955 a few minor generic bug fixes (thanks to Dietmar Planitzer).
8956
8957
8958 == [6.0alpha1] ==
8959
8960 * Added HP/PA prefetch support.
8961 * Added -DDBG_HDRS_ALL and -DSHORT_DBG_HDRS to reduce the cost and improve
8962 the reliability of generating pointer backtrace information, e.g. in
8963 the Bigloo environment.
8964 * Added parallel marking support (-DPARALLEL_MARK).  This currently
8965 works only under IA32 and IA64 Linux, but it shouldn't be hard to adapt
8966 to other platforms.  This is intended to be a lighter-weight (less
8967 new code, probably not as scalable) solution than the work by Toshio Endo
8968 et al, at the University of Tokyo.  A number of their ideas were
8969 reused, though the code wasn't, and the underlying data structure
8970 is significantly different.  In particular, we keep the global mark
8971 stack as a single shared data structure, but most of the work is done
8972 on smaller thread-local mark stacks.
8973 * Changed GC_malloc_many to be cheaper, and to require less mutual exclusion
8974 with -DPARALLEL_MARK.
8975 * Added full support for thread local allocation under Linux
8976 (-DTHREAD_LOCAL_ALLOC).  This is a thin veneer on GC_malloc_many, and
8977 should be easily portable to other platforms, especially those that
8978 support pthreads.
8979 * CLEAR_DOUBLE was not always getting invoked when it should have been.
8980 * GC_gcj_malloc and friends used different out of memory handling than
8981 everything else, probably because I forgot about one when I implemented
8982 the other.  They now both call GC_oom_fn(), not GC_oom_action().
8983 * Integrated Jakub Jelinek's fixes for Linux/SPARC.
8984 * Moved GC_objfreelist, GC_aobjfreelist, and GC_words_allocd out of
8985 GC_arrays, and separately registered the first two as excluded roots.
8986 This makes code compiled with gc_inl.h less dependent on the
8987 collector version.  (It would be nice to remove the inclusion of
8988 gc_priv.h by gc_inl.h completely, but we're not there yet.  The
8989 locking definitions in gc_priv.h are still referenced.)
8990 This change was later conditioned on SEPARATE_GLOBALS, which
8991 is not defined by default, since it involves a performance hit.
8992 * Register GC_obj_kinds separately as an excluded root region.  The
8993 attempt to register it with GC_arrays was usually failing.  (This wasn't
8994 serious, but seemed to generate some confusion.)
8995 * Moved backptr.h to gc_backptr.h.
8996
8997
8998 == [5.4] ==
8999
9000 * Fixed a typo that prevented compilation with -DUSE_3DNOW_PREFETCH (thanks to
9001 Shawn Wagner for actually testing this).
9002 * Fixed GC_is_thread_stack in solaris_threads.c.  It forgot to return a value
9003 in the common case.
9004 * Fixed another silly syntax problem in GC_double_descr (thanks to
9005 Fergus Henderson for finding it).
9006 * Fixed a GC_gcj_malloc bug: It tended to release the allocator lock twice.
9007
9008
9009 == [5.3] 2000-09-24 ==
9010
9011 * Fixed _end declaration for OSF1.
9012 * There were lots of spurious leak reports in leak detection mode, caused
9013 by the fact that some pages were not being swept, and hence unmarked
9014 objects weren't making it onto free lists.  (This bug dated back to 5.0.)
9015 * Fixed a typo in the liblinuxgc.so Makefile rule.
9016 * Added the GetExitCodeThread to Win32 GC_stop_world to (mostly) work
9017 around a Windows 95 GetOpenFileName problem (thanks to Jacob Navia).
9018
9019
9020 == [5.2] ==
9021
9022 * dyn_load.c declared GC_scratch_last_end_ptr as an extern even if it
9023 was defined as a macro.  This prevented the collector from building on
9024 Irix.
9025 * We quietly assumed that indirect mark descriptors were never 0.
9026 Our own typed allocation interface violated that.  This could result
9027 in segmentation faults in the marker with typed allocation.
9028 * Fixed a _DUSE_MUNMAP bug in the heap block allocation code (thanks to
9029 Ben Hutchings for the patch).
9030 * Taught the collector about VC++ handling array operator new (thanks to
9031 Ben Hutchings for the patch).
9032 * The two copies of gc_hdrs.h had diverged.  Made one a link to the other
9033 again.
9034
9035
9036 == [5.1] ==
9037
9038 * Fixed a gc.h header bug which showed up under Irix (thanks to Dan Sullivan).
9039 * Fixed a typo in GC_double_descr in typd_mlc.c.
9040 This probably could result in objects described by array descriptors not
9041 getting traced correctly (thanks to Ben Hutchings for pointing this out).
9042 * The block nearly full tests in reclaim.c were not correct for 64 bit
9043 environments.  This could result in unnecessary heap growth under unlikely
9044 conditions.
9045
9046
9047 == [5.0] ==
9048
9049 * Fixed threadlibs.c for linux threads.  -DUSE_LD_WRAP was broken and
9050 -ldl was omitted.  Fixed Linux stack finding code to handle
9051 -DUSE_LD_WRAP correctly.
9052 * Added MSWIN32 exception handler around marker, so that the collector
9053 can recover from root segments that are unmapped during the collection.
9054 This caused occasional failures under Windows 98, and may also be
9055 an issue under Windows NT/2000.
9056
9057
9058 == [5.0alpha7] ==
9059
9060 * -DREDIRECT_MALLOC was broken in alpha6. Fixed.
9061 * Cleaned up gc_ccp.h slightly, thus also causing the HP C++ compiler to
9062 accept it.
9063 * Removed accidental reference to dbg_mlc.c, which caused dbg_mlc.o to be
9064 linked into every executable.
9065 * Added PREFETCH to bitmap marker.  Changed it to use the header cache.
9066 * GC_push_marked sometimes pushed one object too many, resulting in a
9067 segmentation fault in GC_mark_from_mark_stack.  This was probably an old
9068 bug.  It finally showed up in gctest on win32.
9069 * Gc_priv.h erroneously #defined GC_incremental to be TRUE instead of FALSE
9070 when SMALL_CONFIG was defined.  This was no doubt a major performance bug for
9071 the default win32 configuration.
9072 * Removed -DSMALL_CONFIG from NT_MAKEFILE.  It seemed like an anachronism now
9073 that the average PC has 64MB or so.
9074 * Integrated Bryce McKinlay's patches for linux threads and dynamic loading
9075 from the libgcj tree.  Turned on dynamic loading support for Linux/PPC.
9076 * Changed the stack finding code to use environ on HP/UX (thanks
9077 to Gustavo Rodriguez-Rivera for the suggestion).  This should
9078 probably be done on other platforms, too.  Since I can't test those, that'll
9079 wait until after 5.0.
9080
9081
9082 == [5.0alpha6] ==
9083
9084 * GC_malloc_explicitly_typed and friends sometimes failed to
9085 initialize first word.
9086 * Added allocation routines and support in the marker for mark descriptors
9087 in a type structure referenced by the first word of an object.  This was
9088 introduced to support gcj, but hopefully in a way that makes it
9089 generically useful.
9090 * Added GC_requested_heapsize, and inhibited collections in non-incremental
9091 mode if the actual used heap size is less than what was explicitly
9092 requested.
9093 * The Solaris pthreads version of GC_pthread_create didn't handle a NULL
9094 attribute pointer.  Solaris thread support used the wrong default thread
9095 stack size (thanks to Melissa O'Neill for the patch).
9096 * Changed PUSH_CONTENTS macro to no longer modify first parameter.
9097 This usually doesn't matter, but it was certainly an accident waiting
9098 to happen ...
9099 * Added GC_register_finalizer_no_order and friends to gc.h.  They're
9100 needed by Java implementations.
9101 * Integrated a fix for a win32 deadlock resulting from clock() calling
9102 malloc (thanks to Chris Dodd).
9103 * Integrated Hiroshi Kawashima's port to Linux/MIPS.  This was designed
9104 for a handheld platform, and may or may not be sufficient for other
9105 machines.
9106 * Fixed a va_arg problem with the %c specifier in cordprnt.c.  It appears
9107 that this was always broken, but recent versions of gcc are the first to
9108 report the (statically detectable) bug.
9109 * Added an attempt at a more general solution to dlopen races/deadlocks.
9110 GC_dlopen now temporarily disables collection.  Still not ideal, but ...
9111 * Added -DUSE_I686_PREFETCH, -DUSE_3DNOW_PREFETCH, and support for IA64
9112 prefetch instructions.  May improve performance measurably, but I'm not
9113 sure the code will run correctly on processors that don't support the
9114 instruction.  Won't build except with very recent gcc.
9115 * Added caching for header lookups in the marker.  This seems to result
9116 in a barely measurable performance gain.  Added support for interleaved
9117 lookups of two pointers, but unconfigured that since the performance
9118 gain is currently near zero, and it adds to code size.
9119 * Changed Linux DATASTART definition to check both data_start and
9120 __data_start, since nothing else seems to be portable.
9121 * Added -DUSE_LD_WRAP to optionally take advantage of the GNU ld function
9122 wrapping mechanism.  Probably currently useful only on Linux.
9123 * Moved some variables for the scratch allocator into GC_arrays (suggested
9124 by Martin Hirzel).
9125 * Fixed a win32 threads bug that caused the collector to not look for
9126 interior pointers from one of the thread stacks without
9127 ALL_INTERIOR_POINTERS (thanks to Jeff Sturm).
9128 * Added Mingw32 support (thanks to Jeff Sturm for the patch).
9129 * Changed the alpha port to use the generic register scanning code instead
9130 of alpha_mach_dep.s.  Alpha_mach_dep.s doesn't look for pointers in fp
9131 registers, but gcc sometimes spills pointers there (thanks to Manuel Serrano
9132 for helping debug this).  Changed the IA64 code to
9133 do something similar for similar reasons.
9134
9135
9136 == [5.0alpha4] 1999-10-30 ==
9137
9138 * Added protection fault handling patch for Linux/M68K from Fergus
9139 Henderson and Roman Hodek.
9140 * Removed the tests for SGI_SOURCE in new_gc_alloc.h.  This was causing that
9141 interface to fail on non-SGI platforms.
9142 * Changed the Linux stack finding code to use /proc, after changing it
9143 to use HEURISTIC1 (thanks to David Mossberger for pointing out /proc hook).
9144 * Added HP/UX incremental GC support and HP/UX 11 thread support.
9145 Thread support is currently still flaky.
9146 * Added basic Linux/IA64 support.
9147 * Integrated Anthony Green's PicoJava support.
9148 * Integrated Scott Ananian's StrongARM/NetBSD support.
9149 * Fixed some fairly serious performance bugs in the incremental
9150 collector.  These have probably been there essentially forever.
9151 (Mark bits were sometimes set before scanning dirty pages.
9152 The reclaim phase unnecessarily dirtied full small object pages.)
9153 * Changed the reclaim phase to ignore nearly full pages to avoid
9154 touching them.
9155 * Limited GC_black_list_spacing to roughly the heap growth increment.
9156 * Changed full collection triggering heuristic to decrease full GC
9157 frequency by default, but to explicitly trigger full GCs during
9158 heap growth.  This doesn't always improve things, but on average it's
9159 probably a win.
9160 * GC_debug_free(0, ...) failed (thanks to Fergus Henderson for the
9161 bug report and fix).
9162
9163
9164 == [5.0alpha3] 1999-09-15 ==
9165
9166 (Also known as 4.15alpha3.)
9167 * Added some highly incomplete code to support a copied young generation.
9168 Comments on nursery.h are appreciated.
9169 * Changed -DFIND_LEAK, -DJAVA_FINALIZATION, and -DFINALIZE_ON_DEMAND,
9170 so the same effect could be obtained with a runtime switch.   This is
9171 a step towards standardizing on a single dynamic GC library.
9172 * Significantly changed the way leak detection is handled, as a consequence
9173 of the above.
9174
9175
9176 == [5.0alpha2] 1999-07-23 ==
9177
9178 * Fixed bugs introduced in alpha1 (OpenBSD & large block initialization).
9179 * Added -DKEEP_BACK_PTRS and backptr.h interface.  (The implementation
9180 idea came from Alan Demers.)
9181
9182
9183 == [5.0alpha1] 1999-06-30 ==
9184
9185 (Also known as 4.15alpha1.)
9186 * Reworked large block allocator.  Now uses multiple doubly linked free
9187 lists to approximate best fit.
9188 * Changed heap expansion heuristic.  Entirely free blocks are no longer
9189 counted towards the heap size.  This seems to have a major impact on
9190 heap size stability; the old version could expand the heap way too
9191 much in the presence of large block fragmentation.
9192 * added -DGC_ASSERTIONS and some simple assertions inside the collector.
9193 This is mainlyt for collector debugging.
9194 * added -DUSE_MUNMAP to allow the heap to shrink.  Supported on only
9195 a few UNIX-like platforms for now.
9196 * added GC_dump_regions() for debugging of fragmentation issues.
9197 * Changed PowerPC pointer alignment under Linux to 4.
9198 * Changed the Linux/Alpha port to walk the data segment backwards until
9199 it encounters a SIGSEGV.  The old way to find the start of the data
9200 segment broke with a recent release.
9201 * cordxtra.c needed to call GC_REGISTER_FINALIZER instead of
9202 GC_register_finalizer, so that it would continue to work with GC_DEBUG.
9203 * allochblk sometimes cleared the wrong block for debugging purposes
9204 when it dropped blacklisted blocks.  This could result in spurious
9205 error reports with GC_DEBUG.
9206 * added MACOS X Server support (thanks to Andrew Stone).
9207 * Changed the Solaris threads code to ignore stack limits > 8 MB with
9208 a warning.  Empirically, it is not safe to access arbitrary pages
9209 in such large stacks.  And the dirty bit implementation does not
9210 guarantee that none of them will be accessed.
9211 * Integrated Martin Tauchmann's Amiga changes.
9212 * Integrated James Dominy's OpenBSD/SPARC port.
9213
9214
9215 == [4.14] 1999-04-16 ==
9216
9217 * changed STACKBOTTOM for DJGPP (thanks to Salvador Eduardo Tropea).
9218
9219
9220 == [4.14alpha2] 1999-03-26 ==
9221
9222 * -DSMALL_CONFIG did not work reliably with large (> 4K) pages.
9223 Recycling the mark stack during expansion could result in a size
9224 zero heap segment, which confused things.  (This was probably also an
9225 issue with the normal config and huge pages.)
9226 * Did more work to make sure that callee-save registers were scanned
9227 completely, even with the setjmp-based code.  Added USE_GENERIC_PUSH_REGS
9228 macro to facilitate testing on machines I have access to.
9229 * Added code to explicitly push register contents for win32 threads.
9230 This seems to be necessary.  (Thanks to Pierre de Rop.)
9231
9232
9233 == [4.14alpha1] 1999-03-10 ==
9234
9235 * Fixed GC_print_source_ptr to not use a prototype.
9236 * generalized CYGWIN test.
9237 * gc::new did the wrong thing with PointerFreeGC placement (thanks to
9238 Rauli Ruohonen).
9239 * In the ALL_INTERIOR_POINTERS (default) case, some callee-save register
9240 values could fail to be scanned if the register was saved and
9241 reused in a GC frame.  This showed up in verbose mode with gctest
9242 compiled with an unreleased SGI compiler.  I vaguely recall an old
9243 bug report that may have been related.  The bug was probably quite old.
9244 (The problem was that the stack scanning could be deferred until
9245 after the relevant frame was overwritten, and the new save location
9246 might be outside the scanned area.  Fixed by more eager stack scanning.)
9247 * PRINT_BLACK_LIST had some problems.  A few source addresses were garbage.
9248 * Replaced Makefile.dj and added -I flags to cord make targets (thanks to
9249 Gary Leavens).
9250 * GC_try_to_collect was broken with the non-incremental collector.
9251 * gc_cleanup destructors could pass the wrong address to
9252 GC_register_finalizer_ignore_self in the presence of multiple
9253 inheritance (thanks to Darrell Schiebel).
9254 * Changed PowerPC Linux stack finding code.
9255
9256
9257 == [4.13] 1999-02-19 ==
9258
9259 * Fixed a crucial bug in the Watcom port.  There was a redundant declaration
9260 of GC_push_one in gc_priv.h.
9261 * Added FINALIZE_ON_DEMAND.
9262 * Fixed some pre-ANSI cc problems in test.c.
9263 * Removed getpagesize() use for Solaris.  It seems to be missing in one
9264 or two versions.
9265 * Fixed bool handling for SPARCCompiler version 4.2.
9266 * Fixed some files in include that had gotten unlinked from the main
9267 copy.
9268 * Some RS/6000 fixes (missing casts).  (Thanks to Toralf Foerster.)
9269 * Fixed several problems in GC_debug_realloc, affecting mostly the
9270 FIND_LEAK case.
9271 * GC_exclude_static_roots contained a buggy unsigned comparison to
9272 terminate a loop (thanks to Wilson Ho).
9273 * CORD_str failed if the substring occurred at the last possible position.
9274 (Only affects cord users.)
9275 * Fixed Linux code to deal with RedHat 5.0 and integrated Peter Bigot's
9276 os_dep.c code for dealing with various Linux versions.
9277 * Added workaround for Irix pthreads sigaction bug and possible signal
9278 misdirection problems.
9279
9280
9281 == [4.13alpha3] 1998-12-08 ==
9282
9283 * Fixed MSWIN32 recognition test, which interfered with cygwin.
9284 * Removed unnecessary gc_watcom.asm from distribution.  Removed
9285 some obsolete README.win32 text.
9286 * Added Alpha Linux incremental GC support (thanks to Philipp Tomsich
9287 for code for retrieving the fault address in a signal handler).
9288 Changed Linux signal handler context argument to be a pointer.
9289 * Took care of some new warnings generated by the 7.3 SGI compiler.
9290 * Integrated Phillip Musumeci's FreeBSD/ELF fixes.
9291 * -DIRIX_THREADS was broken with the -o32 ABI (typo in gc_priv.h).
9292
9293
9294 == [4.13alpha2] 1998-08-08 ==
9295
9296 * Fixed more Linux threads problems.
9297 * Changed default GC_free_space_divisor to 3 with new large block allocation
9298 (thanks to Matthew Flatt for some measurements that suggest the old
9299 value sometimes favors space too much over time).
9300 * More CYGWIN32 fixes.
9301 * Integrated Tyson Dowd's Linux-M68K port.
9302 * Minor HP PA and DEC UNIX fixes from Fergus Henderson.
9303 * Integrated Christoffe Raffali's Linux-SPARC changes.
9304 * Allowed for one more GC fixup iteration after a full GC in incremental
9305 mode.  Some quick measurements suggested that this significantly
9306 reduces pause times even with smaller GC_RATE values.
9307 * Moved some more GC data structures into GC_arrays.  This decreases
9308 pause times and GC overhead, but makes debugging slightly less convenient.
9309 * Fixed namespace pollution problem ("excl_table").
9310 * Made GC_incremental a constant for -DSMALL_CONFIG, hopefully shrinking
9311 that slightly.
9312 * Added some win32 threads fixes.
9313 * Integrated Ivan Demakov and David Stes' Watcom fixes.
9314 * Various other minor fixes contributed by many people.
9315 * Renamed config.h to gcconfig.h, since config.h tends to be used for
9316 many other things.
9317 * Integrated Matthew Flatt's support for 68K MacOS "far globals".
9318 * Fixed up some of the dynamic library Makefile targets for consistency
9319 across platforms.
9320 * Fixed a USE_MMAP typo that caused out-of-memory handling to fail
9321 on Solaris.
9322 * Added code to test.c to test thread creation a bit more.
9323 * Integrated GC_win32_free_heap (as suggested by Ivan Demakov).
9324 * Fixed Solaris 2.7 stack base finding problem.  (This may actually
9325 have been done in an earlier alpha release.)
9326
9327
9328 == [4.13alpha1] 1998-02-17 ==
9329
9330 * Changed RS6000 STACKBOTTOM.
9331 * Integrated Patrick Beard's Mac changes.
9332 * Alpha1 didn't compile on Irix m.n, m < 6.
9333 * Replaced Makefile.dj with a new one from Gary Leavens.
9334 * Added Andrew Stitcher's changes to support SCO OpenServer.
9335 * Added PRINT_BLACK_LIST, to allow debugging of high densities of false
9336 pointers.
9337 * Added code to debug allocator to keep track of return address
9338 in GC_malloc caller, thus giving a bit more context.
9339 * Changed default behavior of large block allocator to more
9340 aggressively avoid fragmentation.  This is likely to slow down the
9341 collector when it succeeds at reducing space cost.
9342 * Integrated Fergus Henderson's CYGWIN32 changes.  They are untested,
9343 but needed for newer versions.
9344 * USE_MMAP had some serious bugs.  This caused the collector to fail
9345 consistently on Solaris with -DSMALL_CONFIG.
9346 * Added Linux threads support (thanks to Fergus Henderson).
9347
9348
9349 == [4.12] 1997-08-26 ==
9350
9351 * Fixed ElfW definition in dyn_load.c.
9352 This prevented the dynamic library support from compiling on some
9353 older ELF Linux systems.
9354 * Fixed UTS4 port (which I apparently mangled during the integration).
9355 (Thanks to Alistair Crooks.)
9356 * "Make C++" failed on Suns with SC4.0, due to a problem with "bool".
9357 Fixed in gc_priv.h.
9358 * Added more pieces for GNU win32 (thanks to Timothy N. Newsham).
9359 The current state of things should suffice for at least some
9360 applications.
9361 * Changed the out of memory retry count handling.  (This matters only
9362 if GC_max_retries > 0, which is no longer the default.)
9363 * If a /proc read failed repeatedly, GC_written_pages was not updated
9364 correctly (thanks to Peter Chubb for diagnosing this).
9365 * Under unlikely circumstances, the allocator could infinite loop in
9366 an out of memory situation (thanks to Kenjiro Taura for
9367 identifying the problem and supplying a fix).
9368 * Fixed a syntactic error in the DJGPP code.  Also fixed a test program
9369 problem with DJGPP (thanks to Fergus Henderson and Peter Monks).
9370 * Atomic uncollectible objects were not treated correctly by the
9371 incremental collector.  This resulted in weird log statistics and
9372 occasional performance problems (thanks to Peter Chubb for pointing this out).
9373 * Fixed some problems resulting from compilers that don't define
9374 __STDC__.  In this case void * and char * were used inconsistently
9375 in some cases.  (Void * should not have been used at all.  If
9376 you have an ANSI superset compiler that does not define __STDC__,
9377 please compile with -D__STDC__=0.  Thanks to Manuel Serrano and others
9378 for pointing out the problem.)
9379 * Fixed a compilation problem on Irix with -n32 and -DIRIX_THREADS.
9380 Also fixed some other IRIX_THREADS problems which may or may not have
9381 had observable symptoms.
9382 * Fixed an HP PA compilation problem in dyn_load.c (thanks to
9383 Philippe Queinnec).
9384 * SEGV fault handlers sometimes did not get reset correctly (thanks
9385 to David Pickens).
9386 * Added a fix for SOLARIS_THREADS on Intel (thanks to David Pickens).
9387 This probably needs more work to become functional.
9388 * Fixed struct sigcontext_struct in os_dep.c for compilation under
9389 Linux 2.1.X (thanks to Fergus Henderson).
9390 * Changed the DJGPP STACKBOTTOM and DATASTART values to those ones suggested
9391 (by Kristian Kristensen).  These may still not be right, but it is
9392 it is likely to work more often than what was there before.  They may
9393 even be exactly right.
9394 * Added a #include <string.h> to test_cpp.cc.  This appears to help
9395 with HP/UX and gcc (thanks to Assar Westerlund).
9396 * Version 4.11 failed to run in incremental mode on recent 64-bit Irix
9397 kernels.  This was a problem related to page unaligned heap segments.
9398 Changed the code to page align heap sections on all platforms.
9399 (I had mistakenly identified this as a kernel problem earlier.
9400 It was not.)
9401 * Version 4.11 did not make allocated storage executable, except on
9402 one or two platforms, due to a bug in a #if test (thanks to David Grove
9403 for pointing this out).
9404 * Added sparc_sunos4_mach_dep.s to support Sun's compilers under SunOS4.
9405 * Added GC_exclude_static_roots.
9406 * Fixed the object size mapping algorithm.  This shouldn't matter,
9407 but the old code was ugly.
9408 * Heap checking code could die if one of the allocated objects was
9409 larger than its base address.  (Unsigned underflow problem.  Thanks
9410 to Clay Spence for isolating the problem.)
9411 * Added RS6000 (AIX) dynamic library support and fixed STACK_BOTTOM (thanks
9412 to Fred Stearns).
9413 * Added Fergus Henderson's patches for improved robustness with large
9414 heaps and lots of blacklisting.
9415 * Added Peter Chubb's changes to support Solaris Pthreads, to support
9416 MMAP allocation in Solaris, to allow Solaris to find dynamic libraries
9417 through /proc, to add malloc_typed_ignore_off_page, and a few other
9418 minor features and bug fixes.
9419 * The Solaris 2 port should not use sbrk.  I received confirmation from
9420 Sun that the use of sbrk and malloc in the same program is not
9421 supported.  The collector now defines USE_MMAP by default on Solaris.
9422 * Replaced the djgpp makefile with Gary Leavens' version.
9423 * Fixed MSWIN32 detection test.
9424 * Added Fergus Henderson's patches to allow putting the collector into
9425 a DLL under GNU win32.
9426 * Added Ivan V. Demakov's port to Watcom C on X86.
9427 * Added Ian Piumarta's Linux/PowerPC port.
9428 * Added PointerFreeGC to the placement options in gc_cpp.h (suggested by
9429 Brian Burton).  This is of course unsafe, and may be controversial.
9430 On the other hand, it seems to be needed often enough that it's worth
9431 adding as a standard facility.
9432 * Add Lars Farm's suggestions on building the collector for MacOS.
9433
9434
9435 == [4.12alpha2] ==
9436
9437 (Changes not specified.)
9438
9439
9440 == [4.11] 1996-12-03 ==
9441
9442 * Rationalized (hopefully) GC_try_to_collect in an incremental collection
9443 environment.  It appeared to not handle a call while a collection was in
9444 progress, and was otherwise too conservative.
9445 * Merged GC_reclaim_or_delete_all into GC_reclaim_all to get rid of some
9446 code.
9447 * Added Patrick Beard's Mac fixes, with substantial completely untested
9448 modifications.
9449 * Fixed the MPROTECT_VDB code to deal with large pages and imprecise
9450 fault addresses (as on an UltraSPARC running Solaris 2.5).  Note that this
9451 was not a problem in the default configuration, which uses PROC_VDB.
9452 * The DEC Alpha assembly code needed to restore $gp between calls (thanks to
9453 Fergus Henderson for tracking this down and supplying a patch).
9454 * The write command for "de" was completely broken for large files.
9455 I used the easiest portable fix, which involved changing the semantics
9456 so that f.new is written instead of overwriting f.  That's safer anyway.
9457 * Added README.solaris2 with a discussion of the possible problems of
9458 mixing the collector's sbrk allocation with malloc/realloc.
9459 * Changed the data segment starting address for SGI machines.  The
9460 old code failed under IRIX6.
9461 * Required double word alignment for MIPS.
9462 * Various minor fixes to remove warnings.
9463 * Attempted to fix some Solaris threads problems (reported by Zhiying Chen).
9464 In particular, the collector could try to fork a thread with the
9465 world stopped as part of GC_thr_init.  It also failed to deal with
9466 the case in which the original thread terminated before the whole
9467 process did.
9468 * Added -DNO_EXECUTE_PERMISSION.  This has a major performance impact
9469 on the incremental collector under Irix, and perhaps under other
9470 operating systems.
9471 * Added some code to support allocating the heap with mmap.  This may
9472 be preferable under some circumstances.
9473 * Integrated dynamic library support for HP (thanks to Knut Tvedten).
9474 * Integrated James Clark's win32 threads support, and made a number
9475 of changes to it (many of which suggested by Pontus Rydin).  This is still
9476 not 100% solid.
9477 * Integrated Alistair G. Crooks' support for UTS4 running on an Amdahl
9478 370-class machine.
9479 * Fixed a serious bug in explicitly typed allocation.  Objects requiring
9480 large descriptors where handled in a way that usually resulted in
9481 a segmentation fault in the marker (thanks to Jeremy Fitzhardinge
9482 for helping to track this down).
9483 * Added partial support for GNU win32 development (thanks to
9484 Fergus Henderson).
9485 * Added optional support for Java-style finalization semantics (thanks to
9486 Patrick Bridges).  This is recommended only for Java implementations.
9487 * GC_malloc_uncollectable faulted instead of returning 0 when out of
9488 memory (thanks to Daniel R. Grayson for noticing).
9489 * Calls to GC_base before the collector was initialized failed on a
9490 DEC Alpha (thanks to Matthew Flatt).
9491 * Added base pointer checking to GC_REGISTER_FINALIZER in debugging mode
9492 (thanks to Jeremy Fitzhardinge).
9493 * GC_debug_realloc failed for uncollectible objects (thanks to
9494 Jeremy Fitzhardinge).
9495 * Explicitly typed allocation could crash if it ran out of memory (thanks to
9496 Jeremy Fitzhardinge).
9497 * Added minimal support for a DEC Alpha running Linux.
9498 * Fixed a problem with allocation of objects whose size overflowed
9499 ptrdiff_t.  (This now fails unconditionally, as it should.)
9500 * Added the beginning of Irix pthread support.
9501 * Integrated Xiaokun Zhu's fixes for djgpp 2.01.
9502 * Added SGI-style STL allocator support (gc_alloc.h).
9503 * Fixed a serious bug in README.solaris2.
9504 Multi-threaded programs must include
9505 gc.h with SOLARIS_THREADS defined.
9506 * Changed GC_free so it actually deallocates uncollectible objects (thanks
9507 to Peter Chubb for pointing out the problem).
9508 * Added Linux ELF support for dynamic libraries (thanks to Patrick Bridges).
9509 * Changed the Borland cc configuration so that the assembler is not
9510 required.
9511 * Fixed a bug in the C++ test that caused it to fail in 64-bit
9512 environments.
9513
9514
9515 == [4.10t3] 1996-11-18 ==
9516
9517 Some changes related to threads support.
9518
9519
9520 == [4.10] 1996-02-19 ==
9521
9522 * Fixed a typo around a call to GC_collect_or_expand in alloc.c.  It broke
9523 handling of out of memory.  (Thanks to Patrick C. Beard for noticing.)
9524
9525
9526 == [4.9] 1996-02-12 ==
9527
9528 * More README.debugging fixes.
9529 * Objects ready for finalization, but not finalized in the same GC
9530 cycle, could be prematurely collected.  This occasionally happened
9531 in test_cpp.
9532 * Too little memory was obtained from the system for very large
9533 objects.  That could cause a heap explosion if these objects were
9534 not contiguous (e.g. under PCR), and too much of them was blacklisted.
9535 * Due to an improper initialization, the collector was too hesitant to
9536 allocate blacklisted objects immediately after system startup.
9537 * Moved GC_arrays from the data into the bss segment by not explicitly
9538 initializing it to zero.  This significantly
9539 reduces the size of executables, and probably avoids some disk accesses
9540 on program startup.  It's conceivable that it might break a port that I
9541 didn't test.
9542 * Fixed EMX_MAKEFILE to reflect the gc_c++.h to gc_cpp.h renaming which
9543 occurred a while ago.
9544
9545
9546 == [4.8] 1995-11-20 ==
9547
9548 * Changed a "comment" in a MacOS specific part of mach_dep.c that caused
9549 gcc to fail on other platforms.
9550
9551
9552 == [4.7] 1995-11-18 ==
9553
9554 * Fixed some compilation problems with -DCHECKSUMS (thanks to Ian Searle).
9555 * Updated some Mac specific files (to synchronize with Patrick C. Beard).
9556 * Fixed a serious bug for machines with non-word-aligned pointers.
9557 (Thanks to Patrick C. Beard for pointing out the problem.  The collector
9558 should fail almost any conceivable test immediately on such machines.)
9559
9560
9561 == [4.6] 1995-11-09 ==
9562
9563 * Added Linux ELF support (thanks to Arrigo Triulzi).
9564 * GC_base crashed if it was called before any other GC_ routines.
9565 This could happen if a gc_cleanup object was allocated outside the heap
9566 before any heap allocation.
9567 * The heap expansion heuristic was not stable if all objects had finalization
9568 enabled.  Fixed finalize.c to count memory in finalization queue and
9569 avoid explicit deallocation.  Changed alloc.c to also consider this count.
9570 (This is still not recommended.  It's expensive if nothing else.  Thanks
9571 to John Ellis for pointing this out.)
9572 * GC_malloc_uncollectable(0) was broken (thanks to Phong Vo for pointing
9573 this out).
9574 * The collector didn't compile under Linux 1.3.X (thanks to Fred Gilham for
9575 pointing this out).  The current workaround is ugly, but expected to be
9576 temporary.
9577 * Fixed a formatting problem for SPARC stack traces.
9578 * Fixed some '=='s in os_dep.c that should have been assignments.
9579 Fortunately these were in code that should never be executed anyway (thanks
9580 to Fergus Henderson).
9581 * Fixed the heap block allocator to only drop blacklisted blocks in small
9582 chunks.  Made BL_LIMIT self adjusting.  (Both of these were in response
9583 to heap growth observed by Paul Graham.)
9584 * Fixed the Metrowerks/68K Mac code to also mark from a6 (thanks to
9585 Patrick C. Beard).
9586 * Significantly updated README.debugging.
9587 * Fixed some problems with longjmps out of signal handlers, especially under
9588 Solaris.  Added a workaround for the fact that siglongjmp doesn't appear to
9589 do the right thing with -lthread under Solaris.
9590 * Added MSDOS/djgpp port (thanks to Mitch Harris).
9591 * Added "make reserved_namespace" and "make user_namespace".  The
9592 first renames ALL "GC_xxx" identifiers as "_GC_xxx".  The second is the
9593 inverse transformation.  Note that doing this is guaranteed to break all
9594 clients written for the other names.
9595 * descriptor field for kind NORMAL in GC_obj_kinds with ADD_BYTE_AT_END
9596 defined should be -ALIGNMENT not WORDS_TO_BYTES(-1).  This is
9597 a serious bug on machines with pointer alignment of less than a word.
9598 * GC_ignore_self_finalize_mark_proc didn't handle pointers to very near the
9599 end of the object correctly.  Caused failures of the C++ test on a DEC Alpha
9600 with g++.
9601 * gc_inl.h still had problems.  Partially fixed.  Added warnings at the
9602 beginning to hopefully specify the remaining dangers.
9603 * Added DATAEND definition to config.h.
9604 * Fixed some of the .h file organization.  Fixed "make floppy".
9605
9606
9607 == [4.5] 1995-06-14 ==
9608
9609 * Fixed many minor and one major README bugs (thanks to Franklin Chen
9610 for pointing out many of them).
9611 * Fixed ALPHA/OSF/1 dynamic library support (thanks to Jonathan Bachrach).
9612 * Added incremental GC support (MPROTECT_VDB) for Linux (with some
9613 help from Bruno Haible).
9614 * Altered SPARC recognition tests in gc.h and config.h (mostly as
9615 suggested by Fergus Henderson).
9616 * Added basic incremental GC support for win32, as implemented by
9617 Windows NT and Windows 95.  GC_enable_incremental is a no-op
9618 under win32s, which doesn't implement enough of the VM interface.
9619 * Added -DLARGE_CONFIG.
9620 * Fixed GC_..._ignore_off_page to also function without
9621 -DALL_INTERIOR_POINTERS.
9622 * (Hopefully) fixed RS/6000 port.  (Only the test was broken.)
9623 * Fixed a performance bug in the non-incremental collector running
9624 on machines supporting incremental collection with MPROTECT_VDB
9625 (e.g. SunOS 4, DEC AXP).  This turned into a correctness bug under
9626 win32s with win32 incremental collection.  (Not all memory protection
9627 was disabled.)
9628 * Fixed some ppcr related bit rot.
9629 * Caused dynamic libraries to be unregistered before re-registering.
9630 The old way turned out to be a performance bug on some machines.
9631 * GC_root_size was not properly maintained under MSWIN32.
9632 * Added -DNO_DEBUGGING and GC_dump.
9633 * Fixed a couple of bugs arising with SOLARIS_THREADS +
9634 REDIRECT_MALLOC.
9635 * Added NetBSD/M68K port (thanks to Peter Seebach).
9636 * Fixed a serious realloc bug.  For certain object sizes, the collector
9637 wouldn't scan the expanded part of the object.  (Thanks to Clay Spence
9638 for noticing the problem, and helping me to track it down.)
9639
9640
9641 == [4.4] 1995-02-18 ==
9642
9643 * ASM_CLEAR_CODE was erroneously defined for HP
9644 PA machines, resulting in a compile error.
9645 * Fixed OS/2 Makefile to create a library (thanks to Mark Boulter).
9646 * Gc_cleanup objects didn't work if they were created on
9647 the stack.  Fixed.
9648 * One copy of Gc_cpp.h in the distribution was out of
9649 synch, and failed to document some known compiler
9650 problems with explicit destructor invocation.  Partially
9651 fixed.  There are probably other compilers on which
9652 gc_cleanup is miscompiled.
9653 * Fixed Makefile to pass C compiler flags to C++ compiler.
9654 * Added Mac fixes.
9655 * Fixed os_dep.c to work around what appears to be
9656 a new and different VirtualQuery bug under newer
9657 versions of win32S.
9658 * GC_non_gc_bytes was not correctly maintained by
9659 GC_free.  Fixed (thanks to James Clark).
9660 * Added GC_set_max_heap_size.
9661 * Changed allocation code to ignore blacklisting if it is preventing
9662 use of a very large block of memory.  This has the advantage
9663 that naive code allocating very large objects is much more
9664 likely to work.  The downside is you might no
9665 longer find out that such code should really use
9666 GC_malloc_ignore_off_page.
9667 * Changed GC_printf under win32 to close and reopen the file
9668 between calls.  FAT file systems otherwise make the log file
9669 useless for debugging.
9670 * Added GC_try_to_collect and GC_get_bytes_since_gc.  These
9671 allow starting an abortable collection during idle times.
9672 This facility does not require special OS support.  (Thanks to
9673 Michael Spertus of Geodesic Systems for suggesting this.  It was
9674 actually an easy addition.  Kumar Srikantan previously added a similar
9675 facility to a now ancient version of the collector.  At the time
9676 this was much harder, and the result was less convincing.)
9677 * Added some support for the Borland development environment (thanks
9678 to John Ellis and Michael Spertus).
9679 * Removed a misfeature from checksums.c that caused unexpected
9680 heap growth (thanks to Scott Schwartz).
9681 * Changed finalize.c to call WARN if it encounters a finalization cycle.
9682 WARN is defined in gc_priv.h to write a message, usually to stdout.
9683 In many environments, this may be inappropriate.
9684 * Renamed NO_PARAMS in gc.h to GC_NO_PARAMS, thus adhering to my own
9685 naming convention.
9686 * Added GC_set_warn_proc to intercept warnings.
9687 * Fixed Amiga port (thanks to Michel Schinz).
9688 * Fixed a bug in mark.c that could result in an access to unmapped
9689 memory from GC_mark_from_mark_stack on machines with unaligned
9690 pointers.
9691 * Fixed a win32 specific performance bug that could result in scanning of
9692 objects allocated with the system malloc.
9693 * Added REDIRECT_MALLOC.
9694
9695
9696 == [4.3] 1994-12-23 ==
9697
9698 * Fixed SPARC alignment problem with GC_DEBUG.
9699 * Fixed Solaris threads /proc workaround.  The real
9700 problem was an interaction with mprotect.
9701 * Incorporated fix from Patrick Beard for gc_c++.h (now gc_cpp.h).
9702 * Slightly improved allocator space utilization by
9703 fixing the GC_size_map mechanism.
9704 * Integrated some Sony News and MIPS RISCos 4.51
9705 patches (thanks to Nobuyuki Hikichi at Software Research Associates,
9706 Inc., Japan).
9707 * Fixed HP_PA alignment problem (thanks to Brian F. Dennis).
9708 * Added GC_same_obj and friends.  Changed GC_base
9709 to return 0 for pointers past the end of large objects.
9710 Improved GC_base performance with ALL_INTERIOR_POINTERS
9711 on machines with a slow integer mod operation.
9712 Added GC_PTR_ADD, GC_PTR_STORE, etc. to prepare
9713 for preprocessor.
9714 * changed the default on most UNIX machines to be that
9715 signals are not disabled during critical GC operations.
9716 This is still ANSI-conforming, though somewhat dangerous
9717 in the presence of signal handlers. But the performance
9718 cost of the alternative is sometimes problematic.
9719 Can be changed back with a minor Makefile edit.
9720 * renamed IS_STRING in gc.h, to CORD_IS_STRING, thus
9721 following my own naming convention.  Added the function
9722 CORD_to_const_char_star.
9723 * Fixed a gross bug in GC_finalize.  Symptom: occasional
9724 address faults in that function (thanks to Anselm Baird-Smith).
9725 * Added port to ICL DRS6000 running DRS/NX.  Restructured
9726 things a bit to factor out common code, and remove obsolete
9727 code.  Collector should now run under SUNOS5 with either
9728 mprotect or /proc dirty bits.  (Thanks to Douglas Steel.)
9729 * More bug fixes and workarounds for Solaris 2.X.  (These were
9730 mostly related to putting the collector in a dynamic library,
9731 which didn't really work before.  Also SOLARIS_THREADS
9732 didn't interact well with dl_open.) (Thanks to Brian Lewis.)
9733 * Fixed a serious performance bug on the DEC Alpha.  The text
9734 segment was getting registered as part of the root set.
9735 (Amazingly, the result was still fast enough that the bug
9736 was not conspicuous.) The fix works on OSF/1, version 1.3.
9737 Hopefully it also works on other versions of OSF/1 ...
9738 * Fixed a bug in GC_clear_roots.
9739 * Fixed a bug in GC_generic_malloc_words_small that broke
9740 gc_inl.h (reported by Antoine de Maricourt).
9741 * Fixed some problems with cord/de under Linux.
9742 * Fixed some cord problems, notably with CORD_riter4.
9743 * Added DG/UX port (thanks to Ben A. Mesander).
9744 * Added finalization registration routines with weaker ordering
9745 constraints.  (This is necessary for C++ finalization with
9746 multiple inheritance, since the compiler often adds self-cycles.)
9747 * Filled the holes in the SCO port (thanks to Michael Arnoldus).
9748 * Completely rewritten the documentation in the interface gc_c++.h
9749 (later renamed gc_cpp.h) making it both clearer and more precise (done by
9750 John Ellis).
9751 * The definition of accessibility now ignores pointers from a finalizable
9752 object (an object with a clean-up function) to itself (done by John Ellis).
9753 This allows objects with virtual base classes to be finalizable by the
9754 collector.  Compilers typically implement virtual base classes using
9755 pointers from an object to itself, which under the old definition of
9756 accessibility prevented objects with virtual base classes from ever
9757 being collected or finalized.
9758 * gc_cleanup now includes gc as a virtual base.  This was enabled by
9759 the change in the definition of accessibility (by John Ellis).
9760 * Added support for operator new[] (by John Ellis).  Since most compilers
9761 don't yet support operator new[], it is conditionalized on
9762 -DOPERATOR_NEW_ARRAY.  The code is untested, but its trivial and looks
9763 correct.
9764 * The test program test_gc_c++ (later renamed test_cpp.cc)
9765 tries to test for the C++-specific functionality not tested by the
9766 other programs.
9767 * Added unistd.h include to misc.c.  (Needed for ppcr.)
9768 * Added PowerMac port (thanks to Patrick C. Beard).
9769 * Fixed "srcdir"-related Makefile problems.  Changed things so
9770 that all externally visible include files always appear in the
9771 include subdirectory of the source.  Made gc.h directly
9772 includable from C++ code (thanks to Per Bothner).
9773 * Changed Intel code to also mark from ebp (thanks to Kevin Warne).
9774 * Renamed C++ related files so they could live in a FAT
9775 file system (thanks to Charles Fiterman).
9776 * Changed Windows NT Makefile to include C++ support in
9777 gc.lib.  Added C++ test as Makefile target.
9778
9779
9780 == [4.2] 1994-08-03 ==
9781
9782 * Multiple bug fixes/workarounds in the Solaris threads version.
9783 (It occasionally failed to locate some register contents for
9784 marking.  It also turns out that thr_suspend and friends are
9785 unreliable in Solaris 2.3.  Dirty bit reads appear
9786 to be unreliable under some weird
9787 circumstances.  My stack marking code
9788 contained a serious performance bug.  The new code is
9789 extremely defensive, and has not failed in several CPU
9790 hours of testing.  But no guarantees ...)
9791 * Added MacOS support.  (Thanks to Patrick C. Beard.
9792 David Chase suggested several improvements.)
9793 * Fixed several syntactic bugs in gc_c++.h and friends.  (These
9794 didn't bother g++, but did bother most other compilers.)
9795 Fixed gc_c++.h finalization interface.
9796 * 64 bit alignment for allocated objects was not guaranteed in a
9797 few cases in which it should have been.
9798 * Added GC_malloc_atomic_ignore_off_page.
9799 * Added GC_collect_a_little.
9800 * Added some prototypes to gc.h.
9801 * Some other minor bug fixes (notably in Makefile).
9802 * Fixed OS/2 / EMX port (thanks to Ari Huttunen).
9803 * Fixed AmigaDOS port (thanks to Michel Schinz).
9804 * Fixed the DATASTART definition under Solaris.  There
9805 was a 1 in 16K chance of the collector missing the first
9806 64K of static data (and thus crashing).
9807 * Fixed some blatant anachronisms in the README file.
9808 * Fixed PCR-Makefile for upcoming PPCR release.
9809
9810
9811 == [4.1] 1994-05-20 ==
9812
9813 * Changed finalization implementation to guarantee that
9814 finalization procedures are called outside of the allocation
9815 lock, making direct use of the interface a little less dangerous.
9816 MAY BREAK EXISTING CLIENTS that assume finalizers
9817 are protected by a lock.  Since there seem to be few multi-threaded
9818 clients that use finalization, this is hopefully not much of
9819 a problem.
9820 * Fixed a gross bug in CORD_prev.
9821 * Fixed a bug in blacklst.c that could result in unbounded
9822 heap growth during startup on machines that do not clear
9823 memory obtained from the OS (e.g. win32S).
9824 * Ported de editor to win32/win32S.  (This is now the only
9825 version with a mouse-sensitive UI.  Thanks to Rob Haack for the
9826 implementation based on the generic Windows application template.)
9827 * Added GC_malloc_ignore_off_page to allocate large arrays
9828 in the presence of ALL_INTERIOR_POINTERS.
9829 * Changed GC_call_with_alloc_lock to not disable signals in
9830 the single-threaded case.
9831 * Reduced retry count in GC_collect_or_expand for garbage
9832 collecting when out of memory.
9833 * Made uncollectible allocations bypass black-listing, as they
9834 should.
9835 * Fixed a bug in typed_test in test.c that could cause (legitimate)
9836 GC crashes.
9837 * Fixed some potential synchronization problems in finalize.c
9838 * Fixed a real locking problem in typd_mlc.c.
9839 * Worked around an AIX 3.2 compiler feature that results in
9840 out of bounds memory references.
9841 * Partially worked around an IRIX5.2 beta problem (which may
9842 or may not persist to the final release).
9843 * Fixed a bug in the heap integrity checking code that could
9844 result in explicitly deallocated objects being identified as
9845 smashed.  Fixed a bug in the dbg_mlc stack saving code
9846 that caused old argument pointers to be considered live.
9847 * Fixed a bug in CORD_ncmp (and hence CORD_str).
9848 * Repaired the OS2 port, which had suffered from bit rot
9849 in 4.0.  Worked around what appears to be CSet/2 V1.0
9850 optimizer bug.
9851 * Fixed a Makefile bug for target "c++".
9852
9853
9854 == [4.0] 1994-04-07 ==
9855
9856 * Added support for Solaris threads (which was possible
9857 only by reimplementing some fraction of Solaris threads,
9858 since Sun doesn't currently make the thread debugging
9859 interface available).
9860 * Added non-threads win32 and win32S support.
9861 * (Grudgingly, with suitable muttering of obscenities) renamed
9862 files so that the collector distribution could live on a FAT
9863 file system.  Files that are guaranteed to be useless on
9864 a PC still have long names.  Gc_inline.h and gc_private.h
9865 still exist, but now just include  gc_inl.h and gc_priv.h.
9866 * Fixed a really obscure bug in finalization that could cause
9867 undetected mark stack overflows.  (I would be surprised if
9868 any real code ever tickled this one.)
9869 * Changed finalization code to dynamically resize the hash
9870 tables it maintains.  (This probably does not matter for well-
9871 -written code.  It no doubt does for C++ code that overuses
9872 destructors.)
9873 * Added typed allocation primitives.  Rewrote the marker to
9874 accommodate them with more reasonable efficiency.  This
9875 change should also speed up marking for GC_malloc allocated
9876 objects a little.  See gc_typed.h for new primitives.  (Thanks to
9877 Zhong Shao performed much of the experimentation that led to the
9878 current typed allocation facility.)
9879 * Improved debugging facilities slightly.  Allocation time
9880 stack traces are now kept by default on SPARC/SUNOS4.  (Thanks to
9881 Scott Schwartz.)
9882 * Added better support for small heap applications.
9883 * Significantly extended cord package.  Fixed a bug in the
9884 implementation of lazily read files.  Printf and friends now
9885 have cord variants.  Cord traversals are a bit faster.
9886 * Made ALL_INTERIOR_POINTERS recognition the default.
9887 * Fixed de so that it can run in constant space, independent
9888 of file size.  Added simple string searching to cords and de.
9889 * Added the Hull-Ellis C++ interface (supplied by Jesse Hull and John Ellis).
9890 * Added dynamic library support for OSF/1 (thanks to Alan Dosser and
9891 Tim Bingham at DEC).
9892 * Changed argument to GC_expand_hp to be expressed
9893 in units of bytes instead of heap blocks.  (Necessary
9894 since the heap block size now varies depending on
9895 configuration.  The old version was never very clean.)
9896 * Added GC_get_heap_size().  The previous "equivalent"
9897 was broken.
9898 * Restructured the Makefile a bit.
9899 * Added FreeBSD port (provided by Jeffrey Hsu).
9900
9901
9902 == [3.7] 1994-03-15 ==
9903
9904 * Added a workaround for an HP/UX compiler bug.
9905 * Fixed another stack clearing performance bug.  Reworked
9906 that code once more.
9907
9908
9909 == [3.6] 1994-01-14 ==
9910
9911 * fixed a bug in the mark stack growth code that was introduced
9912 in 3.4.
9913 * fixed Makefile to work around DEC AXP compiler tail recursion
9914 bug.
9915
9916
9917 == [3.5] ==
9918
9919 * Minor collections now mark from roots only once, if that
9920 doesn't cause an excessive pause.
9921 * The stack clearing heuristic was refined to prevent anomalies
9922 with very heavily recursive programs and sparse stacks.
9923 * Fixed a bug that prevented mark stack growth in some cases.
9924 GC_objects_are_marked should be set to TRUE after a call
9925 to GC_push_roots and as part of GC_push_marked, since
9926 both can now set mark bits.  I think this is only a performance
9927 bug, but I wouldn't bet on it.  It's certainly very hard to argue
9928 that the old version was correct.
9929 * Fixed an incremental collection bug that prevented it from
9930 working at all when HBLKSIZE != getpagesize()
9931 * Changed dynamic_loading.c to include gc_priv.h before testing
9932 DYNAMIC_LOADING.  SunOS dynamic library scanning
9933 must have been broken in 3.4.
9934 * Object size rounding now adapts to program behavior.
9935 * Added a workaround (provided by Manuel Serrano and
9936 colleagues) to a long-standing SunOS 4.X (and 3.X) ld bug
9937 that I had incorrectly assumed to have been squished.
9938 The collector was broken if the text segment size was within
9939 32 bytes of a multiple of 8K bytes, and if the beginning of
9940 the data segment contained interesting roots.  The workaround
9941 assumes a demand-loadable executable.  The original may have
9942 have "worked" in some other cases.
9943 * Added dynamic library support under IRIX5.
9944 * Added support for EMX under OS/2 (thanks to Ari Huttunen).
9945 * Added support of Motorola 88K processor running CX/UX (by Brent Benson).
9946
9947
9948 == [3.4] ==
9949
9950 * Fixed a performance bug in GC_realloc.
9951 * Updated the amiga port.
9952 * Added NetBSD and 386BSD ports (supplied by Alistair G. Crooks).
9953 * Added cord library.
9954 * Added trivial performance enhancement for
9955 ALL_INTERIOR_POINTERS (do not scan last word).
9956
9957
9958 == [3.3] 1993-10-02 ==
9959
9960 * PCR-specific bugs (thanks to Neil Sharman).
9961 * Missing locking in GC_free, redundant FASTUNLOCK
9962 in GC_malloc_stubborn, and 2 bugs in
9963 GC_unregister_disappearing_link (pointed out by Neil Sharman).
9964 * Common symbols allocated by the SunOS4.X dynamic loader
9965 were not included in the root set.
9966 * Bug in GC_finalize (reported by Brian Beuning and Alan Dosser).
9967 * Merged Amiga port from Jesper Peterson (untested).
9968 * Merged NeXT port from Thomas Funke (significantly
9969 modified and untested).  (Also thanks to Brian D. Carlstrom for
9970 the supplied the NeXT ports.)
9971
9972
9973 == [3.2] ==
9974
9975 Fixed a serious and not entirely repeatable bug in
9976 the incremental collector.  It appeared only when dirty bit info
9977 on the roots was available, which is normally only under Solaris.
9978 It also added GC_general_register_disappearing_link, and some
9979 testing code.  Interface.c disappeared.
9980
9981
9982 == [3.1] ==
9983
9984 * A workaround for a SunOS 4.X SPARC C compiler
9985 misfeature that caused problems when the collector was turned into
9986 a dynamic library.
9987 * A fix for a bug in GC_base that could result in a memory fault.
9988 * A fix for a performance bug (and several other misfeatures) pointed
9989 out by Dave Detlefs and Alan Dosser.
9990 * Use of dirty bit information for static data under Solaris 2.X.
9991 * DEC Alpha/OSF1 support (thanks to Alan Dosser).
9992 * Incremental collection on more platforms.
9993 * A more refined heap expansion policy.  Less space usage by default.
9994 * Various minor enhancements to reduce space usage, and to reduce
9995 the amount of memory scanned by the collector.
9996 * Uncollectible allocation without per object overhead.
9997 * More conscientious handling of out-of-memory conditions.
9998 * Fixed a bug in debugging stubborn allocation.
9999 * Fixed a bug that resulted in occasional erroneous reporting of smashed
10000 objects with debugging allocation.
10001 * Fixed bogus leak reports of size 4096 blocks with FIND_LEAK.
10002
10003
10004 == [3.0] ==
10005
10006 Added generational/incremental collection and stubborn objects.
10007
10008
10009 == [2.6] 1993-04-27 ==
10010
10011 (Changes not specified.)
10012
10013
10014 == [2.5] ==
10015
10016 * Removed an explicit call to exit(1)
10017 * Fixed calls to GC_printf and GC_err_printf, so the correct number of
10018 arguments are always supplied.  The OS/2 C compiler gets confused if
10019 the number of actuals and the number of formals differ.  (ANSI C
10020 doesn't require this to work.  The ANSI sanctioned way of doing things
10021 causes too many compatibility problems.)
10022
10023
10024 == [2.4] 1993-01-26 ==
10025
10026 Added GC_free_space_divisor as a tuning knob, added
10027 support for OS/2 and linux, and fixed the following bugs:
10028 * On machines with unaligned pointers (e.g. Sun 3), every 128th word could
10029 fail to be considered for marking.
10030 * Dynamic_load.c erroneously added 4 bytes to the length of the data and
10031 bss sections of the dynamic library.  This could result in a bad memory
10032 reference if the actual length was a multiple of a page.  (Observed on
10033 Sun 3.  Can probably also happen on a Sun 4.)
10034 (Thanks to Robert Brazile for pointing out that the Sun 3 version
10035 was broken.  Dynamic library handling is still broken on Sun 3s
10036 under 4.1.1U1, but apparently not 4.1.1.  If you have such a machine,
10037 use -Bstatic.)
10038
10039
10040 == [2.3] ==
10041
10042 * Added ALL_INTERIOR_POINTERS.
10043 * Missing declaration of etext in the A/UX version.
10044 * Some PCR root-finding problems.
10045 * Blacklisting was not 100% effective, because the plausible future
10046 heap bounds were being miscalculated.
10047 * GC_realloc didn't handle out-of-memory correctly.
10048 * GC_base could return a nonzero value for addresses inside free blocks.
10049 * test.c wasn't really thread safe, and could erroneously report failure
10050 in a multi-threaded environment.  (The locking primitives need to be
10051 replaced for other threads packages.)
10052 * GC_CONS was thoroughly broken.
10053 * On a SPARC with dynamic linking, signals stayed disabled while the
10054 client code was running (thanks to Manuel Serrano).
10055
10056
10057 == [2.2] ==
10058
10059 * GC_realloc could fail to extend the size of the object for certain large
10060 object sizes.
10061 * A blatant subscript range error in GC_printf, which unfortunately
10062 wasn't exercised on machines with sufficient stack alignment constraints.
10063 * GC_register_displacement did the wrong thing if it was called after
10064 any allocation had taken place.
10065 * The leak finding code would eventually break after 2048 byte
10066 byte objects leaked.
10067 * interface.c didn't compile.
10068 * The heap size remained much too small for large stacks.
10069 * The stack clearing code behaved badly for large stacks, and perhaps
10070 on HP/PA machines.
10071
10072
10073 == [2.1] ==
10074
10075 * The first stable version since 1.9.
10076 * Added support for PPCR.
10077
10078
10079 == [2.0] ==
10080
10081 * Introduced a consistent naming convention for collector
10082 routines and added support for registering dynamic library data segments
10083 in the standard mark_roots.c (original code supporting the SunOS dynamic
10084 loader provided by Bill Janssen).  Most of the data structures were revamped.
10085 The treatment of interior pointers was completely changed.  Finalization
10086 was added.  Support for locking was added.  Object kinds were added.
10087 We added a black listing facility to avoid allocating at addresses known
10088 to occur as integers somewhere in the address space.  Much of this
10089 was accomplished by adapting ideas and code from the PCR collector.
10090 The test program was changed and expanded.
10091
10092
10093 == [1.9] 1992-01-29 ==
10094
10095 * fixed a major bug in gc_realloc.
10096
10097
10098 == [1.8] ==
10099
10100 * added ULTRIX support in gc_private.h.  (Robert Brazile originally supplied
10101 the ULTRIX code.  Alan Dosser and Regis Cridlig subsequently provided updates
10102 and information on variation between ULTRIX systems.)
10103
10104
10105 == [1.5] ==
10106
10107 * ensure 8 byte alignment for objects allocated on a sparc based machine.
10108
10109
10110 == [1.4] ==
10111
10112 * Does not use compile time determined values
10113 for the stack base.  This no longer works on Sun 3s, since Sun 3/80s use
10114 a different stack base.  We now use a straightforward heuristic on all
10115 machines on which it is known to work (incl. Sun 3s) and compile-time
10116 determined values for the rest.  There should really be library calls
10117 to determine such values.
10118
10119
10120 == [1.3] ==
10121
10122 * Fixed spurious
10123 assembly language assignments to TMP_SP.  Only the assignment in the PC/RT
10124 code is necessary.  On other machines, with certain compiler options,
10125 the assignments can lead to an unsaved register being overwritten.
10126 Known to cause problems under SunOS 3.5 WITHOUT the -O option.  (With
10127 -O the compiler recognizes it as dead code.  It probably shouldn't,
10128 but that's another story.)
10129 The SPARC-specific code was originally contributed by Mark Weiser.
10130 The Encore Multimax modifications were supplied by Kevin Kenny.
10131 The adaptation to the IBM PC/RT is largely
10132 due to Vernon Lee, on machines made available to Rice by IBM.
10133 Much of the HP specific code and a number of good suggestions for improving
10134 the generic code are due to Walter Underwood.
10135 Parag Patel supplied the A/UX code.
10136 Manuel Serrano supplied linux and Sony News specific code.