]> granicus.if.org Git - gc/log
gc
13 years agoComment out unused argument names for new/delete in gc_cpp header
Ivan Maidanski [Fri, 23 Dec 2011 14:36:03 +0000 (18:36 +0400)]
Comment out unused argument names for new/delete in gc_cpp header

* include/gc_cpp.h (new, delete, new[], delete[]): Comment out unused
argument names (size, gcp, cleanup, clientData) to prevent warnings
by some compilers.

13 years agoUpdate TODO file
Ivan Maidanski [Fri, 23 Dec 2011 11:42:19 +0000 (15:42 +0400)]
Update TODO file

13 years agoMacOSX: Accept i386_ prefix for thread_state_t (for compatibility)
Ivan Maidanski [Fri, 23 Dec 2011 11:34:19 +0000 (15:34 +0400)]
MacOSX: Accept i386_ prefix for thread_state_t (for compatibility)

* include/private/gc_priv.h (GC_THREAD_STATE_T, GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to i386_thread_state_t,
i386_THREAD_STATE, i386_THREAD_STATE_COUNT for Darwin/x86 if the
latter macro is available (for compatibility).
* include/private/gc_priv.h (GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to ARM_MACHINE_THREAD_STATE and
ARM_MACHINE_THREAD_STATE_COUNT for Darwin/arm (iPhone), respectively,
if the latter macro is available.
* include/private/gc_priv.h (GC_MACH_THREAD_STATE,
GC_MACH_THREAD_STATE_COUNT): Define to platform-independent
MACHINE_THREAD_STATE and MACHINE_THREAD_STATE_COUNT for Darwin,
respectively, in case of missing platform-specific ones.

13 years agoFix make scripts after README.MacOSX file removal
Ivan Maidanski [Fri, 23 Dec 2011 07:03:50 +0000 (11:03 +0400)]
Fix make scripts after README.MacOSX file removal
(fix commit 89f1d2b)

* Makefile.direct (DOC_FILES): Remove doc/README.MacOSX entry.
* Makefile.dj (OTHER_FILES): Likewise.
* doc/doc.am (dist_pkgdata_DATA): Likewise.

13 years agoExpand tabs to spaces in some files
Ivan Maidanski [Thu, 22 Dec 2011 09:36:38 +0000 (13:36 +0400)]
Expand tabs to spaces in some files

* doc/tree.html: Expand tabs.
* include/ec.h: Likewise.
* include/gc_tiny_fl.h: Likewise.

13 years agoRemove trailing spaces at EOLn in all files
Ivan Maidanski [Thu, 22 Dec 2011 09:08:10 +0000 (13:08 +0400)]
Remove trailing spaces at EOLn in all files

13 years agoUpdate TODO file
Ivan Maidanski [Thu, 22 Dec 2011 08:50:16 +0000 (12:50 +0400)]
Update TODO file

13 years agodoc/README.MacOSX: Remove empty file
Ivan Maidanski [Thu, 22 Dec 2011 08:44:53 +0000 (12:44 +0400)]
doc/README.MacOSX: Remove empty file

13 years agoAdd .gitattributes to ensure normalized text line encodings in repo
Ivan Maidanski [Thu, 22 Dec 2011 08:16:41 +0000 (12:16 +0400)]
Add .gitattributes to ensure normalized text line encodings in repo

13 years ago.gitignore: Ignore config.cache
Ivan Maidanski [Thu, 22 Dec 2011 07:10:25 +0000 (11:10 +0400)]
.gitignore: Ignore config.cache

13 years agoMerge 'get-restart-signal-feature' branch
Ivan Maidanski [Tue, 20 Dec 2011 09:58:33 +0000 (13:58 +0400)]
Merge 'get-restart-signal-feature' branch

13 years agoUpdate ChangeLog
Ivan Maidanski [Mon, 19 Dec 2011 12:29:23 +0000 (16:29 +0400)]
Update ChangeLog

13 years agoFix GC_get_thr_restart_signal for Darwin and Win32
Ivan Maidanski [Mon, 19 Dec 2011 12:27:18 +0000 (16:27 +0400)]
Fix GC_get_thr_restart_signal for Darwin and Win32

* misc.c (GC_get_thr_restart_signal): Implement for Darwin and Win32
(always returns -1) if THREADS.
* pthread_stop_world.c (GC_get_thr_restart_signal): Remove
implementation for Darwin/Win32 (since the file might not be included
for these targets).

13 years agoUpdate AUTHORS
Ivan Maidanski [Mon, 19 Dec 2011 12:06:00 +0000 (16:06 +0400)]
Update AUTHORS

13 years agoFix GC_get_thr_restart_signal for OpenBSD and NaCl
Ivan Maidanski [Mon, 19 Dec 2011 12:05:39 +0000 (16:05 +0400)]
Fix GC_get_thr_restart_signal for OpenBSD and NaCl

* include/gc.h (GC_get_thr_restart_signal): Refine comment.
* pthread_stop_world.c (GC_get_thr_restart_signal): Return -1 for
OpenBSD and NaCl.

13 years agoAdded GC_get_thr_restart_signal()
Jan Wielemaker [Fri, 16 Dec 2011 08:46:38 +0000 (09:46 +0100)]
Added GC_get_thr_restart_signal()

13 years agoRecognize __ANDROID__ as synonym for PLATFORM_ANDROID
Ivan Maidanski [Fri, 16 Dec 2011 11:07:14 +0000 (15:07 +0400)]
Recognize __ANDROID__ as synonym for PLATFORM_ANDROID

* README.macros (PLATFORM_ANDROID): Update.
* include/gc_config_macros.h (__ANDROID__): Recognize as a synonym for
PLATFORM_ANDROID.
* include/private/gcconfig.h (PLATFORM_ANDROID): Define if __ANDROID__.

13 years agoUpdate ChangeLog and TODO files
Ivan Maidanski [Thu, 15 Dec 2011 15:03:42 +0000 (19:03 +0400)]
Update ChangeLog and TODO files

13 years agoInstruct configure to hide internal libgc.so symbols if supported (GCC)
Ivan Maidanski [Thu, 15 Dec 2011 15:01:47 +0000 (19:01 +0400)]
Instruct configure to hide internal libgc.so symbols if supported (GCC)

* configure.ac (ac_cv_fvisibility_hidden): New variable (set to "yes"
if only shared library is built and GCC supports "-fvisibility" option.
* configure.ac (CFLAGS): Add "-fvisibility=hidden" and
"-DGC_VISIBILITY_HIDDEN_SET" if ac_cv_fvisibility_hidden is "yes".
* include/gc_config_macros.h (GC_API): Force "default visibility"
attribute if GC_VISIBILITY_HIDDEN_SET (only if GCC and GC_BUILD).
* tests/staticrootstest.c (GC_VISIBILITY_HIDDEN_SET): Test the macro
and skip the test if defined (since "staticrootslib" symbols are of
hidden visibility).

13 years agoFix configure to disable GCC aliasing optimization unless forced to
Ivan Maidanski [Thu, 15 Dec 2011 13:42:01 +0000 (17:42 +0400)]
Fix configure to disable GCC aliasing optimization unless forced to

* configure.ac (ac_cv_fno_strict_aliasing): New variable (set to
"skipped" if the client passed "-fstrict-aliasing" option to CFLAGS
else set to "yes" if GCC supports "-fno-strict-aliasing" option,
otherwise set to "no").
* configure.ac (CFLAGS): Append "-fno-strict-aliasing" if
ac_cv_fno_strict_aliasing is "yes" (only if GCC).

13 years agoAdd configure option to compile all library .c files into single gc.o
Ivan Maidanski [Thu, 15 Dec 2011 12:02:38 +0000 (16:02 +0400)]
Add configure option to compile all library .c files into single gc.o

* Makefile.am (SINGLE_GC_OBJ): Test new AM conditional.
* Makefile.am (libgc_la_SOURCES): Put only extra/gc.c entry here if
SINGLE_GC_OBJ.
* Makefile.am (EXTRA_DIST): Add extra/gc.c only if not SINGLE_GC_OBJ.
* configure.ac (single-obj-compilation): New AC "enable" argument
(turning on compilation of single extra/gc.c file instead of all .c
files from GC base folder).
* configure.ac (SINGLE_GC_OBJ): New AM conditional.

13 years agoconfigure: Move 'mach_dep' file processing logic to Makefile.am
Ivan Maidanski [Thu, 15 Dec 2011 09:49:24 +0000 (13:49 +0400)]
configure: Move 'mach_dep' file processing logic to Makefile.am

* Makefile.am (libgc_la_SOURCES): Add "mach_dep.c"; order entries
lexicographically.
* Makefile.am (EXTRA_DIST): Remove "mach_dep.c" entry.
* configure.ac (machdep): Do not add "mach_dep.lo" entry; remove empty
case block; merge similar case blocks (for "sparc_mach_dep.lo").

13 years agoAdd GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)
Ivan Maidanski [Thu, 15 Dec 2011 08:12:07 +0000 (12:12 +0400)]
Add GC_UNDERSCORE_STDCALL, UNICODE macro templates to configure (Win32)

* configure.ac (GC_UNDERSCORE_STDCALL, UNICODE): New AH template (has
meaning only for Win32).

13 years agoconfigure: Define GC_READ_ENV_FILE for WinCE.
Ivan Maidanski [Thu, 15 Dec 2011 07:42:50 +0000 (11:42 +0400)]
configure: Define GC_READ_ENV_FILE for WinCE.

* configure.ac (GC_READ_ENV_FILE): Define AC macro for WinCE unless
'--disable-gc-debug' is set.

13 years ago.gitignore: Ignore Gcov files (.gcda, .gcno)
Ivan Maidanski [Tue, 13 Dec 2011 14:43:27 +0000 (18:43 +0400)]
.gitignore: Ignore Gcov files (.gcda, .gcno)

13 years agoconfigure: Do not pass '-Wextra' option to GCC if unsupported
Ivan Maidanski [Tue, 13 Dec 2011 11:37:59 +0000 (15:37 +0400)]
configure: Do not pass '-Wextra' option to GCC if unsupported

* configure.ac (WEXTRA): New variable (set to "-Wextra" if the latter
is supported by GCC, otherwise to "-W").
* configure.ac (CFLAGS): Use WEXTRA variable (only if GCC).

13 years agoFix use of enable_gc_debug in configure (DG/UX on AViiON)
Ivan Maidanski [Tue, 13 Dec 2011 07:06:44 +0000 (11:06 +0400)]
Fix use of enable_gc_debug in configure (DG/UX on AViiON)

* configure.ac (ac_is_dgux): Move down to below gc-debug processing
(DG/UX) since it uses "enable_gc_debug" variable; remove FIXME.

13 years agoMerge pull request #8 from waywardmonkeys/typos
Ivan Maidanski [Fri, 9 Dec 2011 09:16:49 +0000 (01:16 -0800)]
Merge pull request #8 from waywardmonkeys/typos

Fix some typos in documentation

13 years agoFix some typos.
Bruce Mitchener [Fri, 9 Dec 2011 04:23:00 +0000 (11:23 +0700)]
Fix some typos.

13 years agoOn altering CFLAGS value in configure place client flags at end
Ivan Maidanski [Thu, 1 Dec 2011 10:34:00 +0000 (14:34 +0400)]
On altering CFLAGS value in configure place client flags at end

* configure.ac (CFLAGS): Always append old CFLAGS value (instead of
placing it at start).

13 years agoPreserve client-specified CFLAGS for DG/UX
Ivan Maidanski [Thu, 1 Dec 2011 09:47:26 +0000 (13:47 +0400)]
Preserve client-specified CFLAGS for DG/UX

* configure.ac (CFLAGS, CXXFLAGS): Preserve C/C++ flags passed by
client (DG/UX only); remove code duplication (put common flags to
"dgux_spec_opts" variable).

13 years agoconfigure.ac: Expand tabs
Ivan Maidanski [Thu, 1 Dec 2011 09:36:53 +0000 (13:36 +0400)]
configure.ac: Expand tabs

13 years agoMerge 'github.com/ivmai/bdwgc/pull/7' request
Ivan Maidanski [Wed, 23 Nov 2011 10:39:52 +0000 (14:39 +0400)]
Merge 'github.com/ivmai/bdwgc/pull/7' request

13 years agoFlag autogen.sh as executable.
Bruce Mitchener [Wed, 23 Nov 2011 07:00:07 +0000 (14:00 +0700)]
Flag autogen.sh as executable.

13 years agoTypo fixes.
Bruce Mitchener [Wed, 23 Nov 2011 06:59:04 +0000 (13:59 +0700)]
Typo fixes.

13 years agoRemove unused 'destructor' parameter in 'specific' GC_key_create
Ivan Maidanski [Wed, 16 Nov 2011 15:57:17 +0000 (19:57 +0400)]
Remove unused 'destructor' parameter in 'specific' GC_key_create
function (add '_inner' suffix to the function name and create
GC_key_create proxy macro)

* include/private/specific.h (GC_key_create): Rename to
GC_key_create_inner; remove "destructor" parameter.
* specific.c (GC_key_create): Likewise.
* include/private/specific.h (GC_key_create): New macro redirecting
to GC_key_create_inner function.

13 years agoUpdate TODO file
Ivan Maidanski [Tue, 15 Nov 2011 16:30:54 +0000 (20:30 +0400)]
Update TODO file

13 years agoSupport GC_Create/ExitThread, GC_begin/endthreadex for Cygwin and
Ivan Maidanski [Tue, 15 Nov 2011 16:29:45 +0000 (20:29 +0400)]
Support GC_Create/ExitThread, GC_begin/endthreadex for Cygwin and
win32-pthread

* include/gc.h (GC_CreateThread, GC_ExitThread, GC_uintptr_t,
GC_beginthreadex, GC_endthreadex): Also declare (and redirect) for
GC_PTHREADS during GC build or if the client includes windows.h before
gc.h file; add a comment.
* win32_threads.c (thread_args, GC_win32_start_inner, GC_win32_start,
GC_CreateThread, GC_ExitThread, GC_beginthreadex, GC_endthreadex):
Also define for GC_PTHREADS.

13 years agoRemove PREFIXED in specific.c/h; mark "specific" functions as GC_INNER
Ivan Maidanski [Tue, 15 Nov 2011 11:24:33 +0000 (15:24 +0400)]
Remove PREFIXED in specific.c/h; mark "specific" functions as GC_INNER

* include/private/specific.h (PREFIXED): Remove.
* include/private/specific.h (key_t, key_create, setspecific,
remove_specific, slow_getspecific, getspecific): Expand PREFIXED macro
(add "GC_" prefix).
* specific.c (key_create, setspecific, remove_specific,
slow_getspecific, check_tsd_marks): Likewise.
* include/private/specific.h (GC_key_create, GC_setspecific,
GC_remove_specific, GC_slow_getspecific): Use GC_INNER for function.
* specific.c (GC_key_create, GC_setspecific, GC_remove_specific,
GC_slow_getspecific): Likewise.

13 years agoImplement precise value boundary check in GC_is_thread_tsd_valid
Ivan Maidanski [Tue, 15 Nov 2011 11:01:52 +0000 (15:01 +0400)]
Implement precise value boundary check in GC_is_thread_tsd_valid

* pthread_support.c (GC_is_thread_tsd_valid): Check tsd more correctly
using GC_thread and thread_local_freelists declarations; remove FIXME.
* win32_threads.c (GC_is_thread_tsd_valid): Likewise.

13 years agoFix thread_local_alloc GC_malloc[_atomic] for USE_CUSTOM_SPECIFIC TLS
Ivan Maidanski [Tue, 15 Nov 2011 10:44:29 +0000 (14:44 +0400)]
Fix thread_local_alloc GC_malloc[_atomic] for USE_CUSTOM_SPECIFIC TLS
platforms (e.g., Solaris)

* thread_local_alloc.c (GC_malloc, GC_malloc_atomic): Test result of
GC_getspecific() for NULL in all cases except for USE_COMPILER_TLS and
USE_WIN32_COMPILER_TLS (i.e., no-op implementation of GC_getspecific).

13 years agoFix GC_finalized_malloc to fetch GC_oom_fn value atomically
Ivan Maidanski [Tue, 15 Nov 2011 10:31:54 +0000 (14:31 +0400)]
Fix GC_finalized_malloc to fetch GC_oom_fn value atomically

* fnlz_mlc.c (GC_finalized_malloc): Fetch GC_oom_fn value holding the
allocation lock.

13 years agoUpdate ChangeLog file
Ivan Maidanski [Mon, 14 Nov 2011 12:57:17 +0000 (16:57 +0400)]
Update ChangeLog file

13 years agoRename (shorten name of) finalized_mlc.c to fnlz_mlc.c file
Ivan Maidanski [Fri, 11 Nov 2011 13:55:13 +0000 (17:55 +0400)]
Rename (shorten name of) finalized_mlc.c to fnlz_mlc.c file

* finalized_mlc.c: Rename to fnlz_mlc.c file.
* BCC_MAKEFILE (XXXOBJS): Rename "finalized_mlc" to "fnlz_mlc".
* EMX_MAKEFILE (OBJS): Likewise.
* Makefile.am (libgc_la_SOURCES): Likewise.
* Makefile.direct (OBJS, CSRCS): Likewise.
* Makefile.dj (OBJS, CSRCS): Likewise.
* NT_MAKEFILE (OBJS): Likewise.
* NT_STATIC_THREADS_MAKEFILE (OBJS): Likewise.
* NT_X64_STATIC_THREADS_MAKEFILE (OBJS): Likewise.
* NT_X64_THREADS_MAKEFILE (OBJS): Likewise.
* OS2_MAKEFILE (OBJS): Likewise.
* PCR-Makefile (COBJ, CSRC): Likewise.
* SMakefile.amiga (OBJS, finalized_mlc.o): Likewise.
* WCC_MAKEFILE (OBJS): Likewise.
* digimars.mak (OBJS, finalized_mlc.o): Likewise.
* extra/gc.c: Likewise.
* gc.mak: Likewise.
* thread_local_alloc.c: Likewise.
* windows-untested/vc60/gc.dsp (SOURCE): Likewise.
* windows-untested/vc60/libgc.dsp (SOURCE): Likewise.
* windows-untested/vc70/gc.vcproj: Likewise.
* windows-untested/vc70/libgc.vcproj: Likewise.
* windows-untested/vc70/libgcmt.vcproj: Likewise.
* windows-untested/vc71/gc.vcproj: Likewise.
* windows-untested/vc71/libgc.vcproj: Likewise.
* windows-untested/vc71/libgcmt.vcproj: Likewise.

13 years agoFix some rare scripts for missing dependencies for finalized_mlc.c
Ivan Maidanski [Fri, 11 Nov 2011 13:47:03 +0000 (17:47 +0400)]
Fix some rare scripts for missing dependencies for finalized_mlc.c

* PCR-Makefile (CSRC): Add finalized_mlc.c emtry.
* digimars.mak (finalized_mlc.obj): Add dependency.
* gc.mak: Add 6 missing entries for finalized_mlc.

13 years agoResolve minor warnings (reported by GCC with '-pedantic') in checksums
Ivan Maidanski [Fri, 11 Nov 2011 12:51:45 +0000 (16:51 +0400)]
Resolve minor warnings (reported by GCC with '-pedantic') in checksums

* checksums.c (GC_update_check_page): Explicitly cast a pointer
argument of GC_printf to void* to match %p format specifier.

13 years agoFix extra/gc.c to include new finalized_mlc.c file
Ivan Maidanski [Fri, 11 Nov 2011 12:25:12 +0000 (16:25 +0400)]
Fix extra/gc.c to include new finalized_mlc.c file

* extra/gc.c: Include finalized_mlc.c file (after finalize.c).

13 years agoResolve minor warnings in tests (reported by GCC with '-pedantic' option)
Ivan Maidanski [Fri, 11 Nov 2011 12:18:13 +0000 (16:18 +0400)]
Resolve minor warnings in tests (reported by GCC with '-pedantic' option)

* tests/disclaim_test.c (pair_dct, pair_new): Explicitly cast
a pointer argument of GC_printf to void* to match %p format specifier.
* tests/test.c (cons, print_int_list, run_one_test, check_heap_stats):
Likewise.

13 years agoAdd macro to optionally omit GC_move_disappearing_link
Ivan Maidanski [Wed, 9 Nov 2011 09:59:11 +0000 (13:59 +0400)]
Add macro to optionally omit GC_move_disappearing_link

* finalize.c (GC_move_disappearing_link): Do not define if
GC_MOVE_DISAPPEARING_LINK_NOT_NEEDED defined (new macro).

13 years agoSwap GC_unregister_disappearing_link and GC_move_disappearing_link
Ivan Maidanski [Mon, 7 Nov 2011 07:38:36 +0000 (11:38 +0400)]
Swap GC_unregister_disappearing_link and GC_move_disappearing_link
prototypes order in include/gc.h

13 years agoRefactor GC_move_disappearing_link() code;
Ivan Maidanski [Mon, 7 Nov 2011 07:30:44 +0000 (11:30 +0400)]
Refactor GC_move_disappearing_link() code;
make GC_move_disappearing_link(link,link) return GC_SUCCESS

* finalize.c (GC_move_disappearing_link): Rename "from", "to"
arguments to "link" and "new_link", respectively.
* include/gc.h (GC_move_disappearing_link): Likewise.
* finalize.c (GC_move_disappearing_link): Rename "to_curr_dl",
"from_index", "to_index" local variables to "new_dl", "curr_index",
"new_index", respectively.
* finalize.c (GC_move_disappearing_link): Add curr_hidden_link,
new_hidden_link local variables to evaluate GC_HIDE_POINTER(link) and
GC_HIDE_POINTER(new_link) only once.
* finalize.c (GC_move_disappearing_link): Reformat code.
* finalize.c (GC_move_disappearing_link): Do not ABORT in case of
unaligned "link", return GC_NOT_FOUND instead (similar to
GC_unregister_disappearing_link behavior).
* finalize.c (GC_move_disappearing_link): If new_link is equal to
link then return GC_SUCCESS instead of GC_DUPLICATE.
* include/gc.h (GC_move_disappearing_link, GC_NOT_FOUND): Refine and
update documentation comment.
* tests/test.c (mktree): Add "new_link" local variable; add
GC_move_disappearing_link invocations; apply
GC_unregister_disappearing_link to "new_link".

13 years agoadd GC_move_disappearing_link
Andy Wingo [Wed, 26 Oct 2011 16:15:39 +0000 (18:15 +0200)]
add GC_move_disappearing_link

* finalize.c (GC_move_disappearing_link): New function, moves a
  disappearing link.

* include/gc.h: Add declaration, and new return code GC_NOT_FOUND.

13 years agoMerge branch 'master' of github.com:ivmai/bdwgc
Ivan Maidanski [Mon, 17 Oct 2011 18:03:05 +0000 (22:03 +0400)]
Merge branch 'master' of github.com:ivmai/bdwgc

13 years agoMerge remote-tracking branch 'origin/paurkedal-disclaim-v2'
Ivan Maidanski [Mon, 17 Oct 2011 17:52:48 +0000 (21:52 +0400)]
Merge remote-tracking branch 'origin/paurkedal-disclaim-v2'

13 years agoUpdate AUTHORS (add one email)
Ivan Maidanski [Sat, 15 Oct 2011 09:47:24 +0000 (13:47 +0400)]
Update AUTHORS (add one email)

13 years agoUpdate AUTHORS
Ivan Maidanski [Mon, 10 Oct 2011 07:39:21 +0000 (11:39 +0400)]
Update AUTHORS

13 years agogcconfig.h: Add machine description for Hexagon
Linas Vepstas [Mon, 10 Oct 2011 07:33:39 +0000 (11:33 +0400)]
gcconfig.h: Add machine description for Hexagon

13 years agoDo not define internal GC_parse_map_entry() unless really used.
Ivan Maidanski [Fri, 7 Oct 2011 14:33:50 +0000 (18:33 +0400)]
Do not define internal GC_parse_map_entry() unless really used.

* include/private/gc_priv.h (GC_parse_map_entry): Do not declare
unless USE_PROC_FOR_LIBRARIES.
* os_dep.c (GC_parse_map_entry): Test USE_PROC_FOR_LIBRARIES macro
in addition to DYNAMIC_LOADING (in condition whether to define this
function).

13 years agoResolve minor merge conflict in gc_disclaim.h, disclaim_bench.c
Ivan Maidanski [Fri, 30 Sep 2011 13:40:43 +0000 (17:40 +0400)]
Resolve minor merge conflict in gc_disclaim.h, disclaim_bench.c

13 years agoFix compiler warnings in disclaim tests
Ivan Maidanski [Fri, 30 Sep 2011 09:48:34 +0000 (13:48 +0400)]
Fix compiler warnings in disclaim tests

13 years agofinalized_mlc.c: Add GC_ATTR_UNUSED tag to GC_finalized_disclaim
Ivan Maidanski [Fri, 30 Sep 2011 09:46:57 +0000 (13:46 +0400)]
finalized_mlc.c: Add GC_ATTR_UNUSED tag to GC_finalized_disclaim

13 years ago.gitignore: Ignore disclaim tests executables
Ivan Maidanski [Fri, 30 Sep 2011 09:44:36 +0000 (13:44 +0400)]
.gitignore: Ignore disclaim tests executables

13 years agoAdd comment on GC_init_finalized_malloc.
Petter Urkedal [Thu, 29 Sep 2011 22:28:14 +0000 (00:28 +0200)]
Add comment on GC_init_finalized_malloc.

13 years agoAdd gcj_mlc.o to the windows-untested project files (untested).
Petter Urkedal [Thu, 29 Sep 2011 18:12:01 +0000 (20:12 +0200)]
Add gcj_mlc.o to the windows-untested project files (untested).

13 years agoUse gc_priv.h API for timing in tests/disclaim_bench.c.
Petter Urkedal [Thu, 29 Sep 2011 18:05:45 +0000 (20:05 +0200)]
Use gc_priv.h API for timing in tests/disclaim_bench.c.

13 years agoMake disclaim_bench.c more portable.
Petter Urkedal [Wed, 28 Sep 2011 19:13:02 +0000 (21:13 +0200)]
Make disclaim_bench.c more portable.

* tests/disclaim_bench.c (main): Run all three sub-tests in the same
process, rather than invoking them through a system-call.
* tests/disclaim_bench.c (free_count, testobj_finalize): Drop the use of
atomic ops, since the benchmark is single-threaded.  We can now also run
the test unconditionally.

13 years agoAdd finalized_mlc.* to various makefiles.
Petter Urkedal [Wed, 28 Sep 2011 18:12:51 +0000 (20:12 +0200)]
Add finalized_mlc.* to various makefiles.

13 years agoReview 'disclaim' add-on partially; fix code in some places again
Ivan Maidanski [Wed, 28 Sep 2011 09:48:17 +0000 (13:48 +0400)]
Review 'disclaim' add-on partially; fix code in some places again

13 years agoSkip disclaim_bench.c if AO_fetch_and_add1 is missing.
Petter Urkedal [Sat, 24 Sep 2011 08:20:58 +0000 (10:20 +0200)]
Skip disclaim_bench.c if AO_fetch_and_add1 is missing.

13 years agoAdjust tests code for 'disclaim' feature
Ivan Maidanski [Fri, 23 Sep 2011 15:17:20 +0000 (19:17 +0400)]
Adjust tests code for 'disclaim' feature

13 years agoReview 'disclaim' add-on partially; fix code in some places
Ivan Maidanski [Fri, 23 Sep 2011 11:28:00 +0000 (15:28 +0400)]
Review 'disclaim' add-on partially; fix code in some places

13 years agoFix issues proposed in Ivan's previous commit, etc.
Petter Urkedal [Tue, 13 Sep 2011 21:28:27 +0000 (23:28 +0200)]
Fix issues proposed in Ivan's previous commit, etc.

* disclaim.c -> {finalized_mlc.c, misc.c}: Move low-level code to misc.c and
the finalized object-kind to finalized_mlc.c.
* Makefile.am: Update accordingly.
* reclaim.c: Condition #include "gc_disclaim.h" and remove "register".
* include/gc_disclaim.h, include/private/gc_priv.h, finalized_mlc.c, misc.c:
Add GC_API, GC_CALL, and GC_CALLBACK.  Use typedefs for function pointers.
* tests/disclaim_test.c, tests/disclaim_bench.c: Fix portability and other
issues.

* include/gc_disclaim.h: Forward declare ...
* finalized_mlc.c: ... and export GC_finalized_objfreelist.
* thread_local_alloc.c (GC_destroy_thread_local): Return finalized
freelists though the same global.
* include/private/thread_local_alloc.h: Tweak (move array above comment).

* Makefile.dj, NT_MAKEFILE, NT_STATIC_THREADS_MAKEFILE,
NT_X64_STATIC_THREADS_MAKEFILE, NT_X64_THREADS_MAKEFILE, gc.mak,
windows-untested/vc60/gc.dsp, windows-untested/vc70/gc.vcproj,
windows-untested/vc71/gc.vcproj: Add include/gc_disclaim.h to various build
systems.  (Untested.)

13 years agoENABLE_DISCLAIM: Make stylistic fixes in many places and add many FIXME.
Ivan Maidanski [Tue, 13 Sep 2011 06:58:36 +0000 (10:58 +0400)]
ENABLE_DISCLAIM: Make stylistic fixes in many places and add many FIXME.

13 years agoAdd and update some copyright and remove README.disclaim.
Petter Urkedal [Sat, 10 Sep 2011 13:09:41 +0000 (15:09 +0200)]
Add and update some copyright and remove README.disclaim.

* README.disclaim: Remove as it only contained patching instructions.
* disclaim.c: Add copyright notice.
* include/gc_disclaim.h: Update year on copyright notice.

13 years agoFix some issues and avoid warnings in disclaim-related code.
Petter Urkedal [Sat, 10 Sep 2011 12:03:16 +0000 (14:03 +0200)]
Fix some issues and avoid warnings in disclaim-related code.

* disclaim.c, include/gc_disclaim.h: Fix prototype.
* include/private/gc_priv.h, mark.c: Avoid missing initializer warning.
* mark.c: Fix type of a size_t variable in GC_reclaim_block.
* misc.c: Initialize ok_mark_unconditionally.
* reclaim.c: Tweak and avoid unused label warning.
* tests/disclaim_bench.c, tests/disclaim_test.c: Remove or
conditionalize unused variables.

13 years agoImplement freeing of blocks with disclaim callbacks.
Petter Urkedal [Mon, 15 Aug 2011 21:21:56 +0000 (23:21 +0200)]
Implement freeing of blocks with disclaim callbacks.

13 years agoAdjust comments and whitespace.
Petter Urkedal [Thu, 27 May 2010 22:10:57 +0000 (00:10 +0200)]
Adjust comments and whitespace.

13 years agoAdjustment to disclaim.c after config.h and a prototype change.
Petter Urkedal [Wed, 30 Sep 2009 21:19:52 +0000 (23:19 +0200)]
Adjustment to disclaim.c after config.h and a prototype change.

13 years agoFixed compilation errors, also tests passes.
Petter Urkedal [Wed, 22 Oct 2008 17:29:48 +0000 (19:29 +0200)]
Fixed compilation errors, also tests passes.

reclaim.c: Removed obsolete argument to GC_reclaim_small_nonempty_block.

13 years agoFixed memory leak issue with unconditional marking.
Petter Urkedal [Sun, 4 May 2008 16:12:52 +0000 (18:12 +0200)]
Fixed memory leak issue with unconditional marking.

13 years agodisclaim.c: Renamed RAW_BYTES_FROM_INDEX to GC_RAW_BYTES_FROM_INDEX according to...
Petter Urkedal [Sat, 12 Jan 2008 12:34:11 +0000 (13:34 +0100)]
disclaim.c: Renamed RAW_BYTES_FROM_INDEX to GC_RAW_BYTES_FROM_INDEX according to change in original branch.

README.disclaim: Patching instruction.

13 years agoAdd disclaim callbacks for efficient finalization.
Petter Urkedal [Sun, 1 Jul 2007 11:48:00 +0000 (13:48 +0200)]
Add disclaim callbacks for efficient finalization.

Importing gc-20070403-disclaim-1.0.patch.

* configure.ac: Add --disable-disclaim option and set ENABLE_DISCLAIM macro
and conditional accordingly.
* include/include.am, Makefile.am Add sources disclaim.c and
include/gc_disclaim.h.
* Makefile.direct: Ditto and define ENABLE_DISCLAIM.

* include/private/gc_priv.h (obj_kind): Add ok_mark_unconditionally,
ok_disclaim_proc and ok_disclaim_cd.
* misc.c (GC_new_kind_inner): Initialize them.
* include/private/gc_priv.h (hblkhdr): Add HAS_DISCLAIM and
MARK_UNCONDITIONALLY flags.
* allchblk.c (setup_header): Set HAS_DISCLAIM and MARK_UNCONDITIONALLY flags
as indicated by the object kind.

* reclaim.c: Main adjustments to support the disclaim callbacks.
* mark.c (GC_push_unconditionally, GC_push_next_marked_uncollecable):
Unconditionally mark from objects in blocks flagged MARK_UNCONDITIONALLY.
This preserves links reachable from the finalizer when using the the
finalized object kind.

* disclaim.c: Add file with support functions for disclaim callbacks and
implementation of the "finalized" object kind.
* include/gc_disclaim.h: Add file providing the corresponding API.
* include/private/thread_local_alloc.h (thread_local_freelists): Add
finalized_freelists.
* thread_local_alloc.c: Initialize them.

* tests/tests.am, tests/disclaim_test.c, tests/disclaim_bench.c: Add
disclaim-related tests.

13 years agoUpdate TODO file
Ivan Maidanski [Fri, 30 Sep 2011 13:33:45 +0000 (17:33 +0400)]
Update TODO file

13 years agoResolve some minor warnings reported by GCC with '-pedantic' option
Ivan Maidanski [Fri, 30 Sep 2011 13:32:47 +0000 (17:32 +0400)]
Resolve some minor warnings reported by GCC with '-pedantic' option

* allchblk.c (GC_print_hblkfreelist, GC_dump_regions, GC_freehblk):
Explicitly cast a pointer argument of GC_printf to void* to match %p
format specifier.
* reclaim.c (GC_print_free_list): Likewise.

13 years agomach_dep.c: Replace C++ style comments with C ones
Ivan Maidanski [Fri, 30 Sep 2011 13:27:35 +0000 (17:27 +0400)]
mach_dep.c: Replace C++ style comments with C ones

13 years agotests: Add missing checks of GC_malloc result (for out-of-memory)
Ivan Maidanski [Fri, 30 Sep 2011 12:17:31 +0000 (16:17 +0400)]
tests: Add missing checks of GC_malloc result (for out-of-memory)

* tests/test.c (mktree): Insert CHECK_OUT_OF_MEMORY to report mktree()
out-of-memory failures.
* tests/trace_test.c (mktree): Test whether GC_MALLOC_ATOMIC returns
NULL (exit with an error code and the appropriate message printed in
this case).

13 years agoAdd missing GC_ATTR_UNUSED annotation to a function in backgraph
Ivan Maidanski [Fri, 30 Sep 2011 12:01:28 +0000 (16:01 +0400)]
Add missing GC_ATTR_UNUSED annotation to a function in backgraph

* backgraph.c (pop_in_progress): Tag the argument with GC_ATTR_UNUSED.

13 years agoFix compiler warnings in disclaim tests
Ivan Maidanski [Fri, 30 Sep 2011 09:48:34 +0000 (13:48 +0400)]
Fix compiler warnings in disclaim tests

13 years agofinalized_mlc.c: Add GC_ATTR_UNUSED tag to GC_finalized_disclaim
Ivan Maidanski [Fri, 30 Sep 2011 09:46:57 +0000 (13:46 +0400)]
finalized_mlc.c: Add GC_ATTR_UNUSED tag to GC_finalized_disclaim

13 years ago.gitignore: Ignore disclaim tests executables
Ivan Maidanski [Fri, 30 Sep 2011 09:44:36 +0000 (13:44 +0400)]
.gitignore: Ignore disclaim tests executables

13 years agoMerge branch 'remotes/paurkedal/t/disclaim-pullreq' plus some minor fixes
Ivan Maidanski [Fri, 30 Sep 2011 09:30:16 +0000 (13:30 +0400)]
Merge branch 'remotes/paurkedal/t/disclaim-pullreq' plus some minor fixes

13 years agoAdd comment on GC_init_finalized_malloc.
Petter Urkedal [Thu, 29 Sep 2011 22:28:14 +0000 (00:28 +0200)]
Add comment on GC_init_finalized_malloc.

13 years agoAdd gcj_mlc.o to the windows-untested project files (untested).
Petter Urkedal [Thu, 29 Sep 2011 18:12:01 +0000 (20:12 +0200)]
Add gcj_mlc.o to the windows-untested project files (untested).

13 years agoUse gc_priv.h API for timing in tests/disclaim_bench.c.
Petter Urkedal [Thu, 29 Sep 2011 18:05:45 +0000 (20:05 +0200)]
Use gc_priv.h API for timing in tests/disclaim_bench.c.

13 years agoMake disclaim_bench.c more portable.
Petter Urkedal [Wed, 28 Sep 2011 19:13:02 +0000 (21:13 +0200)]
Make disclaim_bench.c more portable.

* tests/disclaim_bench.c (main): Run all three sub-tests in the same
process, rather than invoking them through a system-call.
* tests/disclaim_bench.c (free_count, testobj_finalize): Drop the use of
atomic ops, since the benchmark is single-threaded.  We can now also run
the test unconditionally.

13 years agoAdd finalized_mlc.* to various makefiles.
Petter Urkedal [Wed, 28 Sep 2011 18:12:51 +0000 (20:12 +0200)]
Add finalized_mlc.* to various makefiles.

13 years agoReview 'disclaim' add-on partially; fix code in some places again
Ivan Maidanski [Wed, 28 Sep 2011 09:48:17 +0000 (13:48 +0400)]
Review 'disclaim' add-on partially; fix code in some places again

13 years agoSkip disclaim_bench.c if AO_fetch_and_add1 is missing.
Petter Urkedal [Sat, 24 Sep 2011 08:20:58 +0000 (10:20 +0200)]
Skip disclaim_bench.c if AO_fetch_and_add1 is missing.

13 years agoAdjust tests code for 'disclaim' feature
Ivan Maidanski [Fri, 23 Sep 2011 15:17:20 +0000 (19:17 +0400)]
Adjust tests code for 'disclaim' feature

13 years agoReview 'disclaim' add-on partially; fix code in some places
Ivan Maidanski [Fri, 23 Sep 2011 11:28:00 +0000 (15:28 +0400)]
Review 'disclaim' add-on partially; fix code in some places