1 2009-09-03 Hans Boehm <Hans.Boehm@hp.com> (really Loren J. Rittle)
3 * dyn_load.c (HAVE_DL_ITERATE_PHDR): Break definition from use.
4 Define for FreeBSD 7.0+.
6 2009-09-02 Hans Boehm <Hans.Boehm@hp.com> (with help from Victor Ivrii and
9 * mach_dep.c: Don't include ucontext.h with NO_GETCONTEXT.
11 2009-08-19 Hans Boehm <Hans.Boehm@hp.com>
13 * include/gc_gcj.h (GC_init_gcj_malloc): Improve descriptive
16 2009-08-11 Hans Boehm <Hans.Boehm@hp.com>
17 (Replacement for Ivan Maidanski's diff99_cvs. Hopefully fixes
18 the same bugs, and then some.)
20 * allchblk.c (GC_merge_unmapped): Don't assume that adjacent
21 free blocks have different mapping status. Correctly handle gap
23 (GC_split_block): Remove dead code setting hb_flags. Add comment.
24 (GC_allochblk): Split blocks also in generational-only mode.
25 * os_dep.c (GC_unmap_gap): Dont really use munmap.
27 2009-08-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
28 (Mistakenly omitted from last check-in)
29 * include/private/gc_priv.h (GC_unmapped_bytes): Define as 0 for
32 2009-08-07 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
33 diff111 (supersedes diff101_cvs which, in turn, resembles diff52, diff75, diff83 partly)
35 * Makefile.direct (MARK_BIT_PER_OBJ, PRINT_BLACK_LIST,
36 USE_PROC_FOR_LIBRARIES): Fix typo in the comments.
37 * Makefile.direct (USE_MMAP, USE_MUNMAP, THREAD_LOCAL_ALLOC,
38 PARALLEL_MARK, STATIC): Update the comments.
39 * include/private/gcconfig.h (GC_PREFER_MPROTECT_VDB): New macro
40 recognized (only if MPROTECT_VDB).
41 * Makefile.direct (DONT_USE_USER32_DLL, GC_PREFER_MPROTECT_VDB):
43 * os_dep.c (detect_GetWriteWatch): Recognize "GC_USE_GETWRITEWATCH"
44 environment variable (only if MPROTECT_VDB, if the variable is
45 unset when GC_PREFER_MPROTECT_VDB macro controls the strategy).
46 * doc/README.environment (GC_USE_GETWRITEWATCH): New variable.
47 * include/private/gcconfig.h (MPROTECT_VDB): Add FIXME for
48 USE_MUNMAP and PARALLEL_MARK cases (to relax the conditions in
50 * misc.c (GC_get_heap_size, GC_get_free_bytes): Ignore the memory
51 space returned to OS (GC_unmapped_bytes).
52 * include/gc.h (GC_get_heap_size, GC_get_free_bytes): Update the
54 * misc.c (GC_get_unmapped_bytes): New API function.
55 * include/gc.h (GC_get_unmapped_bytes): New API prototype.
56 * os_dep.c (GC_dirty_init): Move "ifdef GWW_VDB" block out of
57 "ifdef MSWIN32" one (for Cygwin).
59 2009-08-01 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
60 diff100_cvs (diff51 and diff55, partly)
62 * pthread_support.c (GC_allow_register_threads): New API function.
63 * win32_threads.c (GC_allow_register_threads): Ditto.
64 * include/gc.h (GC_allow_register_threads): New API prototype.
65 * include/gc.h (GC_register_my_thread, GC_unregister_my_thread):
67 * pthread_support.c (GC_register_my_thread): Check the collector
68 is in the multi-threaded mode.
69 * win32_threads.c (GC_register_my_thread): Ditto.
71 2009-07-10 Hans Boehm <Hans.Boehm@hp.com>
73 * finalize.c (GC_finalize_all): Always call GC_invoke_finalizers
74 instead, following Ivan's original patch.
76 2009-06-20 Hans Boehm <Hans.Boehm@hp.com>
78 * allchblk.c (GC_allochblk_nth): Add assertion.
79 * checksums.c: Add GC_record_fault, GC_was_faulted,
80 CC_n_faulted_dirty_errors.
81 (GC_check_dirty): Remove register declarations, print
82 dirty bit errors on faulted pages.
83 * os_dep.c (GC_write_fault_handler): Call GC_record_fault().
84 * os_dep.c (GC_remove_protection): Compute index correctly.
86 2009-06-12 Hans Boehm <Hans.Boehm@hp.com>
88 * include/gc_version.h, configure.ac, doc/README:
89 Change to version 7.2alpha3.
90 * configure: Regenerate.
94 2009-06-12 Hans Boehm <Hans.Boehm@hp.com>
96 * include/gc_version.h, configure.ac, doc/README:
97 Change to version 7.2alpha2.
98 * configure: Regenerate.
100 2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)
101 diff98_cvs(resembling diff3, diff27, diff59, diff61, diff66,
104 * dbg_mlc.c (GC_print_smashed_obj): Convert a group of printf()
105 calls into a single one (for output atomicity).
106 * typd_mlc.c (GC_calloc_explicitly_typed): Don't declare and use
107 GC_finalization_failures variable; check the result of
108 GC_general_register_disappearing_link() (for lack of memory)
110 * finalize.c (GC_finalization_failures): Remove unused global
112 * finalize.c (GC_general_register_disappearing_link,
113 GC_general_register_disappearing_link): Don't update the value of
114 GC_finalization_failures (since unused).
115 * include/private/gc_pmark.h (PUSH_ONE_CHECKED_STACK,
116 GC_PUSH_ONE_STACK, GC_PUSH_ONE_HEAP): The first parameter is of
117 word type now (as FIXUP_POINTER requires numeric argument).
118 * finalize.c (GC_ignore_self_finalize_mark_proc): GC_PUSH_ONE_HEAP
119 requires the first parameter of word type.
120 * mark.c (PUSH_GRANULE): Ditto.
121 * mark.c (GC_push_one, GC_push_all_eager): Ditto (for
123 * finalize.c (GC_finalize_all): Call GC_invoke_finalizers() or
124 GC_finalizer_notifier directly, instead
125 of GC_INVOKE_FINALIZERS() to prevent infinite looping.
126 * include/javaxfc.h: Clarify GC_finalize_all comment.
127 * gcj_mlc.c: Include gc_pmark.h before "ifdef GC_GCJ_SUPPORT" (not
128 after) for configuration information.
129 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Add comment.
130 * gcj_mlc.c (GC_gcj_malloc_ignore_off_page): Check "op" local
131 variable for NULL before dereferencing it, return GC_oom_fn() in
133 * typd_mlc.c (GC_malloc_explicitly_typed,
134 GC_malloc_explicitly_typed_ignore_off_page): Transform the code to
135 suppress compiler warning (for uninitialized "lg" variable).
137 2009-06-12 Hans Boehm <Hans.Boehm@hp.com>
139 * win32_threads.c (GC_unregister_my_thread): add false assertion
142 2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
143 diff97_cvs (resembling diff43, diff51, diff67, diff76, diff83 partly)
145 * pthread_support.c (GC_inner_start_routine): Don't release the
146 GC lock between GC_register_my_thread_inner() and
147 GC_init_thread_local() calls (post the "registered" even after
148 calling GC_init_thread_local()).
149 * win32_threads.c (GC_register_my_thread, GC_unregister_my_thread):
150 Use GC_lookup_thread_inner() instead of GC_lookup_thread() and
151 acquire the GC lock only once.
152 * win32_threads.c (GC_thr_init): Call GC_register_my_thread_inner()
153 directly instead of GC_register_my_thread() since I_HOLD_LOCK
154 and our (main) thread is not registered yet (add assertion for it).
155 * win32_threads.c (GC_init_parallel): Call GC_lookup_thread_inner()
156 directly instead of GC_lookup_thread() (since I_HOLD_LOCK).
157 * win32_threads.c (GC_lookup_thread): Remove unused function.
158 * win32_threads.c: Remove "#error GC_DLL untested with Cygwin".
159 * win32_threads.c (GC_win32_dll_threads): Define as FALSE macro
160 also if THREAD_LOCAL_ALLOC or GC_PTHREADS.
161 * win32_threads.c (GC_use_DllMain): Call ABORT also if GC_PTHREADS
163 * win32_threads.c (GC_push_stack_for): Add parentheses around "&&"
164 (inside GC_ASSERT) to prevent compiler warning.
165 * win32_threads.c (GC_push_all_stacks): Remove FIXME for
167 * win32_threads.c (MAX_MARKERS, GC_markers): Move the definitions
168 to a place before GC_get_next_stack().
169 * win32_threads.c (marker_sp, marker_bsp): New static arrays (same
170 as in pthread_support.c).
171 * win32_threads.c (marker_last_stack_min): New static arrays (the
172 same semantics as for last_stack_min of GC_Thread_Rep).
173 * win32_threads.c (GC_get_next_stack): Handle marker threads.
174 * win32_threads.c (GC_mark_thread): Save the current stack pointer
176 * win32_threads.c (start_mark_threads): Initialize
177 marker_last_stack_min elements (to "unset" value).
179 2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
180 (diff96_cvs, partly from diff45 and diff75)
182 * misc.c (GC_set_oom_fn, GC_set_all_interior_pointers,
183 GC_set_finalize_on_demand, GC_set_java_finalization,
184 GC_set_finalizer_notifier, GC_set_dont_expand, GC_set_full_freq,
185 GC_set_no_dls, GC_set_free_space_divisor, GC_set_max_retries,
186 GC_set_dont_precollect, GC_set_time_limit, GC_set_warn_proc):
187 Change return type to void (these API functions no longer return
189 * include/gc.h: Ditto (for prototypes).
190 * tests/test.c (main, WinMain, test): Remove explicit cast to void
191 for GC_set_warn_proc().
192 * misc.c (GC_get_oom_fn, GC_get_all_interior_pointers,
193 GC_get_finalize_on_demand, GC_get_java_finalization,
194 GC_get_finalizer_notifier, GC_get_dont_expand, GC_get_full_freq,
195 GC_get_no_dls, GC_get_free_space_divisor, GC_get_max_retries,
196 GC_get_dont_precollect, GC_get_time_limit, GC_get_warn_proc): New
197 API functions (to get the current value of the corresponding R/W
199 * include/gc.h: Ditto (for prototypes).
200 * include/gc.h (GC_set_warn_proc, GC_set_free_space_divisor):
202 * misc.c (GC_ignore_warn_proc): New API call-back function.
203 * include/gc.h (GC_ignore_warn_proc): Ditto (for the prototype).
204 * misc.c (GC_set_find_leak, GC_get_find_leak, GC_set_non_gc_bytes,
205 GC_get_non_gc_bytes): New API setter and getter functions (for the
206 public GC_find_leak and GC_non_gc_bytes variables, respectively).
207 * include/gc.h: Ditto (for prototypes).
208 * include/gc.h (GC_memalign): Add proto to GC API.
209 * mallocx.c (GC_memalign): Use GC_API, GC_CALL for the definition.
210 * tests/test.c (run_one_test): Test GC_memalign() on Win32 too,
211 remove GC_memalign() proto.
212 * misc.c (GC_write): Use multi-byte (A) variants of Win32
213 GetModuleFileName() and CreateFile().
214 * tests/test.c (main): Replace K&R-style function definition with the
217 2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski and George Talbot)
219 * include/private/gcconfig.h (PLATFORM_ANDROID): New macro
220 recognized (for Linux on ARM32 without glibc).
221 * include/private/gcconfig.h (STRTOULL): Define for all targets
222 (define as "strtoul" for most targets except for LLP64/Win64).
223 * misc.c (GC_init_inner): Use STRTOULL instead of atoi/atol()
224 (cast the result to word type) to decode values of "GC_TRACE",
225 "GC_INITIAL_HEAP_SIZE", "GC_MAXIMUM_HEAP_SIZE" environment vars.
227 2009-06-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly George Talbot)
228 * include/gc_allocator.h: Add gc_allocator_ignore_off_page.
229 * tests/test_cpp.cc: Add call to gc_allocator_ignore_off_page.
231 2009-06-11 Hans Boehm <Hans.Boehm@hp.com>
232 * win32_threads.c (GC_release_mark_lock): Correct misspelling of
233 AO_load in assertion.
235 2009-06-11 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)
236 (diff93_cvs: resembling diff27, diff30, diff43, diff44, diff66,
237 diff76, diff79, diff83 partly)
239 * win32_threads.c (MAX_THREADS): Define as 1 if GC_win32_dll_threads
240 is defined as FALSE (otherwise the size of dll_thread_table is near
242 * win32_threads.c (GC_use_DllMain): Optimize for THREAD_LOCAL_ALLOC.
243 * win32_threads.c (GC_Thread_Rep): Add backing_store_end and
244 backing_store_ptr fields for IA64 support.
245 * win32_threads.c (GC_register_my_thread_inner): Set
246 backing_store_end field to reg_base value for IA64 (same as in
248 * win32_threads.c (SET_PTHREAD_MAP_CACHE): Put parentheses in the
249 "right" places, remove ';'.
250 * win32_threads.c (GC_fault_handler_lock): Declare only
251 if MPROTECT_VDB (and not WinCE).
252 * win32_threads.c (GC_suspend): Acquire and release
253 GC_fault_handler_lock only if MPROTECT_VDB (and not WinCE).
254 * win32_threads.c (GC_suspend): Define as STATIC.
255 * win32_threads.c (GC_push_stack_for): Fix WARN() format specifier
256 (should be word-complient, "%p" is used w/o "0x"), don't cast sp.
257 * win32_threads.c (GC_push_all_stacks): Convert a group of printf()
258 calls into a single one (for output atomicity).
259 * win32_threads.c (GC_get_next_stack): Unprotect thread descriptor
260 before altering its last_stack_min ("thread" variable is added).
261 * win32_threads.c (GC_get_next_stack): Remove unnecessary checks for
263 * win32_threads.c (GC_get_next_stack): Don't call GC_may_be_in_stack
265 * win32_threads.c (GC_get_next_stack): Pass current_min value to
266 GC_get_stack_min as-is (without -1).
267 * win32_threads.c (GC_wait_marker): Remove FIXME and use "release"
268 version of AO_fetch_and_sub1().
269 * win32_threads.c (GC_win32_start_inner, GC_win32_start): convert int
270 to pointer (and vice verse) thru word type to suppress warnings.
271 * win32_threads.c (GC_mark_mutex_waitcnt): Fix comment, always
273 * misc.c: Change GC_THREADS tests back to THREADS.
276 2009-06-11 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
277 (diff92_cvs: resembling diff20, diff27, diff34, diff38, diff43, diff45,
278 diff46, diff56, diff60, diff62, diff74, diff75, diff81 partly)
280 * allchblk.c (GC_print_hblkfreelist, GC_dump_regions): Convert
281 a group of printf() calls into a single one (for output atomicity).
282 * include/gc.h (GC_set_all_interior_pointers, GC_set_full_freq,
283 GC_set_time_limit): New prototypes.
284 * misc.c (GC_set_all_interior_pointers, GC_set_full_freq,
285 GC_set_time_limit): New public setter/getter functions.
286 * include/gc.h: Fix (and remove outdated) comments for thread-local
288 * include/gc.h: Fix typos in comments.
289 * misc.c (GC_init_inner, GC_printf): Ditto.
290 * include/gc.h (GC_unregister_disappearing_link): Refine comment.
291 * include/gc.h (GC_stack_base): Recognize _M_IA64 macro.
292 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
293 GC_bytes_allocd_at_reset, DEGRADE_RATE): Define only if THREADS.
294 * misc.c (GC_stack_last_cleared, GC_min_sp, GC_high_water,
295 GC_bytes_allocd_at_reset): Define as STATIC.
296 * misc.c (GC_get_heap_size, GC_get_free_bytes,
297 GC_get_bytes_since_gc, GC_get_total_bytes): Acquire the GC lock to
299 * misc.c (GC_write_cs): Define only if THREADS (Win32/WinCE only).
300 * misc.c (GC_init_inner): Initialize GC_write_cs only if THREADS.
301 * misc.c (GC_init_inner): Use GC_INITIAL_HEAP_SIZE (if available) to
302 set the default initial value of initial_heap_sz.
303 * misc.c (GC_deinit): Destroy GC_write_cs only if THREADS.
304 * misc.c (GC_init_inner): Fix WARN() format specifier (should be
305 word-complient, "%p" is used w/o "0x").
306 * misc.c (GC_init_inner): Don't recognize "GC_PAUSE_TIME_TARGET"
307 environment variable if SMALL_CONFIG.
308 * misc.c (GC_init_inner): Recognize "GC_FULL_FREQUENCY" environment
309 variable to set initial GC_full_freq value (if not SMALL_CONFIG).
310 * doc/README.environment (GC_FULL_FREQUENCY): Add information.
311 * doc/README.environment (GC_MARKERS): Refine information.
312 * misc.c (GC_init_inner): Change GC_ASSERT to GC_STATIC_ASSERT where
314 * misc.c (IF_NEED_TO_LOCK): New macro (instead of GC_need_to_lock).
315 * misc.c (GC_write): Use IF_NEED_TO_LOCK for handling GC_write_cs.
316 * misc.c (GC_abort): Don't define if SMALL_CONFIG.
317 * misc.c (GC_abort): Directly use WRITE() instead of GC_err_printf()
318 (to prevent possible infinite recursion).
320 2009-06-09 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
321 diff90_cvs (resembling diff28, diff30, diff32, diff34, diff47,
322 diff49, diff60, diff62, diff66, diff67, diff68, diff72 partly)
324 * finalize.c (finalization_mark_proc): Replace K&R-style declaration
326 * finalize.c (GC_grow_table, GC_register_finalizer_inner,
327 GC_enqueue_all_finalizers): Remove outdated comments about disabling
329 * finalize.c (GC_general_register_disappearing_link): Fix assertion
330 to catch NULL "obj" value.
331 * finalize.c (GC_unregister_disappearing_link): Check "link"
332 alignment before gaining the lock.
333 * finalize.c (GC_finalize): Refine comment.
334 * finalize.c (GC_finalize): Fix WARN() format specifier (should be
335 word-complient, "%p" is used w/o "0x").
336 * finalize.c (GC_invoke_finalizers): Initialize "bytes_freed_before"
337 variable (to 0) to suppress compiler warning.
338 * include/gc_gcj.h (MARK_DESCR_OFFSET): Move to private/gc_pmark.h.
339 * include/gc_gcj.h: add "extern C" header and tail.
340 * include/private/gc_pmark.h: Remove GC_do_parallel_mark(),
341 GC_help_wanted, GC_helper_count, GC_active_count declarations (move
342 the comments to the place where these symbols are defined in mark.c).
343 * mark.c: Add STATIC GC_do_parallel_mark() declaration (for use by
344 GC_mark_some_inner, if PARALLEL_MARK only).
345 * mark.c (GC_mark_some_inner, GC_help_wanted, GC_helper_count,
346 GC_active_count, GC_do_parallel_mark): Define as STATIC.
347 * pthread_support.c (GC_mark_thread): Ditto.
348 * typd_mlc.c (GC_explicit_typing_initialized, GC_explicit_kind,
349 GC_array_kind, GC_ext_descriptors, GC_ed_size, GC_avail_descr,
350 GC_typed_mark_proc_index, GC_array_mark_proc_index, GC_eobjfreelist,
351 GC_arobjfreelist): Ditto.
352 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR): Change GC_ASSERT
353 for HBLKSIZE to GC_STATIC_ASSERT.
354 * mark.c (GC_noop): Define for Borland C the same as for Watcom.
355 * mark.c (GC_noop, GC_mark_and_push): Add ARGSUSED tag.
356 * pthread_support.c (GC_do_blocking_inner): Ditto.
357 * mark.c (GC_mark_from): Initialize "limit" (to 0) in the default
358 switch branch to suppress compiler warning.
359 * mark.c (GC_return_mark_stack): Append new-line to printf message.
360 * mark.c: Remove unused GC_true_func(), GC_PUSH_ALL().
361 * pthread_support.c (GC_mark_thread): Add dummy "return 0" to
362 suppress compiler warning.
363 * pthread_support.c (start_mark_threads): Move the code limiting
364 "GC_markers" value (and printing a warning) to GC_thr_init().
365 * pthread_support.c (GC_thr_init): Silently limit "GC_markers" value
366 if based on the number of CPUs.
367 * pthread_support.c (GC_thr_init): Treat incorrect "GC_markers"
369 * pthread_support.c (GC_register_my_thread_inner): Add a check for
370 "stack_end" is non-NULL (the same as in win32_threads.c).
371 * pthread_support.c (pthread_create): Call GC_oom_fn before giving up
373 * thread_local_alloc.c (return_single_freelist): Convert "for" loop
374 to "while" one to suppress "possible extraneous ';'" warning.
376 2009-06-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski
378 * darwin_stop_world.c (GC_push_all_stacks): Recognize ARM32.
379 * include/private/gc_priv.h (GC_THREAD_STATE_T): Define for ARM32
381 * include/private/gcconfig.h: Add machine-specific part for DARWIN.
382 * include/private/gcconfig.h (ARM32): Define config parameters for
385 2009-06-08 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
386 (diff91_cvs: resembling diff3, diff27, diff33, diff45, diff47, diff49,
387 diff60, diff67, diff68 partly)
388 * alloc.c (GC_FULL_FREQ, GC_DONT_EXPAND, GC_FREE_SPACE_DIVISOR,
389 GC_TIME_LIMIT): New macros (used to control the default initial
390 values of GC_full_freq variable, GC_dont_expand,
391 GC_free_space_divisor, GC_time_limit respectively).
392 * include/private/gc_priv.h (TIME_LIMIT): Remove macro (replaced
393 with GC_TIME_LIMIT in alloc.c).
394 * alloc.c (GC_need_full_gc, GC_stopped_mark, GC_finish_collection):
396 * mark_rts.c (GC_push_current_stack, GC_push_gc_structures): Ditto.
397 * include/private/gc_priv.h (GC_stopped_mark, GC_finish_collection):
398 Move the prototypes to alloc.c, make STATIC.
399 * include/private/gc_priv.h (GC_push_current_stack,
400 GC_push_gc_structures, GC_push_regs_and_stack): Remove prototypes
401 (move the comments to the places where these functions are defined).
402 * mach_dep.c (GC_push_regs_and_stack): Move to mark_rts.c and define
404 * alloc.c (GC_timeout_stop_func, GC_stopped_mark,
405 GC_print_heap_sects): Convert a group of printf() calls into
406 a single one (for output atomicity).
407 * mark_rts.c (GC_print_static_roots): Ditto.
408 * alloc.c (GC_stopped_mark): Output blank line (when logging) for
409 convenience to delimit collections.
410 * alloc.c (GC_clear_a_few_frames): Rename NWORDS to CLEAR_NWORDS;
411 make "frames" local variable volatile (to prevent optimization).
412 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
413 GC_finish_collection, GC_allocobj): Remove outdated comments about
415 * include/private/gc_priv.h (GC_register_displacement_inner,
416 GC_gcollect_inner): Ditto.
417 * alloc.c (GC_try_to_collect_inner, GC_stopped_mark,
418 GC_finish_collection): Initialize "start_time" local variable (to 0)
419 to suppress compiler warning.
420 * mark_rts.c (GC_add_roots_inner): Ditto (for "old" variable).
421 * alloc.c (GC_RATE, MAX_PRIOR_ATTEMPTS): Guard with "ifndef".
422 * include/private/gc_priv.h (clock, GC_stop_world, GC_start_world,
423 GC_acquire_mark_lock, GC_release_mark_lock, GC_notify_all_builder,
424 GC_wait_for_reclaim, GC_notify_all_marker, GC_wait_marker): Replace
425 K&R-style function prototypes with ANSI C one.
426 * include/private/gc_priv.h (ABORT): Define as DebugBreak() for
427 Win32/WinCE if SMALL_CONFIG (the same as in GC_abort()).
428 * include/private/gc_priv.h (ROUNDED_UP_WORDS, abs): Remove unused
430 * include/private/gc_priv.h (GC_noop): Declare for Borland C the
432 * mark_rts.c (GC_push_conditional_with_exclusions): Add ARGSUSED tag.
434 2009-06-04 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
435 (diff89_cvs, resembling diff3, diff27, diff34, diff38, diff47, diff49,
436 diff59, diff60, diff66, diff67, diff68, diff69a, diff70, diff81
438 * dbg_mlc.c (GC_store_debug_info, GC_store_debug_info_inner): Remove
439 outdated comment about disabling signals.
440 * mallocx.c (GC_malloc_uncollectable,
441 GC_malloc_atomic_uncollectable): Ditto.
443 * dbg_mlc.c (GC_debug_change_stubborn, GC_debug_end_stubborn_change):
445 * pthread_stop_world.c (GC_suspend_handler,
446 GC_suspend_handler_inner): Ditto.
447 * dbg_mlc.c (GC_debug_free, GC_debug_realloc): Fix printf message.
448 * dbg_mlc.c (GC_debug_realloc): Set "result" to NULL in the default
449 switch branch to suppress compiler warning.
450 * dyn_load.c (GC_init_dyld): Use ABORT() instead of GC_abort().
451 * include/private/darwin_semaphore.h (sem_init): Ditto.
452 * include/javaxfc.h: Replace "GC_H" with "_GC_H".
453 * include/private/dbg_mlc.h (GC_has_other_debug_info,
454 GC_store_debug_info): Replace K&R-style function prototypes with ANSI
456 * include/private/gcconfig.h (GC_FreeBSDGetDataStart, real_malloc,
457 GC_win32_get_mem, GC_wince_get_mem, GC_unix_get_mem): Ditto.
458 * include/private/pthread_support.h (GC_stop_init): Ditto.
459 * include/private/gcconfig.h: Refine comment about setting
461 * include/private/gcconfig.h (FIXUP_POINTER): Put parentheses in the
463 * include/private/pthread_support.h (GC_Thread_Rep): Refine comment
464 for "stack_end" field.
465 * mallocx.c (GC_malloc_uncollectable,
466 GC_malloc_atomic_uncollectable): Remove cast to undefined "hbklk".
467 * os_dep.c (GC_USE_MEM_TOP_DOWN): New macro (for setting
468 GC_mem_top_down to MEM_TOP_DOWN for debug purposes).
469 * os_dep.c (GC_gww_read_dirty, catch_exception_raise): Fix WARN()
470 format specifier (should be word-compliant, "%p" is used w/o "0x").
471 * pthread_stop_world.c (GC_suspend_handler_inner): Ditto.
472 * os_dep.c (GC_dirty_init): Append new-line to printf messages.
473 * os_dep.c (GC_mprotect_thread): Fix GC_err_printf message.
474 * os_dep.c (GC_save_callers): Change GC_ASSERT to GC_STATIC_ASSERT.
475 * pthread_stop_world.c (GC_retry_signals, GC_suspend_ack_sem): Define
477 * pthread_stop_world.c (GC_push_all_stacks): Add assertion for that
478 "thread_blocked" is not set for the current thread.
479 * real_malloc.c: Add "extern GC_quiet" to suppress compiler warning.
480 * reclaim.c (GC_reclaim_all): Initialize "start_time" (to 0) to
481 suppress compiler warning.
483 2009-06-02 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
484 (adding last bit of diff86_cvs)
485 * tests/test.c (check_heap_stats): Avoid unbalanced brackets in ifdef.
487 2009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
489 * win32_threads.c: restructure parallel marking mutex intialization.
490 * win32_threads.c, alloc.c, darwin_stop_world.c, mallocx.c, mark.c,
491 pthread_stop_world.c, pthread_support.c: Add runtime conditions
492 on GC_parallel were appropriate.
493 * pthread_support.c: Condition marker_bsp on ia64.
494 (GC_segment_is_thread_stack): Fix loop upper bound.
495 * reclaim.c: Limit some assertions to PARALLEL_MARK.
496 * pthread_support.c: Don't acquire mark lock for thread-local
498 * include/private/gc_priv.h: Don't define parallel mark sync
499 support just for THREAD_LOCAL_ALLOC.
501 2009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
503 * include/private/gcconfig.h: refine MINGW32 test.
504 * mark.c: Add win64/gcc tests.
506 2009-05-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
507 (diff86_cvs, resembling diff28, diff32, diff33, diff38, diff68 partly)
508 * test.c (fork_a_thread, reverse_test, alloc8bytes, tree_test,
509 typed_test, run_one_test, check_heap_stats, main, test): Replace
510 all K&R-style function definitions with ANSI C ones.
511 * trace_test.c (main): Ditto.
512 * test.c (GC_COND_INIT): Define as GC_INIT() also in case of
514 * test.c (reverse_test): Call fork_a_thread() only if GC_PTHREADS
515 or GC_WIN32_THREADS; remove fork_a_thread() macros definition.
516 * test.c (reverse_test): Use "volatile" when clearing "b" and "c"
517 local variables (to suppress "assigned value is never used"
519 * test.c (tree_test): Use public GC_noop1() instead of private
521 * test.c (typed_test): Ditto.
522 * test.c (check_heap_stats): Define and assign value to
523 "late_finalize_count" local variable only if its value is used
524 (if FINALIZE_ON_DEMAND defined).
525 * test.c (main): Remove DJGPP-specific initialization of
526 GC_stackbottom (not needed anymore, handled in gcconfig.h).
527 * trace_test.c: Guard #define GC_DEBUG with #ifndef.
528 * trace_test.c: Include "gc_backptr.h".
529 * trace_test.c (main): Call GC_INIT().
530 * trace_test.c (main): Add "return 0" statement.
532 2009-05-25 Hans Boehm <Hans.Boehm@hp.com> (Really Petter Urkedal)
533 * dyn_load.c (GC_register_dynlib_callback): Use new index j
534 instead of i in the inner loop.
536 2009-05-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff85)
537 * tests/test.c: Increment n_tests with fetch_and_add when possible,
538 avoiding need to export lock.
540 2009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff63,diff65)
541 * include/gc_pthread_redirects.h:
542 - dlfcn.h is included for dlopen() proto before undefining
543 "dlopen" (so, it's possible now to include dlfcn.h after
544 gc.h from user code);
545 - GC_dlopen() proto is added (except for Darwin as
547 - "dlopen" is explicitly undefined (before its redefinition).
549 - "process.h" is included besides "windows.h"
550 (for _beginthreadex/_endthreadex); win32 only.
551 - GC_NO_THREAD_DECLS is moved to the right place
552 (before closing "extern C").
553 * pthread_support.c: Fix out of memory handling for Thread_Reps.
554 * win32_threads.c: Don't include process.h on winCE,
555 improve out of memory handling for thread structures, dont
556 define GC_beginthreadex and GC_endthreadex for winCE.
558 2009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff71)
559 * tests/test.c: Change gcj vtable decriptor type from size_t to
562 2009-05-22 Hans Boehm <Hans.Boehm@hp.com>
563 * gcj_mlc.c: Add comment.
564 * tests/test.c: Change NTEST to NTHREADS. Fork 5 threads by default.
565 Run reverse_test a second time in each thread.Add comments.
566 Dont rely on AO_fetch_and_add.
568 2009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Largely from Ludovic Cortes)
569 * dyn_load.c (GC_register_dynlib_callback,
570 GC_register_dynamic_libraries_dl_iterate_phdr): Add support
571 for GNU_PT_RELRO relocations.
573 2009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff61)
574 * Makefile, Makefile.direct: GC_SOLARIS_PTHREADS was replaced
575 by GC_SOLARIS_THREADS.
576 * include/gc.h: Improve finalizer documentation.
577 * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
578 * pthread_stop_world.c, Makefile.dj: Fix typos.
580 2009-05-21 Hans Boehm <Hans.Boehm@hp.com>
581 * win32_threads.c (GC_new_thread): Make first_thread
582 visible to the whole file.
583 (UNPROTECT): New macro.
584 (GC_push_stack_for, GC_suspend, GC_start_world): unprotect
585 thread structures before writing.
586 (GC_suspend): Acquire GC_fault_handler_lock before suspending
588 * os_dep.c: export GC_fault_handler_lock.
589 (GC_remove_protection): Check if already unprotected.
591 2009-05-20 Hans Boehm <Hans.Boehm@hp.com> (really Ivan Maidanski)
592 * doc/README.win32: Add OpenWatcom warning.
593 * include/private/gcconfig.h: Really check it in.
595 2009-05-19 Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidanski, Dave Korn)
596 * os_dep.c (GC_get_stack_base, windows): Replace with Dave Korn's
597 code from gcc version.
598 * os_dep.c: make gc compilable (optionally) for Cygwin with
599 GetWriteWatch-based virtual dirty bit implementation ("os_dep.c" file).
600 * os_dep.c: Make non-win32 GC_write_fault_handler STATIC.
601 * mark.c (GC_noop): fix declaration definition mismatch for DMC.
602 * include/private/gcconfig.h: Enable MPROTECT_VDB and GWW_VDB for
603 Watcom (Win32 only). It works.
605 and GWW_VDB. It works.
607 2009-05-07 Hans Boehm <Hans.Boehm@hp.com> and Mark Sibly
608 * mach_dep.c: Don't use __builtin_unwind_init for register
609 state on PowerPC/Darwin.
611 2009-04-24 Hans Boehm <Hans.Boehm@hp.com>
612 * doc/gcdescr.html: Improve description of object freelist
614 * include/private/gc_priv.h: Fix comment for _size_map.
616 2009-03-16 Hans Boehm <Hans.Boehm@hp.com>
617 * os_dep.c (GC_linux_stack_base): Relax sanity test.
619 2009-03-11 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
620 * include/private/gc_pmark.h (PUSH_CONTENTS_HDR for
621 MARK_BIT_PER_OBJ): Add missing backslash before eoln.
623 2009-02-28 Hans Boehm <Hans.Boehm@hp.com>
624 * misc.c (GC_set_warn_proc): Implicitly intialize GC on
627 2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Really Petr Krajca)
628 * configure.ac: Enable thread-local allocation for sparc-linux.
629 * configure: Regenerate.
631 2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
632 * alloc.c (GC_try_to_collect): Remove duplicate initialization
634 * malloc.c (GC_generic_malloc): Remove lw to eliminate single-
636 * mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
638 2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (Mostly Ivan Maidansky)
639 * allchblk.c, backgraph.c, dbg_mlc.c, dyn_load.c,
640 finalize.c, include/private/gc_pmark.h, malloc.c, mark.c,
641 os_dep.c, pthread_stop_world.c, pthread_support.c, reclaim.c,
642 thread_local_alloc.c.
643 * misc.c: Refine comment.
645 2009-02-28 Hans Boehm <Hans.Boehm@hp.com>
646 * os_dep.c: Define GC_GWW_BUF_LEN more intelligently. Add FIXME
649 2009-02-28 Hans Boehm <Hans.Boehm@hp.com> (With input from Ivan Maidansky)
650 * win32_threads.c (GC_push_stack_for): Yet another attempt
651 at the stack_min finding logic. Try to clean up the existing code
652 while minimizing VirtualQuery calls.
653 (GC_win32_start_inner): Register thread before GC_printf.
654 Produce more output with DEBUG_THREADS.
655 *include/gc.h: Update obsolete comments.
657 2009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
659 (gcj_class_struct2): Use cast instead of l suffix.
660 Cast GetLastError to int in various places.
661 Avoid unused result warning from incr/decr macros.
662 Add cast for fake_gcj_mark_proc.
663 Cast GC_gc_no to unsigned in printf.
665 2009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
666 * include/gc.h: Fix two typos in comments.
668 2009-02-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
669 * finalize.c: Fix typo in comment.
671 2008-12-03 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
672 * blacklst.c (GC_print_source_pointer): Don't call GC_print_heap_obj
675 2008-12-01 Hans Boehm <Hans.Boehm@hp.com>
676 * reclaim.c: (GC_reclaim_block): Scan even nearly full blocks
677 if we are checking for leaks.
679 2008-11-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky)
680 * win32_threads.c: Remove mark lock spinning.
681 * win32_threads.c, pthread_support.c: Update GC_unlocked_count,
682 GC_spin_count, and GC_block_count using atomic operations.
683 * tests/test.c: Declare n_tests as AO_t only if we have threads.
685 2008-11-11 Hans Boehm <Hans.Boehm@hp.com>
686 (Really almost entirely Ivan Maidansky)
687 * win32_threads.c: Support PARALLEL_MARK. Make printf arg
688 types agree with format specifiers. Add missing copyright header.
689 Add STATIC for GC_threads.
690 * include/private/gcconfig.h: Add FIXME comment.
691 * tests/test.c (run_ine_test): Replace LOCK/UNLOCK use with
692 AO_fetch_and_add1_full. Declare n_tests as AO_t.
693 (WinMain): Dont call GC_use_DllMain.
694 with PARALLEL_MARK or THREAD_LOCAL_ALLOC.
696 2008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
697 * alloc.c (GC_try_to_collect_inner): Don't print redundant
698 GC_bytes_allocd and GC_gc_no.
699 (GC_stopped_mark): Print average world stop time.
700 * include/private/gc_priv.h (MS_TIME_DIFF): Add cast.
702 2008-11-10 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidansky)
703 * misc.c, doc/README.environment: Add support for
704 GC_FREE_SPACE_DIVISOR and GC-disable-incremental.
705 * include/gc.h: Make GC_set_free_space_divisor correspond to
706 (somewhat unfortunate) reality.
708 2008-11-07 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
709 (Mostly improves LLP64 support.)
710 * backgraph.c, checksums.c, dbg_mlc.c, finalize.c, mark.c,
711 misc.c, reclaim.c: Changed some int and long type to word or size_t
712 (and vice versa where appropriate)
713 * gcj_mlc.c, include/private/dbg_mlc.h, include/private/gcconfig.h,
714 include/private/thread_local_alloc.h, mark.c,
715 misc.c, thread_local_alloc.c, win32_threads.c: Added intermediate
716 casts to word type when casting from int to pointer (or pointer
717 to int, or data pointer to code pointer) - just to remove the
718 corresponding compiler warning.
719 * ptr_chck.c (GC_is_visible): cast int const to word type to
720 prevent left shift overflow.
721 * os_dep.c: change the type of GC_mem_top_down global var
722 (containing a flag) to DWORD.
723 * include/gc_config_macros.h: define GC_SOLARIS_THREADS if GC_THREADS
724 is defined on SunOS x86_64.
725 * misc.c (GC_init_size_map): Ifdef out GC_ASSERT as a workaround
726 for VC++ 2008 amd64 (v15.00.21022.08 for x64) compiler bug
727 (the compiler gets hung if invoked with -Ox -D
728 ALL_INTERIOR_POINTERS -D GC_ASSERTIONS)
729 * backgraph.c: cast GC_gc_no value to unsigned short when
730 assigned/compared to height_gc_no field of back_edges.
731 * os_dep.c (GC_remove_protection): Add ARGSUSED.
732 * win32_threads.c (GC_thread_exit_proc): Remove unused local var.
733 * mark.c (GC_check_dirty): Move declaration out of func body.
735 2008-11-06 Hans Boehm <Hans.Boehm@hp.com>
736 * doc/gcinterface.html: Improve REDIRECT_MALLOC documentation.
737 * include/gc.h (GC_register_my_thread): Improve comment.
739 2008-11-04 Hans Boehm <Hans.Boehm@hp.com>
740 * Makefile.direct: Add comment for -DCHECKSUMS.
742 2008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
743 * thread_local_alloc.c, include/private/thread_local_alloc.h:
744 Fix typos in comments.
745 * finalize.c: Declare mark_procs and GC_register_finalizer_inner
747 * malloc.c (GC_free): Move size calculation below assertion.
749 2008-10-27 Hans Boehm <Hans.Boehm@hp.com>
750 * win32_threads.c (GC_get_stack_min, GC_may_be_in_stack):
751 Add one entry VirtualQuery cache, I_HOLD_LOCK assertions.
752 (GC_push_stack_for, GC_get_next_stack) : Hopefully fix WINCE support.
754 2008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Thanks to Klaus Treichel.)
755 * finalize.c (GC_general_register_disappearing_link): Add
757 * malloc.c (GC_generic_malloc): Round lb to granules, not words.
758 * mallocx.c (GC_generic_malloc_ignore_off_page): Round lb to
761 2008-10-27 Hans Boehm <Hans.Boehm@hp.com> (Really Rex Dieter and
763 * mach_dep.c (NO_GETCONTEXT): Define for sparc linux.
764 * configure.ac: Define mach_dep for sparc-linux.
765 * configure: Regenerate.
767 2008-10-25 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidansky)
768 * mark_rts.c (GC_approx_sp): Use volatile to avoid common
771 2008-10-25 Hans Boehm <Hans.Boehm@hp.com>
772 * dyn_load.c (GC_cond_add_roots): Fix GC_get_next_stack argument
775 2008-10-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
776 * alloc.c, dbg_mlc.c, dyn_load.c, finalize.c, gcj_mlc.c,
777 include/gc.h, include/gc_config_macros.h, include/gc_cpp.h,
778 include/gc_gcj.h, include/gc_mark.h, include/gc_typed.h,
779 include/javaxfc.h, include/private/gc_locks.h,
780 include/private/gc_priv.h, malloc.c, mallocx.c, mark.c, mark_rts.c,
781 misc.c, obj_map.c, os_dep.c, pthread_support.c, ptr_chck.c,
782 stubborn.c, tests/test.c, thread_local_alloc.c, typd_mlc.c
783 win32_threads.c: Add GC_CALL and GC_CALLBACK macro invocations.
784 * test.c: Remove some old K&R code.
786 2008-10-24 Hans Boehm <Hans.Boehm@hp.com>
787 (Partially based loosely on patch from Ivan Maidanski)
788 * win32_threads.c (GC_may_be_in_stack): New. (GC_Thread_Rep):
789 Add last_stack_min. (GC_push_stack_for): Use last_stack_min.
790 (GC_get_next_stack): Add limit argument, use_last_stack_min.
791 (GC_suspend): make stack_base assignment conditional.
792 * dyn_load.c (win32 GC_cod_add_roots): Pass limit to
794 * configure_atomic_ops.sh: Remove.
795 * build_atomic_ops.sh, build_atomic_ops.sh.cygwin, doc/README.win32,
796 Makefile.direct: Partially support build directories whose path
797 name contains blanks.
798 * Makefile.am: Support new files (build_atomic_ops.sh,
799 build_atomic_ops.sh.cygwin)
800 * Makefile.in: Regenerate.
802 2008-10-21 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
803 * include/private/gc_locks.h, include/private/gc_pmark.h,
804 include/private/gc_priv.h, include/private/gcconfig.h,
805 mach_dep.c, mark_rts.c, misc.c, os_dep.c, pthread_stop_world.c,
806 pthread_support.c, thread_local_alloc.c, typd_mlc.c, win32_threads.c:
809 2008-10-21 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
810 * pthread_support.c: Comment out LOCK_STATS.
811 * include/gc.h: Fix comments.
813 2008-10-20 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
814 * misc.c (GC_init_inner): Enable GC_LOG_FILE on Cygwin.
815 * include/private/gcconfig.h: Consider USE_MMAP for Cygwin.
816 * os_dep.c (GC_get_main_stack_base): Use alternate definition
818 * include/private/gc_priv.h: Sometimes define SETJMP on Cygwin.
820 2008-10-20 Hans Boehm <Hans.Boehm@hp.com>
821 * doc/README: Make it clearer when Makefile.direct is assumed.
822 * cord/cord.am: install include/cord.h.
823 * Makefile.in: Regenerate.
825 2008-09-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
826 * win32_threads.c (GC_pthread_join, GC_pthread_start_inner):
827 Remove unused variables.
828 * darwin_stop_world.c: Always declare GC_thr_init().
829 * dbg_mlc.c (GC_debug_free_inner): Dont touch oh_sz if
830 SHORT_DBG_HDRS is defined.
831 * include/private/gc_pmark.h (OR_WORD_EXIT_IF_SET, parallel
832 mark, USE_MARK_BITS version): Refer to correct parameter name.
834 2008-09-24 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski)
835 * finalize.c (GC_general_register_disappearing_link): Remove
837 * gcj_mlc.c (GC_init_gcj_malloc): Add cast to signed.
838 * os_dep.c: (GC_write_fault_handler): Remove remaining
839 references to deleted variable "code". Remove redundant
841 * include/private/gcconfig.h (GWW_VDB): Define for X86_64 when
842 defined for X86. (STATIC): Define as "static" with NO_DEBUGGING.
844 2008-09-24 Hans Boehm <Hans.Boehm@hp.com>
845 * include/private/gc_priv.h: Update MAX_HEAP_SECTS.
847 2008-09-10 Hans Boehm <Hans.Boehm@hp.com>
848 * dbg_mlc.c (GC_print_smashed_obj): Increase robustness with
849 smashed string, (GC_debug_free_inner): Mark as free.
850 * mallocx.c (GC_malloc_many): Always clear new block if
851 GC_debugging_started.
852 * reclaim.c: Move GC_debugging_started from
853 GC_reclaim_small_nonempty_block() to GC_reclaim_generic(),
854 which is also called directly.
855 * doc/README: Fix spelling error. Update license summary.
856 * include/gc.h (GC_PRE_INCR3, GC_POST_INCR3): add (void **) casts.
857 * tests/test.c: Don't define GC_DEBUG if already defined.
859 2008-08-27 Hans Boehm <Hans.Boehm@hp.com>
860 * doc/simple_example.html: update --enable-full-debug reference,
861 Make HTML formatting standards compliant.
862 * doc/debugging.html, doc/leak.html: Fix HTML formatting bugs.
863 * doc/gcinterface.html: specify encoding.
865 2008-08-27 Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi)
866 * doc/simple_example.html: Update thread-local allocation
869 2008-08-26 Hans Boehm <Hans.Boehm@hp.com> (with help from Marco Maggi)
870 * configure.ac: Check for gc-debug earlier; replace remaining
872 * configure: Regenerate.
873 * include/gc.h, ptr_chck.c (GC_pre_incr, GC_post_incr):
874 Use signed offset type. Use ptr_t internally.
875 * doc/gcinterface.html: Update LOCAL_MALLOC description.
876 * doc/README.autoconf, doc/leak.html, doc/README.DGUX386:
877 Fix full-debug reference.
878 * include/gc.h: Rewrite GC_..._INCR and friends.
879 * tests/test.c: Minimally test GC_..._INCR and friends.
881 2008-08-21 Hans Boehm <Hans.Boehm@hp.com>
882 * mark.c: (GC_push_next_marked, GC_push_next_marked_dirty,
883 GC_push_next_marked_uncollectable): Never invoke GC_push_marked
885 * headers.c: Test COUNT_HDR_CACHE_HITS not USE_HDR_CACHE.
886 (GC_header_cache_miss): Always blacklist pointers for free
887 hblks. Add assertion and comment.
888 * pthread_support.c (GC_register_my_thread): Fix #if indentation.
889 * include/private/gc_hdrs.h: USE_HDR_CACHE is no longer tested.
891 * include/private/gc_pmark.h: (PUSH_OBJ): Add assertion.
893 2008-08-21 Hans Boehm <Hans.Boehm@hp.com>
894 * alloc.c, include/gc_mark.h, Makefile.direct: Improve comments.
896 2008-08-01 Hans Boehm <Hans.Boehm@hp.com> (Really Klaus Treichel)
897 * configure.ac: Set win32_threads on MinGW.
898 * configure: Regenerate.
900 2008-07-25 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)
901 Ivan's description of the patch follows. Note that a few pieces like
902 the GC_malloc(0) patch, were not applied since an alternate had been
903 previously applied. A few differed stylistically from the rest of
904 the code (mostly casts to void * instead of target type),
905 or were classified as too minor to bother. Note that
906 all of Ivan's static declarations which did not correct outright
907 naming bugs (as a few did), where replaced by STATIC, which is
910 - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
912 - addition of missing getter/setter functions for public variables
913 (may be useful if compiled as Win32 DLL);
914 - addition of missing GC_API for some exported functions;
915 - addition of missing "static" declarator for internal functions
916 and variables (where possible);
917 - replacement of all remaining K&R-style definitions with ANSI
918 C ones (__STDC__ macro is not used anymore);
919 - addition of some Win32 macro definitions (that may be missing in
920 the standard headers supplied with a compiler) for GWW_VDB mode;
921 - elimination of most compiler warnings (except for
922 "uninitialized data" warning);
923 - several typos correction;
924 - missing parenthesis addition in macros in some header files of
925 "libatomic_ops" module.
927 My highlights based on reading the patch:
929 * allchblk.c: Remove GC_freehblk_ptr decl.
930 Make free_list_index_of() static.
931 * include/gc.h: Use __int64 on win64, define GC_oom_func,
932 GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
933 add getter and setters: GC_get_gc_no, GC_get_parallel,
934 GC_set_oom_fn, GC_set_finalize_on_demand,
935 GC_set_java_finalization, GC_set_dont_expand,
936 GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
937 GC_set_finalizer_notifier. Always define GC_win32_free_heap.
938 gc_config_macros.h: Define _REENTRANT after processing
940 * include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
941 handling of operator new[] for old Windows compilers.
942 * include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
944 * dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
945 * mark.c (GC_mark_and_push_stack): Fix source argument for
947 * misc.c: Fix log file naming based on environment variable
948 for Windows. Make GC_set_warn_proc and GC_set_free_space_divisor
949 just return current value with 0 argument. Add DONT_USER_USER32_DLL.
950 Add various getters and setters as in gc.h.
951 * os_dep.c: Remove no longer used GC_disable/enable_signals
952 implementations. (GC_get_stack_base): Add pthread_attr_destroy
953 call. No longer set GC_old_bus_handler in DARWIN workaround.
954 * pthread_support.c: GC_register_my_thread must also
955 call GC_init_thread_local.
957 2008-07-21 Hans Boehm <Hans.Boehm@hp.com>
958 * Makefile.direct, mach_dep.c: Add support for NO_GETCONTEXT.
959 * mach_dep.c: Include signal.h.
960 * gc_priv.h: Factor out INLINE declaration.
962 2008-07-03 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Thiemo Seufer)
964 * include/private/gcconfig.h: Update MIPS/LINUX config.
965 * doc/gcdescr.html: Fix typo.
966 * mach_dep.c (GC_with_callee_saves_pushed): Don't rely on getcontext
969 2008-05-30 Hans Boehm <Hans.Boehm@hp.com> (some really dmcmahill)
971 * configure.ac: SPARC fixes.
972 * configure: Regenerate.
973 * thread_local_alloc.c(GC_mark_thread_local_fls_for): Include
974 size 0, except for gcj.
975 * doc/gc.man: Expand C++ cautions.
976 * include/gc_inline.h: Fix comments.
978 2008-05-03 Hans Boehm <Hans.Boehm@hp.com>
980 * include/gc_version.h, configure.ac, doc/README:
981 Change to version 7.2alpha1.
982 * configure: Regenerate.
986 2008-05-03 Hans Boehm <Hans.Boehm@hp.com>
988 * include/gc_version.h, configure.ac, doc/README:
989 Change to version 7.1.
990 * configure: Regenerate.
992 2008-05-03 Hans Boehm <Hans.Boehm@hp.com>
994 * doc/gcinterface.html: Improve C++ interface documentation.
996 2008-03-10 Hans Boehm <Hans.Boehm@hp.com>
998 * allchblk.c (GC_allochblk): Check for overflow during size
1000 * tests/huge_test.c: New.
1001 * Makefile.direct, tests/tests.am: Add huge_test.c
1002 * Makefile.in: Regenerate.
1004 2008-02-29 Hans Boehm <Hans.Boehm@hp.com>
1006 * pthread_support.c: Fix typo in comment.
1007 * os_dep.c (GC_win32_get_mem): Add heap section only if
1008 allocation succeeded.
1010 2008-02-28 Hans Boehm <Hans.Boehm@hp.com>
1012 * malloc.c: (free replacement) Fix caller address space check.
1014 2008-02-25 Hans Boehm <Hans.Boehm@hp.com>
1016 * finalize.c (GC_grow_table): Dereference table in null-check.
1018 2008-02-24 Hans Boehm <Hans.Boehm@hp.com>
1020 * win32_threads.c (GC_delete_gc_thread, GC_delete_thread):
1021 Consistently call CloseHandle. (GC_suspend): Call
1022 GC_delete_gc_thread.
1023 * tests/test.c: Don't reference GC_print_stats if not exported.
1025 2008-02-20 Hans Boehm <Hans.Boehm@hp.com>
1027 * tests/test.c (run_one_test): Don't mention pthread_self().
1028 * misc.c: Declare GC_thr_init().
1030 2008-02-20 Hans Boehm <Hans.Boehm@hp.com>
1032 * allchblk.c (add_to_fl): disable assertions with USE_MUNMAP,
1033 and refine assertions to handle huge unmergable blocks.
1034 (GC_allochblk_nth): Add comment.
1036 2008-02-20 Hans Boehm <Hans.Boehm@hp.com>
1038 * include/private/gcconfig.h: Add misssing FREEBSD macro
1041 2008-02-20 Hans Boehm <Hans.Boehm@hp.com>
1043 * allchblk.c (GC_enough_large_bytes_left): No longer take
1044 parameters; return free list index bound.
1045 (GC_merge_unmapped): Don't access nexthdr until after null test.
1046 (Fixes bug in 1/29/08 check-in.) (GC_allochblk): Calculate
1047 when splitting is allowable only once here, not when considering each
1048 block. (GC_allchblk_nth): Accept new may_split parameter.
1049 Avoid some redundant tests for exact size matches.
1050 * alloc.c (GC_should_collect): Cache min_bytes_allocd.
1051 (GC_maybe_gc): Make locking assertion testable.
1052 * mark_rts.c: Fix indentation.
1053 * pthread_stop_world.c: Replace old GC_err_printf1 reference.
1054 * tests/test.c: Remove (void) casts. Optionally print some
1057 2008-02-15 Hans Boehm <Hans.Boehm@hp.com>
1059 * windows-untested/gc.def: Remove CreateThread line.
1060 * windows-untested/README: New file.
1061 * win32_threads.c (GC_use_DllMain): Force collector initialization.
1062 (GC_init_parallel): Reformat comment.
1063 * include/gc.h (GC_use_DllMain): Clarify usage rules in comment.
1064 * mark.c (GC_mark_from): Slightly simplify GC_DS_PER_OBJECT code.
1065 * include/gc_cpp.h: Add matching placement delete overloads
1067 * include/private/gc_locks.h (NO_THREAD): Add cast.
1068 * include/private/gcconfig.h: Add test for __HP_aCC.
1069 * configure.ac, tests/tests.am: Avoid libgccpp on HP/UX.
1070 * Makefile.in, configure: Regenerate.
1072 2008-02-11 Hans Boehm <Hans.Boehm@hp.com> (partly David Leonard)
1074 * doc/README.win32: Fix typo.
1075 * configure.ac: Fix printing of enable-shared result.
1076 * configure: Regenerate.
1078 2008-02-08 Hans Boehm <Hans.Boehm@hp.com>
1080 * misc.c (GC_init_inner): Assert !GC_need_to_lock only when
1081 defined. (GC_call_with_stack_base): Add GC_API.
1082 * os_dep.c (GC_get_stack_base): Add GC_API.
1083 * win32_threads.c: (GC_register_my_thread, GC_unregister_my_thread):
1085 * include/gc.h: Add GC_API annotations.
1086 * include/private/gc_locks.h: Define UNCOND_LOCK etc. also for
1088 * include/private/gc_pmark.h: Fix comments.
1090 2008-02-06 Hans Boehm <Hans.Boehm@hp.com> (mostly from Henning Makholm)
1092 * include/private/gc_priv.h, mark_rts.c, typd_mlc.c:
1093 Add GC_push_typed_structures() to push GC_ext_descriptors.
1095 2008-01-31 Hans Boehm <Hans.Boehm@hp.com> (mostly from Andreas Tobler)
1097 * tests/test.c: Call GC_INIT for DARWIN; test system type using
1098 gcconfig.h-defined macros.
1100 2008-01-29 Hans Boehm <Hans.Boehm@hp.com>
1102 * allchblk.c (GC_merge_unmapped, GC_freehblk): Refuse to create
1103 blocks large enough that their size, when interpreted as a signed
1104 value, would be negative.
1105 * include/private/gc_priv.h: Comment hb_sz range limit.
1107 2008-01-29 Hans Boehm <Hans.Boehm@hp.com> (with help from Manuel Serrano)
1109 * mark.c (GC_push_next_marked): correct comment.
1110 * Makefile.direct: document NO_PROC_STAT.
1111 * include/private/gcconfig.h: Accomodate NO_PROC_STAT.
1113 2008-01-10 Hans Boehm <Hans.Boehm@hp.com>
1115 * include/gc_version.h, configure.ac, doc/README:
1116 Change to version 7.1alpha3.
1117 * configure: Regenerate.
1121 2008-01-10 Hans Boehm <Hans.Boehm@hp.com>
1123 * include/gc_version.h, configure.ac, doc/README:
1124 Change to version 7.1alpha2.
1125 * configure: Regenerate.
1127 2008-01-10 Hans Boehm <Hans.Boehm@hp.com>
1129 * Makefile.am: Mention atomic_ops.c and atomic_ops_sysdeps.S
1130 again. Refer to build directory as ".".
1131 * Makefile.in: Regenerate.
1133 2008-01-10 Hans Boehm <Hans.Boehm@hp.com>
1135 * configure.ac: Ignore --enable-parallel-mark on Darwin for now.
1136 * configure: Regenerate.
1137 * darwin_stop_world.c: Add FIXME comment for parallel marker.
1139 2008-01-09 Hans Boehm <Hans.Boehm@hp.com>
1141 * include/private/gc_priv.h: Update MAX_ROOT_SETS
1142 and LOG_PHT_ENTRIES to handle larger heaps.
1144 2008-01-03 Hans Boehm <Hans.Boehm@hp.com>
1146 * include/gc.h (GC_INIT,GC_init): Update comments.
1148 2008-01-03 Hans Boehm <Hans.Boehm@hp.com> (based on a patch from
1149 John Bowman, and an ancient patch from Fergus Henderson)
1151 * allchblk.c, alloc.c, include/private/gc_priv.h:
1152 Track GC_bytes_dropped and use in GC triggering decisions.
1153 * alloc.c (min_bytes_allocd): Weight atomic blocks less.
1155 2008-01-02 Hans Boehm <Hans.Boehm@hp.com>
1157 * alloc.c (GC_add_to_heap): Call GC_install_header(p) AFTER
1160 2007-12-23 Hans Boehm <Hans.Boehm@hp.com>
1162 * Makefile.am: Add NT_X64_THREADS_MAKEFILE.
1164 2007-12-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Friedrich Dominicus)
1166 * NT_X64_STATIC_THREADS_MAKEFILE: Clean up obsolete comment.
1167 * alloc.c: Add declaration for GC_add_current_malloc_heap.
1168 * win32_threads.c (GC_beginthreadex): Clean up error
1170 * doc/README.win64, NT_X64_THREADS_MAKEFILE, Makefile.direct:
1171 Add NT_X64_THREADS_MAKEFILE.
1173 2007-12-21 Hans Boehm <Hans.Boehm@hp.com>
1175 * alloc.c: Define GC_version instead of in version.h.
1176 * version.h: Remove.
1177 * include/gc_version.h: Move most of version.h here.
1178 * include/gc.h: Include gc_version.h.
1179 * gcname.c, add_gc_prefix.c: include gc.h instead of version.h.
1180 * Makefile.direct, Makefile.dj, Makefile.am, include/include.am:
1181 Adjust for version.h rename.
1182 * Makefile.in: Regenerate.
1184 2007-12-21 Hans Boehm <Hans.Boehm@hp.com> (Really mostly russ sludge dot net)
1186 * configure.ac: Put libatomic_ops links in build directory.
1187 * configure: Regenerate.
1188 * Makefile.am: Dont mention atomic_ops.c and atomic_ops_sysdeps.S
1191 2007-12-20 Hans Boehm <Hans.Boehm@hp.com>
1193 * include/gc.h, doc/README.macros: Add GC_NO_THREAD_REDIRECTS,
1194 GC_NO_THREAD_DECLS, don't test explicitly for GC_SOLARIS_THREADS.
1196 2007-12-20 Hans Boehm <Hans.Boehm@hp.com>
1198 * alloc.c: Deal correctly with address wrapping for
1199 GC_greatest_plausible_heap_addr and GC_least_plausible_heap_addr.
1200 * finalize.c, include/gc.h (GC_register_disappearing_link,
1201 GC_register_finalizer_inner): Improve out-of-memory handling.
1202 * include/private/gc_pmark.h: Fix comment spelling.
1204 2007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really mainly Peter Wang)
1206 * include/gc_inline.h, include/gc_tiny_fl.h: cleanups to make usable
1209 2007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really Radek Polak)
1211 * include/gc.h: Don't define GC_HAVE_BUILTIN_BACKTRACE for uclibc.
1213 2007-12-18 Hans Boehm <Hans.Boehm@hp.com>
1215 * gc_cpp.cc: Don't include gc_cpp.h from local directory.
1217 2007-12-18 Hans Boehm <Hans.Boehm@hp.com> (really Adam Megacz)
1219 * allchblk.c, configure.ac (add --enable-munmap)
1220 * configure: Regenerate.
1222 2007-12-10 Andreas Tobler <a.tobler@schweiz.org>
1224 * dyn_load.c (GC_dyld_image_add): Remove ifdef clause and use the macro
1225 GC_GETSECTBYNAME instead.
1226 * include/private/gc_priv.h: Define GC_GETSECTBYNAME according to the
1227 architecture (Darwin).
1229 2007-10-24 Hans Boehm <Hans.Boehm@hp.com>
1231 * reclaim.c (GC_bytes_found): Expand comment.
1232 * thread_local_alloc.c (GC_malloc_atomic, GC_gcj_malloc): Pass
1233 granules, not bytes, to GC_FAST_MALLOC_GRANS.
1234 * include/gc.h: Never include gc_local_alloc.h.
1235 * tests/test.c: Add size zero allocation tests.
1237 2007-10-23 Hans Boehm <Hans.Boehm@hp.com>
1239 * malloc.c: Update GC_large_allocd_bytes on explicit deallocation.
1240 * allchblk.c: Sanity check GC_max_large_allocd_bytes.
1242 2007-10-23 Hans Boehm <Hans.Boehm@hp.com> (Really Manuel Serrano)
1244 * Makefile.direct: Invoke $(MAKE) instead of make.
1246 2007-10-23 Hans Boehm <Hans.Boehm@hp.com>
1248 * doc/scale.html: Reflect gc7 thread local allocation behavior.
1250 2007-10-23 Hans Boehm <Hans.Boehm@hp.com> (really Petter Urkedal)
1252 * include/extra/gc.h, include/extra/gc_cpp.h: New.
1253 * include/include.am: Install gc.h and gc_cpp.h in $(prefix)/include
1255 * Makefile.in: Regenerate.
1257 2007-08-15 Hans Boehm <Hans.Boehm@hp.com> (really Samuel Thibault)
1259 * pthread_support.c (GC_thr_init): Use sysconf(_SC_NPROCESSORS_ONLN)
1262 2007-08-14 Hans Boehm <Hans.Boehm@hp.com> (really David Daney)
1264 * include/private/gcconfig.h: Add Linux/mips-64 support.
1266 2007-08-14 Hans Boehm <Hans.Boehm@hp.com> (really mostly Samuel Thibault)
1268 * dbg_mlc.c: Use random() on all glibc systems.
1269 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() on
1271 * pthread_stop_world.c (GC_suspend_handler, GC_stop_init): Accomodate
1272 systems without SA_SIGINFO.
1274 2007-08-14 Hans Boehm <Hans.Boehm@hp.com> (partly really Henrik Theiling)
1276 * include/gc.h (GC_PTR_STORE): Fix non-DEBUG parentheses.
1277 * tests/test.c (run_one_test): Add GC_PTR_STORE test.
1278 No longer test for RS6000.
1280 2007-08-03 Hans Boehm <Hans.Boehm@hp.com>
1282 * alloc.c, backgraph.c, headers.c, include/private/gc_priv.h:
1283 Maintain GC_our_memory and GC_n_memory.
1284 * dbg_mlc.c (GC_print_smashed_obj): Improve message.
1285 (GC_print_all_smashed_proc): Pass client object address instead of
1287 * dyn_load.c (sort_heap_sects): New. (GC_register_map_entries):
1288 Register sections that are contiguous and merged with our heap.
1289 * malloc.c, os_dep.c (GC_text_mapping): Check for just base name
1291 * malloc.c (calloc): Check for special callers even with
1292 USE_PROC_FOR_LIBRARIES. Move assertion. Add rudimentary
1293 malloc/free tracing.
1294 * misc.c: No longer call GC_init_lib_bounds explicitly.
1295 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Always
1296 initialize on demand.
1297 * tests/test.c: Call GC_INIT only when required.
1299 2007-08-03 Hans Boehm <Hans.Boehm@hp.com>
1301 * Makefile.direct: Remove comment fragment.
1302 * tests/tests.am: Add smashtest.
1303 * Makefile.in: Regenerate.
1304 * configure.ac: Define GC_USE_DLOPEN_WRAP with redirect-malloc.
1305 * configure: Regenerate.
1306 * pthread_support.c: Fix comment spelling.
1307 * include/private/gcconfig.h: Define USE_PROC_FOR_LIBRARIES with
1308 GC_LINUX_THREADS and REDIRECT_MALLOC.
1309 * tests/smash_test.c: Initial check-in.
1310 * obj_map.c: Print log entry to correct file.
1311 * include/private/thread_local_alloc.h: Add TlsAlloc error check.
1313 2007-07-23 Hans Boehm <Hans.Boehm@hp.com>
1315 * alloc.c (GC_stopped_mark): Call GC_add_current_malloc_heap()
1316 while world is still running.
1317 * os_dep.c (GC_is_heap_base): Don't call GC_add_current_malloc_heap()
1319 * include/gc.h (GC_INIT for cygwin): Always call GC_add_roots.
1320 * misc.c (GC_init/GC_init_inner): Perform all work in
1322 * Makefile.direct: Expand -DUSE_MUNMAP comment.
1324 2007-07-23 Hans Boehm <Hans.Boehm@hp.com> (really Jim Marshall)
1326 * include/gc.h: Define uintptr_t explicitly for VC++6.
1327 * msvc_dbg.c (GetModuleBase): Revert to strcat if strcat_s doesn't
1330 2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
1332 * version.h, configure.ac, doc/README: Change to version 7.1alpha1.
1333 * configure: Regenerate.
1335 2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
1337 * version.h, configure.ac, doc/README: Change to version 7.0.
1338 * configure: Regenerate.
1340 2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
1342 * include/gc_config_macros.h: Also check for IA64 when setting
1344 * mallocx.c: Change my_bytes_allocd to signed_word.
1345 * include/gc_pthread_redirects.h: Remove obsolete Solaris threads
1346 (as opposed to pthreads) support.
1348 2007-07-02 Hans Boehm <Hans.Boehm@hp.com>
1350 * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext()
1351 on ARM/Linux. Check getcontext() return value.
1353 2007-06-29 Hans Boehm <Hans.Boehm@hp.com>
1355 * backgraph.c (per_object_func): Make argument types consistent.
1356 (GC_traverse_back_graph): Mark GC_deepest_obj.
1358 2007-06-29 Hans Boehm <Hans.Boehm@hp.com>
1360 * finalize.c (GC_finalize): Change dl_size and fo_size to size_t.
1361 * os_dep.c (GC_win32_get_mem): Add GC_mem_top_down option.
1363 2007-06-28 Hans Boehm <Hans.Boehm@hp.com>
1365 * doc/README.win32, doc/README, README.QUICK: Fix some of the worst
1367 * dyn_load.c: Partially support cygwin, but don't enable it yet.
1369 2007-06-28 Hans Boehm <Hans.Boehm@hp.com>
1371 * Makefile.am: Use -no-undefined for libgc.
1372 * Makefile.in: Regenerate.
1373 * Makefile.direct: Document USE_PROC_FOR_LIBRARIES.
1374 * dyn_load.c (GC_register_map_entries): Rename prot_buf to prot
1376 * misc.c: Fix some WARN calls. Move GC_is_initialized setting and
1378 * os_dep.c: Consistently use WARN where appropriate.
1379 * thread_local_alloc.c: Revert change to GC_WIN32_THREADS test. Instead
1380 remove inappropriate pthread.h include.
1381 * doc/README.linux: Remove some anachronisms.
1383 2007-06-23 Hans Boehm <Hans.Boehm@hp.com>
1385 * alloc.c: Also use GC_check_tls on non-Linux systems.
1386 * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
1387 * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
1390 2007-06-19 Hans Boehm <Hans.Boehm@hp.com>
1392 * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
1393 (GC_print_heap_sects): Use size_t instead of unsigned long.
1394 * thread_local_alloc.c (GC_lookup_thread): Define in the correct
1396 * win32_threads.c, include/gc_config_macros.h: The last of Romano
1397 Paolo Tenca's patch. Move stdint.h include to gc_config_macros.h.
1398 * include/gc_inline.h: Avoid gc_priv.h dependencies.
1399 * tests/test.c (check_heap_stats): Replace unsigned long with size_t.
1401 2007-06-12 Hans Boehm <Hans.Boehm@hp.com>
1403 * aclocal.m4: Regenerate to update date.
1405 2007-06-10 Hans Boehm <Hans.Boehm@hp.com>
1407 * NT_X64_STATIC_THREADS_MAKEFILE: Replace obsolete -debugtype:cv.
1408 * mark_rts.c (GC_push_roots): Fix kind type.
1410 2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
1412 * doc/README.win64: New file.
1413 * doc/doc.am, Makefile.direct: Add README.win64.
1414 * Makefile.in: Regenerate.
1416 2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
1418 * Makefile.am, Makefile.direct: Add NT_X64_STATIC_THREADS_MAKEFILE.
1419 * Makefile.in: Regenerate.
1420 * NT_X64_STATIC_THREADS_MAKEFILE: Fix warning flags.
1421 * allochblk.c, alloc.c, blacklst.c, dbg_malc.c, dyn_load.c,
1422 finalize.c, headers.c, mach_dep.c, malloc.c, mark.c, misc.c,
1423 obj_map.c, os_dep.c, ptr_chck.c, reclaim.c, typd_mlc.c,
1424 win32_threads.c, cord/de_win.c, include/gc_mark.h,
1425 include/private/gc_hdrs.h, include/private/gc_pmark.h,
1426 include/private/gc_priv.h, tests/test_cpp.cc:
1427 Replace old style function declarations. Clean up integral types.
1428 Remove register declarations. The change in malloc.c and the
1429 "int descr" declaration in mark.c are the most likely to have
1430 been real bugs outside of win64.
1431 * msvc_dbg.c: Disable on win64.
1432 * win32_threads.c: Add AMD64 support.
1433 * include/gc.h: no backtrace on AMD64 for now.
1435 2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
1437 * msvc_dbg.c(GetModuleBase): Replace strcat with strcat_s.
1439 2007-06-06 Hans Boehm <Hans.Boehm@hp.com>
1441 * include/gc.h: (GC_word, GC_signed_word): Fix win64 definitions.
1442 Don't include windows.h in an extern "C" context.
1443 * include/private/gcconfig.h: Fix win64/X86_64 configuration.
1444 * tests/test.c: Eliminate more old style function definitions.
1445 Cleanup pointer and integer casts for win64.
1446 * tests/test_cpp.cc: Don't include gc_priv.h.
1447 * NT_STATIC_THREADS_MAKEFILE: Restrict suffixes for VC++ 2005.
1448 * NT_X64_STATIC_THREADS_MAKEFILE: New.
1450 2007-06-06 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca)
1452 * win32_threads.c: Separate out DEBUG_WIN32_PTHREADS_STACK. Ignore
1453 FINISHED threads for suspension. (GC_pthread_join): Add
1454 pthread_self() cast. (GC_pthread_start_inner): Execute cleanup
1455 handler when popping it.
1456 * include/private/gc_locks.h: Inline THREAD_EQUAL for
1457 GC_WIN32_PTHREADS. Define USE_PTHREAD_LOCKS only if we have
1460 2007-05-23 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Romano Paolo Tenca)
1462 * gc_dlopen.c, thread_local_alloc.c, threadlibs.c, win32_threads.c,
1463 tests/test.c: Accomodate GC_WIN32_PTHREADS.
1464 * include/gc.h: Don't include windows.h for GC_WIN32_PTHREADS.
1465 * include/gc_config_macros.h: Define both PTHREADS and
1467 * include/private/gc_locks.h: Nonstandard definitions of
1468 NUMERIC_THREAD_ID for GC_WIN32_PTHREADS.
1469 * doc/README.win32, Makefile.direct: Include documentation
1470 for GC_WIN32_PTHREADS.
1471 * Makefile.direct: Remove some anachronisms in the documentation.
1473 2007-05-23 Hans Boehm <Hans.Boehm@hp.com>
1475 * Makefile.am: Move includes to bottom. Add better library
1476 dependencies. Increment library version. Remove "SUBDIRS += .".
1477 * cord/cord.am, tests/tests.am: Add better library dependencies.
1478 Remove now unnecessary dependencies.
1479 * Makefile.in: Regenerate.
1480 * include/gc.h (GC_begin_thread_ex, GC_endthreadex, GC_ExitThread):
1481 Move to define on all Windows platforms. (_beginthread): define
1482 to generate error if used.
1484 2007-05-22 Hans Boehm <Hans.Boehm@hp.com>
1486 * include/private/gc_locks.h: Format to 80 columns.
1488 2007-05-22 Hans Boehm <Hans.Boehm@hp.com>
1490 * malloc.c(GC_free): Ignore bad frees on MSWIN32 with REDIRECT_MALLOC.
1491 * NT_MAKEFILE: msvc_dbg.h is in include/private. Don't use cvars
1493 * misc.c (WIN32 GC_write): Define GC_need_to_lock in single-threaded
1495 * win32_threads.c: Test for __MINGW32__ in addition to _MINGW_VER.
1496 (GC_CreateThread, GC_beginthreadex): Deallocate args even if we fail.
1497 * include/gc.h: Add GC_reachable_here(). (GC_WinMain): Add GC_API.
1498 (GC_beginthreadex, GC_endthreadex, GC_ExitThread): Declare.
1499 * tests/test.c: Add GC_reachable_here() call.
1501 2007-05-21 Hans Boehm <Hans.Boehm@hp.com>
1503 * alloc.c (GC_try_to_collect): Call GC_init if necessary.
1504 * tests/thread_leak_test.c: Don't unconditionally define
1507 2007-05-21 Andreas Tobler <a.tobler@schweiz.org>
1509 * Makefile.am: Remove extra_ldflags_libgc definition.
1510 * Makefile.in: Regenerate.
1512 2007-05-17 Hans Boehm <Hans.Boehm@hp.com>
1514 * include/private/gc_priv.h: Define AO_REQUIRE_CAS.
1516 2007-05-16 Hans Boehm <Hans.Boehm@hp.com>
1518 * finalize.c (GC_unreachable_finalize_mark_proc): Don't return void
1521 2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
1523 * configure.ac, version.h, doc/README: Change version to 7.0alpha10.
1524 * configure: Regenerate.
1528 2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
1530 * configure.ac, version.h, doc/README: Change version to 7.0alpha9.
1531 * configure: Regenerate.
1533 2007-05-15 Hans Boehm <Hans.Boehm@hp.com>
1535 * Makefile.am: Include NT_STSTIC_THREADS_MAKEFILE in dist.
1536 * Makefile.in: Regenerate.
1537 * include/private/gc_locks.h: GC_compare_and_exchange, GC_atomic_add:
1538 remove. NUMERIC_THREAD_ID, THREAD_EQUAL: New. GC_lock_holder: now
1539 unsigned long. I_DONT_HOLD_LOCK, I_HOLD_LOCK: Update.
1540 * pthread_stop_world.c, pthread_support.c, win32_threads.c: Use
1541 NUMERIC_THREAD_ID, THREAD_EQUAL.
1542 * include/private/gcconfig.h: GENERIC_COMPARE_AND_SWAP: Remove.
1543 * include/private/thread_local_alloc.h: Don't USE_COMPILER_TLS on
1546 2007-05-11 Hans Boehm <Hans.Boehm@hp.com>
1548 * dbg_mlc.c, include/gc.h, finalize.c: Merge Alexandre Oliva's
1549 GC_debug_register_finalizer_unreachable() patch from gcc tree.
1550 * thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Add assertions
1551 to check GC has been initialized.
1553 2007-05-10 Hans Boehm <Hans.Boehm@hp.com>
1555 * include/gc_cpp.h: Documentation updates.
1556 * include/gc_config_macros.h: Don't check for __ppc__ to set
1558 * Makefile.am: Include configure_atomic_ops.sh in dist.
1559 * Makefile.in: Regenerate.
1561 2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
1563 * Makefile.am: Dont distribute copied atomic_ops files. Include
1564 libatomic_ops with "make dist".
1565 * Makefile.in: Regenerate.
1566 * configure: Regenerate.
1567 * configure.ac: Enable THREAD_LOCAL_ALLOC for Cygwin with threads.
1568 * win32_threads.c: Report error for Cygwin + GC_DLL.
1570 2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
1572 * Makefile.direct: Update THREAD_LOCAL_ALLOC documentation.
1573 * cord/de_win.c: Rename and move AboutBox. Call GC_INIT. Remove
1574 MakeProcInstance anachronism.
1575 * doc/README.macros: Officially remove elif prohibition.
1576 Remove documentation for defunct SRC_M3 support.
1577 * include/gc.h: Remove more SRC_M3 references.
1578 * include/private/gcconfig.h: Remove still more SRC_M3 references.
1579 GC_SOLARIS_THREADS no longer needs to be checked separately.
1581 2007-05-08 Hans Boehm <Hans.Boehm@hp.com>
1583 * thread_local_alloc.c, include/private/thread_local_alloc.h:
1584 Spell __declspec correctly.
1585 * NT_STATIC_THREADS_MAKEFILE: Enable thread-local allocation.
1587 2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
1589 * doc/README.win32: Adjust GC_win32_dll_threads rules again.
1591 2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
1593 * mark.c (GC_mark_some wrapper): Restructure for readability, handle
1594 GC_started_thread_while_stopped.
1595 * misc.c (Win32 GC_write): Lock GC_write_cs only if needed.
1596 * win32_threads.c: (client_has_run): remove,
1597 GC_started_thread_while_stopped, GC_attached_thread: add.
1598 (GC_push_all_stacks): Add verbose output.
1599 (DllMain): Avoid initializing collector or the like.
1600 Never update both thread tables.
1601 * doc/README.win32: Adjust GC_win32_dll_threads rules.
1603 2007-05-07 Hans Boehm <Hans.Boehm@hp.com>
1605 * pthread_stop_world.c (GC_push_all_stacks): Print thread count with
1606 GC_PRINT_VERBOSE_STATS.
1608 2007-05-01 Hans Boehm <Hans.Boehm@hp.com>
1609 (and Manuel Serrano, Craig McDaniel)
1611 * configure.ac: Comment out redundant
1612 AC_DEFINE(NO_EXECUTE_PERMISSION).
1613 * configure: Regenerate.
1614 * sparc_mach_dep.S: Remove single quote in comment.
1615 * include/private/gcconfig.h: Fix DATAEND for NONSTOP.
1616 * win32_threads.c: Include stdint.h for Mingw. Add GC_API for DllMain.
1617 (GC_use_DllMain): Fix assertion.
1619 2007-02-14 Andreas Tobler <a.tobler@schweiz.org>
1621 * configure.ac: Introduce extra_ldflags_libgc. Use it for Darwin.
1622 * configure: Regenerate.
1623 * Makefile.am (libgc_la_LDFLAGS): Use extra_ldflags_libgc.
1624 * Makefile.in: Regenerate.
1625 * include/private/gcconfig.h: Enable MPROTECT_VDB for all Darwin
1626 targets. Remove comments.
1627 Prepare ppc64 support for Darwin.
1629 2007-01-29 Andreas Tobler <a.tobler@schweiz.org>
1631 * darwin_stop_world.c: Clean up and reformat code.
1633 2007-01-28 Andreas Tobler <a.tobler@schweiz.org>
1635 * darwin_stop_world.c (GC_push_all_stacks): Fix compiler warnings.
1637 (GC_stop_world): Likewise. Remove unused GC_thread p.
1638 (GC_start_world): Likewise.
1640 * os_dep.c: Define GC_darwin_register_mach_handler_thread extern.
1641 Remove double SIG_HNDLR_PTR definition.
1642 (GC_forward_exception): Fix compiler warnings, make i unsigned.
1643 Initialize thread_state to NULL.
1644 (catch_exception_raise): Fix compiler warnings, make i unsigned.
1646 2007-01-25 Petr Salinger and Hans Boehm <Hans.Boehm@hp.com>
1648 * include/private/gc_priv.h (NEED_FIND_LIMIT, FREEBSD variant):
1649 also define for X86_64.
1650 * configure.ac: Move generic gnu (Hurd) case to below kfreebsd case.
1651 * configure: Regenerate.
1652 * README.changes: Point to ChangeLog.
1654 2007-01-25 Andreas Tobler <a.tobler@schweiz.org>
1656 * darwin_stop_world.c: Move THREAD_FLD defines to ...
1657 * include/private/gc_priv.h: ... here.
1658 Fix THREAD_STATE definitions for ppc64.
1659 * os_dep.c (catch_exception_raise): Use THREAD_FLD for exc_state member
1662 2007-01-18 Andreas Tobler <a.tobler@schweiz.org>
1664 * os_dep.c (if defined(MPROTECT_VDB) && defined(DARWIN)): Clean up and
1666 Correct email reference.
1668 2007-01-11 Andreas Tobler <a.tobler@schweiz.org>
1670 * configure.ac (i?86*-*-darwin*): Replaced HAS_I386_THREAD_STATE_* with
1671 HAS_X86_THREAD_STATE32_*.
1672 (x86_64-*-darwin*): Extended the above check for x86_64-*-darwin* with
1673 HAS_X86_THREAD_STATE64_*.
1674 Added value 1 in the above AC_DEFINE's. Important for the upcoming
1676 * configure: Regenerated.
1677 * include/private/gcconfig.h: Modified X86_64 define for Darwin.
1678 Removed __x86_64__ check in POWERPC section. Added base definitions
1679 for the X86_64 Darwin port.
1680 * include/private/gc_priv.h: Added GC_MACH_HEADER and GC_MACH_SECTION
1681 to distinguish between 32 and 64-bit applications. Added definitions
1683 * darwin_stop_world.c: Added HAS_X86_THREAD_STATE64___RAX. And
1684 replaced HAS_I386_THREAD_STATE___EAX with HAS_X86_THREAD_STATE32___EAX.
1685 (GC_push_all_stacks): Added code for X86_64 Darwin. Even for the
1686 !DARWIN_DONT_PARSE_STACK. Maybe obsolete.
1687 * dyn_load.c (GC_dyld_name_for_hdr): Use GC_MACH_HEADER.
1688 (GC_dyld_image_add): Use GC_MACH_HEADER and GC_MACH_SECTION.
1689 Distinguish between getsectbynamefromheader_64 and
1690 getsectbynamefromheader.
1691 * os_dep.c (catch_exception_raise): Introduce exception definition for
1692 X86_64 Darwin. Replaced old i386_EXCEPTION_STATE_* definition with
1693 x86_EXCEPTION_STATE32_*. Add X86_64 for exc_state.faultvaddr.
1695 2007-01-09 Andreas Tobler <a.tobler@schweiz.org>
1697 * libtool.m4: Update to version from libtool-1.5.22.
1698 * ltmain.sh: Likewise.
1699 * ChangeLog: Created.
1701 See doc/README.changes for earlier changes.