Debian Codegraph @

external/bdwgc/ChangeLog

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