platform/upstream/libgc.git
10 years agoMerge branch 'ancient-releases'
Ivan Maidanski [Sat, 17 May 2014 15:01:45 +0000 (19:01 +0400)]
Merge branch 'ancient-releases'

10 years agogc6.3alpha6 tarball import gc6_3alpha6
Hans Boehm [Thu, 6 May 2004 00:00:00 +0000 (00:00 +0000)]
gc6.3alpha6 tarball import

10 years agoMerge tag 'gc6_3alpha5' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 14:52:39 +0000 (18:52 +0400)]
Merge tag 'gc6_3alpha5' into ancient-releases

10 years agogc6.2alpha6 tarball import gc6_2alpha6
Hans Boehm [Thu, 5 Jun 2003 00:00:00 +0000 (00:00 +0000)]
gc6.2alpha6 tarball import

10 years agogc6.2alpha5 tarball import gc6_2alpha5
Hans Boehm [Wed, 14 May 2003 00:00:00 +0000 (00:00 +0000)]
gc6.2alpha5 tarball import

10 years agogc6.2alpha4 tarball import gc6_2alpha4
Hans Boehm [Mon, 10 Mar 2003 00:00:00 +0000 (00:00 +0000)]
gc6.2alpha4 tarball import

10 years agogc6.2alpha3 tarball import gc6_2alpha3
Hans Boehm [Thu, 30 Jan 2003 00:00:00 +0000 (00:00 +0000)]
gc6.2alpha3 tarball import

10 years agoMerge tag 'gc6_1' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 14:37:27 +0000 (18:37 +0400)]
Merge tag 'gc6_1' into ancient-releases

10 years agogc6.1alpha2 tarball import gc6_1alpha2
Hans Boehm [Thu, 20 Dec 2001 00:00:00 +0000 (00:00 +0000)]
gc6.1alpha2 tarball import

10 years agogc6.1alpha1 tarball import gc6_1alpha1
Hans Boehm [Sat, 22 Sep 2001 00:00:00 +0000 (00:00 +0000)]
gc6.1alpha1 tarball import

10 years agoMerge tag 'gc6_0' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 14:30:04 +0000 (18:30 +0400)]
Merge tag 'gc6_0' into ancient-releases

10 years agogc6.0alpha8 tarball import gc6_0alpha8
Hans Boehm [Fri, 15 Jun 2001 00:00:00 +0000 (00:00 +0000)]
gc6.0alpha8 tarball import

10 years agogc6.0alpha3 tarball import gc6_0alpha3
Hans Boehm [Tue, 26 Sep 2000 00:00:00 +0000 (00:00 +0000)]
gc6.0alpha3 tarball import

10 years agoMerge tag 'gc5_3' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 14:10:33 +0000 (18:10 +0400)]
Merge tag 'gc5_3' into ancient-releases

10 years agogc5.0alpha4 tarball import gc5_0alpha4
Hans Boehm [Sat, 30 Oct 1999 00:00:00 +0000 (00:00 +0000)]
gc5.0alpha4 tarball import

10 years agoMerge tag 'gc5_0alpha3' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:59:17 +0000 (17:59 +0400)]
Merge tag 'gc5_0alpha3' into ancient-releases

10 years agogc5.0alpha2 tarball import gc5_0alpha2
Hans Boehm [Fri, 23 Jul 1999 00:00:00 +0000 (00:00 +0000)]
gc5.0alpha2 tarball import

10 years agogc5.0alpha1 tarball import gc5_0alpha1
Hans Boehm [Wed, 30 Jun 1999 00:00:00 +0000 (00:00 +0000)]
gc5.0alpha1 tarball import

10 years agoMerge tag 'gc4_14' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:51:17 +0000 (17:51 +0400)]
Merge tag 'gc4_14' into ancient-releases

10 years agogc4.14alpha2 tarball import gc4_14alpha2
Hans Boehm [Fri, 26 Mar 1999 00:00:00 +0000 (00:00 +0000)]
gc4.14alpha2 tarball import

10 years agoMerge tag 'gc4_14alpha1' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:45:17 +0000 (17:45 +0400)]
Merge tag 'gc4_14alpha1' into ancient-releases

10 years agogc4.13alpha3 tarball import gc4_13alpha3
Hans Boehm [Tue, 8 Dec 1998 00:00:00 +0000 (00:00 +0000)]
gc4.13alpha3 tarball import

10 years agogc4.13alpha2 tarball import gc4_13alpha2
Hans Boehm [Sat, 8 Aug 1998 00:00:00 +0000 (00:00 +0000)]
gc4.13alpha2 tarball import

10 years agogc4.13alpha1 tarball import gc4_13alpha1
Hans Boehm [Tue, 17 Feb 1998 00:00:00 +0000 (00:00 +0000)]
gc4.13alpha1 tarball import

10 years agoMerge tag 'gc4_12' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:33:41 +0000 (17:33 +0400)]
Merge tag 'gc4_12' into ancient-releases

10 years agogc4.9 tarball import gc4_9
Hans Boehm [Mon, 12 Feb 1996 00:00:00 +0000 (00:00 +0000)]
gc4.9 tarball import

10 years agoMerge tag 'gc4_8' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:27:33 +0000 (17:27 +0400)]
Merge tag 'gc4_8' into ancient-releases

10 years agogc4.7 tarball import gc4_7
Hans Boehm [Sat, 18 Nov 1995 00:00:00 +0000 (00:00 +0000)]
gc4.7 tarball import

10 years agogc4.6 tarball import gc4_6
Hans Boehm [Thu, 9 Nov 1995 00:00:00 +0000 (00:00 +0000)]
gc4.6 tarball import

10 years agogc4.5 tarball import gc4_5
Hans Boehm [Wed, 14 Jun 1995 00:00:00 +0000 (00:00 +0000)]
gc4.5 tarball import

10 years agogc4.4 tarball import gc4_4
Hans Boehm [Sat, 18 Feb 1995 00:00:00 +0000 (00:00 +0000)]
gc4.4 tarball import

10 years agogc4.3 tarball import gc4_3
Hans Boehm [Fri, 23 Dec 1994 00:00:00 +0000 (00:00 +0000)]
gc4.3 tarball import

10 years agogc4.2 tarball import gc4_2
Hans Boehm [Wed, 3 Aug 1994 00:00:00 +0000 (00:00 +0000)]
gc4.2 tarball import

10 years agoMerge tag 'gc4_1' into ancient-releases
Ivan Maidanski [Sat, 17 May 2014 13:04:42 +0000 (17:04 +0400)]
Merge tag 'gc4_1' into ancient-releases

10 years agogc4.0 tarball import gc4_0
Hans Boehm [Thu, 7 Apr 1994 00:00:00 +0000 (00:00 +0000)]
gc4.0 tarball import

10 years agogc3.7 tarball import gc3_7
Hans Boehm [Tue, 15 Mar 1994 00:00:00 +0000 (00:00 +0000)]
gc3.7 tarball import

10 years agogc3.6 tarball import gc3_6
Hans Boehm [Fri, 14 Jan 1994 00:00:00 +0000 (00:00 +0000)]
gc3.6 tarball import

10 years agogc3.3 tarball import gc3_3
Hans Boehm [Sat, 2 Oct 1993 00:00:00 +0000 (00:00 +0000)]
gc3.3 tarball import

10 years agogc2.6 tarball import gc2_6
Hans Boehm [Tue, 27 Apr 1993 00:00:00 +0000 (00:00 +0000)]
gc2.6 tarball import

10 years agogc-2.4 tarball import gc2_4
Hans Boehm [Tue, 26 Jan 1993 00:00:00 +0000 (00:00 +0000)]
gc-2.4 tarball import

10 years agogc1.9 tarball import gc1_9
Hans Boehm [Wed, 29 Jan 1992 00:00:00 +0000 (00:00 +0000)]
gc1.9 tarball import

10 years agoFix typos in ChangeLog (in items for ancient GC releases)
Ivan Maidanski [Fri, 16 May 2014 19:31:38 +0000 (23:31 +0400)]
Fix typos in ChangeLog (in items for ancient GC releases)

* ChangeLog: Fix typos ("nonexistent", "to", "posting", "bit rot",
"likely", "flaky").
* ChangeLog: Fix typos in surname (Juan Jose Garcia-Ripoll,
Paolo Molaro, Andreas Tobler).
* ChangeLog: Fix incorrect article ("a finalizable").

10 years agoUpdate AUTHORS file (add more persons mentioned in ChangeLog)
Ivan Maidanski [Thu, 15 May 2014 22:25:18 +0000 (02:25 +0400)]
Update AUTHORS file (add more persons mentioned in ChangeLog)

10 years agoRestore contribution information for ancient releases in ChangeLog
Ivan Maidanski [Thu, 15 May 2014 22:21:00 +0000 (02:21 +0400)]
Restore contribution information for ancient releases in ChangeLog
(revert part of commit ba8ef9e)

10 years agoUpdate AUTHORS file (specify email for some more contributors)
Ivan Maidanski [Thu, 15 May 2014 18:35:25 +0000 (22:35 +0400)]
Update AUTHORS file (specify email for some more contributors)

10 years agoFix typo in person name in gc_cpp.h comment
Ivan Maidanski [Thu, 15 May 2014 17:41:21 +0000 (21:41 +0400)]
Fix typo in person name in gc_cpp.h comment

* include/gc_cpp.h: Fix typo in surname (John Ellis) in comment.

10 years agoUpdate Xerox FTP host name in overview.html
Ivan Maidanski [Thu, 15 May 2014 17:30:10 +0000 (21:30 +0400)]
Update Xerox FTP host name in overview.html

* doc/overview.html: Update FTP host name (ftp.parc.xerox.com).

10 years agoChangeLog: Add information about ancient release dates
Ivan Maidanski [Mon, 12 May 2014 04:48:59 +0000 (08:48 +0400)]
ChangeLog: Add information about ancient release dates

10 years agoRemove duplicate entry and non-contributor persons from AUTHORS file
Ivan Maidanski [Fri, 9 May 2014 11:28:38 +0000 (15:28 +0400)]
Remove duplicate entry and non-contributor persons from AUTHORS file
(remove entries occasionally leaked from GCC and Mono downstreams;
revert part of commits e1dc74a7b23e1c8a8747eb89)

10 years agoUpdate AUTHORS file (specify email for most contributors)
Ivan Maidanski [Sat, 3 May 2014 20:30:13 +0000 (00:30 +0400)]
Update AUTHORS file (specify email for most contributors)

10 years agoFix typos in names in AUTHORS and ChangeLog files
Ivan Maidanski [Sat, 3 May 2014 18:50:50 +0000 (22:50 +0400)]
Fix typos in names in AUTHORS and ChangeLog files

* AUTHORS: Fix typo in surname (Bryce McKinlay, Slava Sysoltsev).
* ChangeLog: Likewise.
* AUTHORS: Fix typo in name or surname (Philip Brown, Rutger Ovidius).
* AUTHORS: Place surname after 1st name (Tommaso Tagliapietra).
* AUTHORS: Remove computer system name (Harris NightHawk).

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sat, 3 May 2014 05:47:50 +0000 (09:47 +0400)]
Update AUTHORS file

10 years agoRemove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64
Ivan Maidanski [Fri, 2 May 2014 19:51:21 +0000 (23:51 +0400)]
Remove obsolete BACKING_STORE_ALIGNMENT/DISPLACEMENT macros for Linux/IA64

* include/private/gcconfig.h (BACKING_STORE_ALIGNMENT,
BACKING_STORE_DISPLACEMENT): Remove unused macro for linux/ia64;
update adjacent comment.

10 years agoFix machdep .lo files path in configure (SPARC, IA-64)
Ivan Maidanski [Sun, 27 Apr 2014 06:36:21 +0000 (10:36 +0400)]
Fix machdep .lo files path in configure (SPARC, IA-64)

* configure.ac (machdep): Remove "src/" path prefix for .lo files
(sparc_netbsd_mach_dep, sparc_mach_dep, ia64_save_regs_in_stack).

10 years agoFix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc
Baruch Siach [Sat, 26 Apr 2014 17:50:07 +0000 (21:50 +0400)]
Fix build (broken by fenv.h inclusion) on Linux/x86_64 under uClibc

* include/private/gcconfig.h (GETCONTEXT_FPU_EXCMASK_BUG): Do not
define for uClibc, as it may not have fenv.h.

10 years agoFix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)
Ivan Maidanski [Tue, 22 Apr 2014 22:04:11 +0000 (02:04 +0400)]
Fix TEXT() usage for concatenated strings in GC_CreateLogFile (Win32)

* misc.c (GC_CreateLogFile): Use TEXT() for each of concatenated
literals (fix "concatenating mismatched strings" error if UNICODE
defined).

10 years agoFix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC
Ivan Maidanski [Tue, 22 Apr 2014 21:28:32 +0000 (01:28 +0400)]
Fix MS VC redefinition warning for functions declared with GC_ATTR_MALLOC

* dbg_mlc.c (GC_debug_malloc, GC_debug_malloc_ignore_off_page,
GC_debug_malloc_atomic_ignore_off_page, GC_debug_malloc_stubborn,
GC_debug_malloc_atomic, GC_debug_strdup, GC_debug_strndup,
GC_debug_wcsdup, GC_debug_malloc_uncollectable,
GC_debug_malloc_atomic_uncollectable,
GC_debug_generic_or_special_malloc, GC_debug_malloc_replacement): Add
GC_ATTR_MALLOC attribute to API function definition (to avoid MS VC
warning about redefinition of a symbol previously declared with
__declspec).
* fnlz_mlc.c (GC_finalized_malloc): Likewise.
* gcj_mlc.c (GC_gcj_malloc, GC_debug_gcj_malloc,
GC_gcj_malloc_ignore_off_page): Likewise.
* malloc.c (GC_generic_malloc, GC_malloc_atomic, GC_malloc,
GC_malloc_uncollectable): Likewise.
* mallocx.c (GC_generic_or_special_malloc,
GC_generic_malloc_ignore_off_page, GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page, GC_malloc_many, GC_memalign,
GC_malloc_atomic_uncollectable, GC_strdup, GC_strndup, GC_wcsdup):
Likewise.
* stubborn.c (GC_malloc_stubborn): Likewise.
* thread_local_alloc.c (GC_malloc, GC_malloc_atomic, GC_gcj_malloc):
Likewise.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Likewise.

10 years agoFix a typo in gc_config_macros.h comment (redundant "an" article)
Ivan Maidanski [Mon, 31 Mar 2014 22:07:05 +0000 (02:07 +0400)]
Fix a typo in gc_config_macros.h comment (redundant "an" article)

* include/gc_config_macros.h (GC_ADD_CALLER): Fix a typo in comment
(redundant "an" article).

10 years agoGC_scratch_alloc code refactoring (and WARN message improvement)
Ivan Maidanski [Mon, 31 Mar 2014 21:25:18 +0000 (01:25 +0400)]
GC_scratch_alloc code refactoring (and WARN message improvement)

* headers.c (GC_scratch_alloc): Remove "register" keyword for "result"
local variable; replace tail recursion with a loop; adjust and add
comments.
* headers.c (GC_scratch_alloc): Adjust message and output requested
allocation size in WARN().
* include/private/gc_priv.h (_GC_arrays._scratch_last_end_ptr):
Improve comment.

10 years agoFix GC_scratch_last_end_ptr update on GC_scratch_alloc failure
Ivan Maidanski [Sun, 30 Mar 2014 17:05:35 +0000 (21:05 +0400)]
Fix GC_scratch_last_end_ptr update on GC_scratch_alloc failure

* headers.c (GC_scratch_alloc): Do not update GC_scratch_last_end_ptr
if allocation failed ("result" variable is NULL).

10 years agoFix out-of-memory case in new_back_edges, push_in_progress (backgraph)
Ivan Maidanski [Sun, 30 Mar 2014 08:53:48 +0000 (12:53 +0400)]
Fix out-of-memory case in new_back_edges, push_in_progress (backgraph)

* backgraph.c (new_back_edges): Abort if not enough memory.
* backgraph.c (push_in_progress): Prevent null pointer dereference in
BCOPY() if allocation failed (due to not enough memory).

10 years agoFix GET_MEM argument rounding in GC_scratch_alloc and similar
Ivan Maidanski [Sun, 30 Mar 2014 08:31:49 +0000 (12:31 +0400)]
Fix GET_MEM argument rounding in GC_scratch_alloc and similar
(Prevent abort in GC_unix_mmap_get_mem if the allocation size is not
a multiple of a page size.)

* backgraph.c (new_back_edges, push_in_progress): Use
ROUNDUP_PAGESIZE_IF_MMAP() to adjust GET_MEM() argument (when needed).
* headers.c (GC_scratch_alloc): Likewise.
* misc.c (GC_envfile_init): Likewise.
* include/private/gc_priv.h (ROUNDUP_PAGESIZE_IF_MMAP): New macro.
* include/private/gcconfig.h (MMAP_SUPPORTED): Move definition from
os_dep.c (as needed for ROUNDUP_PAGESIZE_IF_MMAP() definition).
* include/private/gcconfig.h (GET_MEM): Refine comment (regarding its
argument).

10 years agoDefine ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)
Ivan Maidanski [Sun, 30 Mar 2014 07:24:12 +0000 (11:24 +0400)]
Define ROUNDUP_PAGESIZE, ROUNDUP_GRANULE_SIZE macros (code refactoring)

* alloc.c (GC_expand_hp_inner): Use ROUNDUP_PAGESIZE().
* checksums.c (GC_record_fault, GC_was_faulted): Likewise.
* os_dep.c (GC_unix_mmap_get_mem, GC_wince_get_mem, GC_unmap_start,
GC_remove_protection): Likewise.
* headers.c (GC_scratch_alloc): Use ROUNDUP_GRANULE_SIZE().
* malloc.c (GC_alloc_large): Likewise.
* mallocx.c (GC_malloc_many): Likewise.
* headers.c (GC_scratch_alloc): Use ROUNDUP_PAGESIZE() (only if
USE_MMAP).
* include/private/gc_priv.h (ROUNDUP_GRANULE_SIZE, ROUNDUP_PAGESIZE):
Define macro to round up a value to a multiple of a granule or a page,
respectively.

10 years agoDefine public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size
Ivan Maidanski [Mon, 10 Mar 2014 16:04:58 +0000 (20:04 +0400)]
Define public GC_GENERIC_OR_SPECIAL_MALLOC and GC_get_kind_and_size

* dbg_mlc.c (GC_debug_generic_malloc,
GC_debug_generic_or_special_malloc): New function.
* mallocx.c (GC_get_kind_and_size): Likewise.
* tests/test.c (test_generic_malloc_or_special): Likewise.
* include/gc_mark.h (GC_generic_or_special_malloc,
GC_debug_generic_or_special_malloc, GC_get_kind_and_size): New API
prototype.
* include/gc_mark.h (GC_GENERIC_OR_SPECIAL_MALLOC): New public macro.
* mallocx.c (GC_generic_or_special_malloc): Turn into API function.
* tests/test.c (reverse_test_inner, run_one_test): Invoke
test_generic_malloc_or_special (to test GC_GENERIC_OR_SPECIAL_MALLOC
and GC_get_kind_and_size).

10 years agoAdd alloc_size attribute to GC_generic_malloc
Ivan Maidanski [Mon, 10 Mar 2014 07:20:22 +0000 (11:20 +0400)]
Add alloc_size attribute to GC_generic_malloc

* include/gc_mark.h (GC_generic_malloc,
GC_generic_malloc_ignore_off_page): Add GC_ATTR_ALLOC_SIZE attribute.

10 years agoUpdate emails/links due to project site and ML transition
Ivan Maidanski [Sun, 23 Feb 2014 12:56:54 +0000 (16:56 +0400)]
Update emails/links due to project site and ML transition
(www.hpl.hp.com/personal/Hans_Boehm -> www.hboehm.info;
gc@linux.hpl.hp.com -> bdwgc@lists.opendylan.org)

* AUTHORS: Update email.
* doc/gc.man: Likewise.
* README.QUICK: Change external link to gcinterface.html to local one
(pointing to the file in "doc" folder).
* README.md: Replace BDWGC site URL (www.hpl.hp.com/personal/Hans_Boehm
to www.hboehm.info).
* doc/gc.man: Likewise.
* doc/gcdescr.html: Likewise.
* doc/gcinterface.html: Likewise.
* doc/overview.html: Likewise.
* doc/scale.html: Likewise.
* README.md: Update mailing list info (gc@linux.hpl.hp.com to
bdwgc@lists.opendylan.org, gc-announce@linux.hpl.hp.com to
bdwgc-announce@lists.opendylan.org).
* configure.ac: Likewise.
* doc/gcdescr.html: Likewise.
* doc/overview.html: Likewise.
* doc/tree.html: Remove unnecessary external link.

10 years agoFix or remove broken URLs in documentation
Ivan Maidanski [Sun, 23 Feb 2014 08:53:55 +0000 (12:53 +0400)]
Fix or remove broken URLs in documentation

* doc/README.cords: Remove broken link to reality.sgi.com.
* doc/README.environment: Fix link to HPL tech reports.
* doc/overview.html: Remove broken link to parcftp.xerox.com.
* doc/overview.html: Fix (or update) external links.

10 years agoFix typo in GC overview file
Ivan Maidanski [Sat, 22 Feb 2014 17:26:13 +0000 (21:26 +0400)]
Fix typo in GC overview file

* doc/overview.html: Fix a typo ("See").

10 years agoRemove redundant casts in GC_generic_or_special_malloc and similar
Ivan Maidanski [Mon, 17 Feb 2014 20:50:14 +0000 (00:50 +0400)]
Remove redundant casts in GC_generic_or_special_malloc and similar
(refactoring)

* mallocx.c (GC_generic_or_special_malloc,
GC_generic_malloc_ignore_off_page): Remove redundant casts for
"lb" argument; remove redundant parentheses.
* fnlz_mlc.c (GC_finalized_malloc): Likewise.
* malloc.c (GC_generic_malloc, GC_malloc_uncollectable): Likewise.
* malloc.c (GC_malloc_uncollectable): Remove redundant cast of
returned value.
* mallocx.c (GC_malloc_ignore_off_page,
GC_malloc_atomic_ignore_off_page): Likewise.

10 years agocord: Change no-argument functions declaration style to ANSI C
Ivan Maidanski [Sun, 16 Feb 2014 16:46:58 +0000 (20:46 +0400)]
cord: Change no-argument functions declaration style to ANSI C

* cord/cordbscs.c (CORD_init_min_len): Use ANSI C style of no-argument
function prototype.
* cord/tests/de.c (prune_map, normalize_display, fix_pos): Likewise.

10 years agoFix GC_sig_suspend initialization when non-constant SIGRTMIN used
Ivan Maidanski [Fri, 31 Jan 2014 20:32:08 +0000 (00:32 +0400)]
Fix GC_sig_suspend initialization when non-constant SIGRTMIN used

* pthread_stop_world.c (SIGNAL_UNSET): New macro.
* pthread_stop_world.c (GC_sig_suspend, GC_sig_thr_restart): Initialize
to SIGNAL_UNSET (instead of SIG_SUSPEND/THR_RESTART).
* pthread_stop_world.c (GC_get_suspend_signal): Return SIG_SUSPEND if
GC_sig_suspend is SIGNAL_UNSET.
* pthread_stop_world.c (GC_get_thr_restart_signal): Return
SIG_THR_RESTART if GC_sig_thr_restart is SIGNAL_UNSET.
* pthread_stop_world.c (GC_unblock_gc_signals): Add assertion for
initialization of GC_sig_suspend and GC_sig_thr_restart.
* pthread_stop_world.c (GC_stop_init): Replace SIGNAL_UNSET value for
GC_sig_suspend, GC_sig_thr_restart to SIG_SUSPEND and SIG_THR_RESTART,
respectively.

10 years agoFix 'e.g.' typos in comments and documentation
Ivan Maidanski [Fri, 31 Jan 2014 17:04:28 +0000 (21:04 +0400)]
Fix 'e.g.' typos in comments and documentation

* doc/README.cmake: Fix typo (e.g.).
* doc/README.solaris2: Likewise.
* doc/README.solaris2: Likewise.
* doc/README.win32: Likewise.
* include/gc.h (GC_register_my_thread): Fix typo in a comment (e.g.).
* include/leak_detector.h: Likewise.
* misc.c (GC_VSNPRINTF): Likewise.
* pthread_stop_world.c (GC_unblock_gc_signals): Likewise.

10 years agoImprove documentation for disappearing links in gc.h
Ivan Maidanski [Fri, 31 Jan 2014 16:01:06 +0000 (20:01 +0400)]
Improve documentation for disappearing links in gc.h

* include/gc.h (GC_free): Add comment about disappearing links.
* include/gc.h (GC_general_register_disappearing_link): Add comment
about the conditions for a link to disappear.

10 years agoAdd config option to use STGRTMIN-based signals for thread suspend/resume
David Grove [Wed, 8 Jan 2014 23:18:16 +0000 (18:18 -0500)]
Add config option to use STGRTMIN-based signals for thread suspend/resume

Change motivated by using BDWGC in the X10 runtime on systems where
IBM Parallel Environment is used to launch the X10 processes. PE
is already using the signals BDWCG is using for its own purposes, so
we need to force the GC to use different ones to avoid a conflict.

* configure.ac (sigrt-signals): Handle new option.
* configure.ac (GC_USESIGRT_SIGNALS): New AC define.
* include/private/gc_priv.h (SIG_SUSPEND): Force to be defined to
_SIGRTMIN+6 if GC_USESIGRT_SIGNALS (Darwin is excluded anyway).
* pthread_stop_world.c (SIG_THR_RESTART): Force to be defined to
_SIGRTMIN+5 if GC_USESIGRT_SIGNALS; reformat code.

10 years agoFix find stackbottom on BlueGene P/Q systems
David Grove [Wed, 8 Jan 2014 22:54:28 +0000 (17:54 -0500)]
Fix find stackbottom on BlueGene P/Q systems
(Use HEURISTIC2 instead of LINUX_STACKBOTTOM)

* include/private/gcconfig.h (NO_PTHREAD_GETATTR_NP, HEURISTIC2): Define
for BlueGene systems (instead of LINUX_STACKBOTTOM).

10 years agoCheck for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
David Grove [Wed, 8 Jan 2014 23:07:41 +0000 (18:07 -0500)]
Check for Fujitsu compiler in builtin_unwind logic (enable FX10/K-Computer)
(Patch originally contributed to X10 project by Kamada-san.)

* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Do not define
if __FUJITSU.

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sat, 11 Jan 2014 13:57:06 +0000 (17:57 +0400)]
Update AUTHORS file

10 years agoAllow parallel mark to be enabled on powerpc-linux systems
David Grove [Wed, 8 Jan 2014 23:01:28 +0000 (18:01 -0500)]
Allow parallel mark to be enabled on powerpc-linux systems
(Tested using X10 on both BlueGene/Q and Power7/Linux platforms.)

* configure.ac (GC_LINUX_THREADS, PARALLEL_MARK, THREAD_LOCAL_ALLOC):
Define for powerpc*-*-linux* target.

10 years agoFix data roots registration for Android/x86 and NDK ARM 'gold' linker
Ivan Maidanski [Thu, 26 Dec 2013 21:41:05 +0000 (01:41 +0400)]
Fix data roots registration for Android/x86 and NDK ARM 'gold' linker

* include/gc.h (_etext, __dso_handle): Declare weak symbol (only if
Android).
* os_dep.c (_etext, __dso_handle): Likewise.
* include/gc.h (GC_INIT_CONF_ROOTS): If __data_start is incorrect
(less than _etext or missing but __dso_handle (which is typically
located at data section start) is greater than _etext as observed for
code produced by "gold" linker of Android NDK r9b) then use
__dso_handle as the lowest bound of registered data root instead of
__data_start (only if Android); update comment.
* os_dep.c (GC_init_linux_data_start): Likewise.
* os_dep.c (__data_start, data_start): Reformat code.

10 years agoFix mark stack excessive growth during parallel mark
Andrew Horton [Sat, 21 Dec 2013 13:06:36 +0000 (13:06 +0000)]
Fix mark stack excessive growth during parallel mark
(The growth observed in applications that implement things like weak
hash tables and iterate over the members marking entries using the
supplied GC_MARK_AND_PUSH macro.)

When overflow is signaled, only set GC_mark_stack_too_small if we
are using the global mark stack.  In parallel mode, local mark stack
is used, so the global mark stack is grown by GC_return_mark_stack
mainly.

* mark.c (GC_signal_mark_stack_overflow): Do not set
GC_mark_stack_too_small if GC_parallel.

10 years agoAdd API function to set/modify GC log file descriptor (Unix)
Ivan Maidanski [Sun, 22 Dec 2013 16:42:50 +0000 (20:42 +0400)]
Add API function to set/modify GC log file descriptor (Unix)

* include/gc.h (GC_set_log_fd): New API function declaration.
* misc.c (GC_set_log_fd): New function definition (except for OS/2,
MacOS, Win32/CE and Android).

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sun, 22 Dec 2013 08:58:02 +0000 (12:58 +0400)]
Update AUTHORS file

10 years agoMerge pull request #30 from Hoops/loop-in-GC_alloc_large
Ivan Maidanski [Sun, 22 Dec 2013 08:54:41 +0000 (00:54 -0800)]
Merge pull request #30 from Hoops/loop-in-GC_alloc_large

Loop in GC_alloc_large

10 years agoGroup all compact fields of GC_arrays to fit in single page
Ivan Maidanski [Sun, 22 Dec 2013 08:27:20 +0000 (12:27 +0400)]
Group all compact fields of GC_arrays to fit in single page

* include/private/gc_priv.h (struct hblkhdr): Reorder hb_inv_sz field
to reduce alignment gaps on 64-bit targets.
* include/private/gc_priv.h (struct _GC_arrays): Reorder
_composite_in_use, _atomic_in_use, _unmapped_bytes, _all_nils,
_trace_addr, _modws_valid_offsets, _root_index, _last_stack fields
so that to have all compact (small-sized) fields in one memory page.

10 years agoFix LARGE_BLOCK value used for hb_flags
Ivan Maidanski [Sat, 21 Dec 2013 19:09:00 +0000 (23:09 +0400)]
Fix LARGE_BLOCK value used for hb_flags
(fix commit a49b495)

* include/private/gc_priv.h (LARGE_BLOCK): Redefine to 0x20 (to avoid
collision with MARK_UNCONDITIONALLY defined in case of ENABLE_DISCLAIM).

10 years agoRemove hb_large_block field (use 1 extra bit of hb_flags instead)
Ivan Maidanski [Sat, 21 Dec 2013 17:16:56 +0000 (21:16 +0400)]
Remove hb_large_block field (use 1 extra bit of hb_flags instead)

* allchblk.c (setup_header): Use (hb_flags & LARGE_BLOCK) != 0
instead of hb_large_block.
* private/gc_pmark.h (PUSH_CONTENTS_HDR): Likewise.
* mallocx.c (GC_realloc): Likewise.
* include/private/gc_priv.h (struct hblkhdr): Remove hb_large_block;
define LARGE_BLOCK to access corresponding bit in hb_flags (only if
MARK_BIT_PER_GRANULE).

10 years agoRemove extra trailing backslash in GC_collect_or_expand
Ivan Maidanski [Wed, 18 Dec 2013 22:41:27 +0000 (02:41 +0400)]
Remove extra trailing backslash in GC_collect_or_expand
(adjust code formatting)

* alloc.c (GC_collect_or_expand): Remove unnecessary trailing
backslash (in multi-line expression).

10 years agoFix 'attribute declaration must precede definition' warning (clang-3.1)
Ivan Maidanski [Wed, 18 Dec 2013 19:33:50 +0000 (23:33 +0400)]
Fix 'attribute declaration must precede definition' warning (clang-3.1)

* extra/gc.c: Include gc_inline.h explicitly before including mallocx.c
(to workaround "attribute declaration must precede definition" warning
reported by clang-3.1 for GC_generic_malloc_many); define
GC_PTHREAD_REDIRECTS_ONLY before including gc_pthread_redirects.h.
* include/gc_pthread_redirects.h (GC_dlopen, GC_pthread_sigmask,
GC_PTHREAD_CREATE_CONST, GC_pthread_create, GC_pthread_join,
GC_pthread_detach, GC_pthread_cancel, GC_pthread_exit): Do not declare
if GC_PTHREAD_REDIRECTS_ONLY defined (to workaround
"attribute declaration must precede definition" warning reported by
clang-3.1).

10 years agoMake heap growth more conservative after GC_gcollect_and_unmap call
Ivan Maidanski [Tue, 17 Dec 2013 06:02:05 +0000 (10:02 +0400)]
Make heap growth more conservative after GC_gcollect_and_unmap call
(Consider heap size growth since latest GC_gcollect_and_unmap
invocation instead of absolute heap size value when computing amount
of extra memory blocks to add to heap in GC_collect_or_expand.)

* alloc.c (GC_heapsize_at_forced_unmap): New static variable.
* alloc.c (GC_gcollect_and_unmap): Store current heap size to
GC_heapsize_at_forced_unmap; add comment.
* alloc.c (GC_collect_or_expand): Change blocks_to_get computation
considering heap size growth since latest GC_heapsize_at_forced_unmap
call (instead of the absolute heap size value); do not call
GC_expand_hp_inner twice with same argument.
* include/private/gc_priv.h (_GC_arrays._heapsize): Refine comment.

10 years agoFix typo in GC_collect_or_expand comment
Ivan Maidanski [Tue, 17 Dec 2013 05:37:20 +0000 (09:37 +0400)]
Fix typo in GC_collect_or_expand comment

* alloc.c (GC_collect_or_expand): Fix a typo in comment ("setting").

10 years agoEliminate redundant *flh check for null in GC_allocobj
Ivan Maidanski [Sun, 15 Dec 2013 17:03:17 +0000 (21:03 +0400)]
Eliminate redundant *flh check for null in GC_allocobj
(code refactoring)

* alloc.c (GC_allocobj): Do not check *flh twice if the value
is non-NULL (GC_new_hblk is not called thus *flh stays non-NULL in
that case).

10 years agoFix ok_init assignment (missing cast) in GC_new_kind_inner
Ivan Maidanski [Sun, 15 Dec 2013 16:54:12 +0000 (20:54 +0400)]
Fix ok_init assignment (missing cast) in GC_new_kind_inner

* misc.c (GC_new_kind_inner): Add cast from int to GC_bool for ok_init.

10 years agoRemove 'opp' local variable in GC_malloc_X
Ivan Maidanski [Sun, 15 Dec 2013 16:36:45 +0000 (20:36 +0400)]
Remove 'opp' local variable in GC_malloc_X
(code refactoring)

* alloc.c: Update comment (about free lists).
* fnlz_mlc.c (GC_finalized_malloc): Remove "opp" local variable
(replace *opp with <kind>freelist[lg]).
* gcj_mlc.c (GC_gcj_malloc, GC_gcj_malloc_ignore_off_page): Likewise.
* malloc.c (GC_malloc_atomic, GC_malloc, GC_malloc_uncollectable):
Likewise.
* mallocx.c (GC_malloc_atomic_uncollectable): Likewise.
* typd_mlc.c (GC_malloc_explicitly_typed,
GC_malloc_explicitly_typed_ignore_off_page,
GC_calloc_explicitly_typed): Likewise.

10 years agoBump GC_collect_at_heapsize in GC_add_to_heap. In the normal case it is
Andrew Horton [Sun, 15 Dec 2013 15:55:04 +0000 (15:55 +0000)]
Bump GC_collect_at_heapsize in GC_add_to_heap. In the normal case it is
recalculated straight after. But in the case where it's called directly
from alloc_mark_stack, it isn't. If the mark stack gets very large,
this can cause GC_should_collect to always return true, and
GC_alloc_large to get stuck in a loop calling GC_collect_or_expand.

10 years agoRemove non-existing DISCARD_WORDS from GC data structure ASCII diagram
Ivan Maidanski [Mon, 9 Dec 2013 04:44:05 +0000 (08:44 +0400)]
Remove non-existing DISCARD_WORDS from GC data structure ASCII diagram

* doc/tree.html (picture): Remove DISCARD_WORDS (since always zero
and already removed from the code in gc-6.0alpha6).

10 years agoRemove barrett_diagram file duplicated by tree.html
Ivan Maidanski [Mon, 9 Dec 2013 04:08:05 +0000 (08:08 +0400)]
Remove barrett_diagram file duplicated by tree.html

* Makefile.direct (DOC_FILES): Remove doc/barrett_diagram entry.
* Makefile.dj (OTHER_FILES): Likewise.
* doc/doc.am (dist_pkgdata_DATA): Likewise.
* doc/barrett_diagram: Remove file (as the content is duplicated in
doc/tree.html).

10 years agoUpdate AUTHORS file
Ivan Maidanski [Sun, 8 Dec 2013 08:38:22 +0000 (12:38 +0400)]
Update AUTHORS file

10 years agoFix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES
Yusuke Suzuki [Mon, 2 Dec 2013 03:50:52 +0000 (12:50 +0900)]
Fix CMakeLists.txt: do not override CMAKE_OSX_ARCHITECTURES

* CMakeLists.txt: Since latest OSX compiler (clang) provided by Xcode is
not accept "-arch ppc"; So if CMAKE_OSX_ARCHITECTURES is defined by
client, CMakeLists.txt should not force "ppc;i386;x86_64".

10 years agoFix ADD_DEFINITION in CMakeLists.txt for kFreeBSD
Yusuke Suzuki [Mon, 2 Dec 2013 03:38:45 +0000 (12:38 +0900)]
Fix ADD_DEFINITION in CMakeLists.txt for kFreeBSD

* CMakeLists.txt: Fix broken ADD_DEFINITION for kFreeBSD.

10 years agoNew macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly
Ivan Maidanski [Sun, 1 Dec 2013 15:01:46 +0000 (19:01 +0400)]
New macro (GC_ALWAYS_MULTITHREADED) to set multi-threaded mode implicitly

* darwin_stop_world.c (GC_use_threads_discovery): Skip assertion on
GC_need_to_lock if GC_ALWAYS_MULTITHREADED.
* misc.c (GC_init): Likewise.
* doc/README.macros (GC_ALWAYS_MULTITHREADED): Document.
* include/gc.h (GC_allow_register_threads): Update comment (regarding
GC_ALWAYS_MULTITHREADED).
* include/private/gc_locks.h (I_HOLD_LOCK): Reformat code.
* include/private/gc_locks.h (GC_need_to_lock): Define as macro
(to TRUE) if GC_ALWAYS_MULTITHREADED defined.
* include/private/gc_locks.h (LOCK, UNLOCK): Define to UNCOND_[UN]LOCK
if GC_ALWAYS_MULTITHREADED.
* misc.c (GC_init): Call GC_init_parallel() if GC_ALWAYS_MULTITHREADED
but not GC_NO_THREADS_DISCOVERY (only for Win32, needed since
GC_allow_register_threads does nothing if GC_ALWAYS_MULTITHREADED).
* misc.c (IF_NEED_TO_LOCK): Ignore GC_parallel if
GC_ALWAYS_MULTITHREADED (since GC_need_to_lock is always true).
* pthread_support.c (GC_need_to_lock): Do not define varaible if
GC_ALWAYS_MULTITHREADED (since defined as a macro).
* win32_threads.c (GC_need_to_lock): Likewise.
* pthread_support.c (GC_allow_register_threads, pthread_create): Do
not alter value of GC_need_to_lock if GC_ALWAYS_MULTITHREADED.
* win32_threads.c (GC_allow_register_threads, GC_CreateThread,
GC_beginthreadex, GC_pthread_create, GC_init_parallel): Likewise.
* win32_threads.c (GC_allow_register_threads): Do not alter
"parallel_initialized" value if GC_ALWAYS_MULTITHREADED (so that
GC_allow_register_threads is a no-op if the macro defined).