]> granicus.if.org Git - gc/log
gc
13 years ago2010-03-05 Ivan Maidanski <ivmai@mail.ru> (really Burkhard Linke)
ivmai [Fri, 5 Mar 2010 14:46:08 +0000 (14:46 +0000)]
2010-03-05  Ivan Maidanski <ivmai@mail.ru> (really Burkhard Linke)

* os_dep.c (GC_get_stack_base): Add LOCK/UNLOCK() (since
GC_find_limit_with_bound() should be called with the lock held).
* backgraph.c (FOR_EACH_PRED): Fix a typo.

13 years ago2010-03-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 5 Mar 2010 14:26:16 +0000 (14:26 +0000)]
2010-03-05  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_set_stop_func, GC_get_stop_func): Add
DCL_LOCK_STATE.
* finalize.c (GC_notify_or_invoke_finalizers): Ditto.
* gc_dlopen.c (disable_gc_for_dlopen): Ditto.
* gcj_mlc.c (maybe_finalize, GC_debug_gcj_malloc): Ditto.
* mark.c (GC_print_trace): Ditto.
* misc.c (GC_set_warn_proc, GC_get_warn_proc, GC_enable,
GC_disable, GC_new_free_list, GC_new_kind, GC_new_proc,
GC_set_oom_fn, GC_get_oom_fn, GC_set_finalizer_notifier,
GC_get_finalizer_notifier): Ditto.
* os_dep.c (GC_get_stack_base, GC_print_callers): Ditto.
* pthread_support.c (GC_is_thread_tsd_valid,
GC_wait_for_gc_completion, GC_init_parallel, GC_do_blocking_inner,
GC_call_with_gc_active, GC_unregister_my_thread, pthread_join,
pthread_detach, GC_register_my_thread, GC_inner_start_routine,
pthread_create): Ditto.
* reclaim.c (GC_print_all_errors): Ditto.
* win32_threads.c (GC_is_thread_tsd_valid, GC_register_my_thread,
GC_unregister_my_thread, GC_do_blocking_inner,
GC_call_with_gc_active, GC_lookup_pthread, GC_pthread_join,
GC_pthread_start_inner, GC_thread_exit_proc, GC_pthread_detach,
GC_init_parallel): Ditto.

13 years ago2010-02-25 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)
ivmai [Thu, 25 Feb 2010 07:58:46 +0000 (07:58 +0000)]
2010-02-25  Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)

* .cvsignore: New file.
* include/private/.cvsignore: Ditto.

13 years ago2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)
ivmai [Wed, 24 Feb 2010 11:47:04 +0000 (11:47 +0000)]
2010-02-24  Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)

* CMakeLists.txt: New file (adding CMake support).
* tests/CMakeLists.txt: Ditto.
* doc/README.cmake: Ditto.

13 years ago2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)
ivmai [Wed, 24 Feb 2010 10:41:12 +0000 (10:41 +0000)]
2010-02-24  Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)

* doc/README.darwin: Update.

13 years ago2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)
ivmai [Wed, 24 Feb 2010 10:31:32 +0000 (10:31 +0000)]
2010-02-24  Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)

* CMakeLists.txt: Adjust INCLUDE_DIRECTORIES and SRC (to make it
usable on Mac OS X).
* doc/README.cmake: Update.

13 years ago2010-02-24 Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)
ivmai [Wed, 24 Feb 2010 07:01:48 +0000 (07:01 +0000)]
2010-02-24  Ivan Maidanski <ivmai@mail.ru> (really Jack Andrews)

* CMakeLists.txt: New file (adding CMake support).
* tests/CMakeLists.txt: Ditto.
* doc/README.cmake: Ditto.

13 years ago2010-02-19 Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)
ivmai [Fri, 19 Feb 2010 20:07:49 +0000 (20:07 +0000)]
2010-02-19  Ivan Maidanski <ivmai@mail.ru> (really Bruce Mitchener)

* configure.ac (darwin): Don't define HAS_PPC_THREAD_STATE...
macros.
* include/private/gc_priv.h (THREAD_FLD): Recognize
__DARWIN_UNIX03 instead of HAS_PPC_THREAD_STATE... macros.
* configure: Regenerate.
* include/private/config.h.in: Ditto.

13 years ago2010-02-15 Ivan Maidanski <ivmai@mail.ru> (really Alexandr Shadchin)
ivmai [Mon, 15 Feb 2010 09:10:29 +0000 (09:10 +0000)]
2010-02-15  Ivan Maidanski <ivmai@mail.ru> (really Alexandr Shadchin)

* pthread_support.c: Include <sys/param.h> and <sys/sysctl.h> for
OpenBSD.
* pthread_support.c (get_ncpu): Define also for Darwin, NetBSD and
OpenBSD.
* pthread_support.c (GC_thr_init): Use get_ncpu() for Darwin,
NetBSD and OpenBSD.

13 years ago2010-02-04 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 4 Feb 2010 08:09:02 +0000 (08:09 +0000)]
2010-02-04  Ivan Maidanski <ivmai@mail.ru>

* mallocx.c (GC_generic_malloc_many, GC_malloc_many): Define even
if THREADS is undefined.
* include/gc.h (GC_malloc_many): Update the comment.

13 years ago2010-02-03 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 3 Feb 2010 20:23:15 +0000 (20:23 +0000)]
2010-02-03  Ivan Maidanski <ivmai@mail.ru>

* ChangeLog: Fix some typos.

13 years ago2010-01-29 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 29 Jan 2010 20:50:54 +0000 (20:50 +0000)]
2010-01-29  Ivan Maidanski <ivmai@mail.ru>

* Makefile.in: Regenerate (by autoreconf -vif using
libtool-2.2.6b, automake-1.11.1, autoconf-2.65).
* aclocal.m4: Ditto.
* compile: Ditto.
* config.guess: Ditto.
* config.sub: Ditto.
* configure: Ditto.
* depcomp: Ditto.
* install-sh: Ditto.
* ltmain.sh: Ditto.
* missing: Ditto.
* mkinstalldirs: Ditto.

13 years ago2010-01-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 15 Jan 2010 07:23:05 +0000 (07:23 +0000)]
2010-01-15  Ivan Maidanski <ivmai@mail.ru>

* include/gc_cpp.h (GC_PLACEMENT_DELETE): Define for Embarcadero
(formerly known as Borland) C++ compiler v6.21+.
* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Define for ancient
VC++ compilers.

13 years ago2009-12-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 18 Dec 2009 13:15:52 +0000 (13:15 +0000)]
2009-12-18  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_register_my_thread_inner,
GC_pthread_start_inner): Undo the previous commit changes for
the thread flags and DETACHED state (since the state is only
tested in GC_thread_exit_proc).

13 years ago2009-12-18 Ivan Maidanski <ivmai@mail.ru> (with input from
ivmai [Fri, 18 Dec 2009 12:09:55 +0000 (12:09 +0000)]
2009-12-18  Ivan Maidanski <ivmai@mail.ru> (with input from
                                    Jean-Claude Beaudoin)

* include/gc.h (GC_unregister_my_thread): Fix a typo; update the
comment.
* pthread_support.c (GC_delete_thread): Allow to delete the main
thread (don't call GC_INTERNAL_FREE for it); update the comment.
* win32_threads.c (GC_delete_thread): Ditto.
* pthread_support.c (GC_unregister_my_thread): Add an assertion
for FINISHED flag is unset.
* tests/test.c (check_heap_stats): Test the main thread
unregistering (only if THREADS).
* win32_threads.c (GC_register_my_thread_inner): Set flags to
DETACHED (only if GC_PTHREADS).
* win32_threads.c (GC_unregister_my_thread): Add FIXME (for
GC_wait_for_gc_completion).
* win32_threads.c (GC_pthread_start_inner): Clear flags detached
state if needed; set pthread_id and flags while holding the lock.

13 years ago2009-12-07 Ivan Maidanski <ivmai@mail.ru> (with input from Andy Wingo)
ivmai [Thu, 17 Dec 2009 08:02:26 +0000 (08:02 +0000)]
2009-12-07  Ivan Maidanski <ivmai@mail.ru> (with input from Andy Wingo)

* include/private/gc_priv.h (SIG_SUSPEND): Don't define for
OpenBSD and Darwin.

13 years ago2009-12-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 17 Dec 2009 07:23:43 +0000 (07:23 +0000)]
2009-12-07  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h: Recognize _M_X64 (as an alias for _AMD64_).

13 years ago2009-12-10 Hans-J. Boehm <Hans.Boehm@hp.com>
hboehm [Fri, 11 Dec 2009 00:02:43 +0000 (00:02 +0000)]
2009-12-10  Hans-J. Boehm <Hans.Boehm@hp.com>

* test.c (main, WinMain): Consistently don't invoke
GC_enable_incremental() if MAKE_BACKGRAPH is defined, but
do invoke it even if parallel marking is enabled.

13 years ago2009-12-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 8 Dec 2009 19:45:29 +0000 (19:45 +0000)]
2009-12-08  Ivan Maidanski <ivmai@mail.ru>

* tests/test.c (reverse_test): Comment out a check for MSWIN32
(when determing BIG value) assuming outdated win32S.
* tests/test.c (reverse_test): Rename to reverse_test_inner;
change the declaration (to be of GC_fn_type); call itself thru
GC_call_with_gc_active() if the argument is zero.
* tests/test.c (reverse_test): New function added calling
reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
GC_call_with_gc_active).

13 years ago2009-12-08 Ivan Maidanski <ivmai@mail.ru> (with input from Marcos Dione)
ivmai [Tue, 8 Dec 2009 17:08:14 +0000 (17:08 +0000)]
2009-12-08  Ivan Maidanski <ivmai@mail.ru> (with input from Marcos Dione)

* doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
Document.
* dyn_load.c: Don't include <elf.h> if PLATFORM_ANDROID.
* dyn_load.c: Include bionic <linker.h> (instead of <link.h>) if
PLATFORM_ANDROID.
* include/private/gcconfig.h (LINUX): Define also if
PLATFORM_ANDROID (for the windows-based toolkit).
* include/private/gcconfig.h (SEARCH_FOR_DATA_START): Explicitly
define for Android/x86 platform.
* include/private/gcconfig.h (IGNORE_DYNAMIC_LOADING): Recognize
new macro (undefine DYNAMIC_LOADING in this case).
* include/private/gcconfig.h (CANCEL_SAFE): Don't define if
PLATFORM_ANDROID.
* include/private/gcconfig.h (IF_CANCEL): Fix definition for the
explicitly defined CANCEL_SAFE.

13 years ago2009-12-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 8 Dec 2009 16:25:04 +0000 (16:25 +0000)]
2009-12-08  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_allochblk_nth): Don't call GC_remove_protection()
if GC_DISABLE_INCREMENTAL.
* reclaim.c (GC_reclaim_generic): Ditto.
* checksums.c (GC_page_was_ever_dirty): Add prototype.
* include/private/gc_locks.h (GC_mark_lock_holder): Don't declare
unless PARALLEL_MARK.
* include/private/gc_priv.h (GC_dirty_maintained,
GC_page_was_dirty, GC_remove_protection, GC_dirty_init): Don't
declare if GC_DISABLE_INCREMENTAL.
* include/private/gc_priv.h (GC_print_finalization_stats): Don't
declare if SMALL_CONFIG.
* include/private/gcconfig.h (CHECKSUMS): Explicitly undefine if
GC_DISABLE_INCREMENTAL (since nothing to check).
* include/private/gcconfig.h (DEFAULT_VDB): Don't define if
GC_DISABLE_INCREMENTAL.
* os_dep.c (GC_dirty_maintained): Ditto.
* mark.c (GC_initiate_gc): Don't call GC_read_dirty() if
GC_DISABLE_INCREMENTAL.
* os_dep.c (GC_gww_page_was_ever_dirty, GC_page_was_ever_dirty):
Uncomment; define only if CHECKSUMS.

13 years ago2009-12-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 8 Dec 2009 10:31:50 +0000 (10:31 +0000)]
2009-12-08  Ivan Maidanski <ivmai@mail.ru>

* darwin_stop_world.c (GC_push_all_stacks): Fix a bug (call
GC_push_all_stack() instead of GC_push_all_stack_frames()).
* include/private/gc_priv.h (GC_push_all_stack_frames,
GC_push_all_register_frames): Rename to
GC_push_all_stack_sections and GC_push_all_register_sections,
respectively.
* mark_rts.c (GC_push_all_stack_frames,
GC_push_all_register_frames, GC_push_all_stack_part_eager_frames,
GC_push_current_stack): Ditto.
* pthread_stop_world.c (GC_push_all_stacks): Ditto.
* win32_threads.c (GC_push_stack_for): Ditto.
* misc.c (GC_call_with_gc_active): Rename "frame" local variable
to "stacksect".
* pthread_support.c (GC_call_with_gc_active): Ditto.
* win32_threads.c (GC_call_with_gc_active): Ditto.
* pthread_support.c (GC_call_with_gc_active): Update FIXME for
Darwin.
* win32_threads.c (GC_Thread_Rep): Update the comment for
traced_stack_sect.

13 years ago2009-12-08 Ivan Maidanski <ivmai@mail.ru> (really mostly Hans Boehm)
ivmai [Tue, 8 Dec 2009 09:09:06 +0000 (09:09 +0000)]
2009-12-08  Ivan Maidanski <ivmai@mail.ru> (really mostly Hans Boehm)

* darwin_stop_world.c (GC_push_all_stacks): Rename
activation_frame to traced_stack_sect.
* include/private/gc_priv.h (GC_push_all_stack_frames,
GC_push_all_register_frames): Ditto.
* include/private/pthread_support.h (GC_Thread_Rep): Ditto.
* mark_rts.c (GC_push_all_register_frames,
GC_push_all_stack_frames, GC_push_all_stack_part_eager_frames,
GC_push_current_stack): Ditto.
* pthread_stop_world.c (GC_push_all_stacks): Ditto.
* pthread_support.c (GC_call_with_gc_active): Ditto.
* win32_threads.c (GC_Thread_Rep, GC_call_with_gc_active,
GC_push_stack_for): Ditto.
* include/private/gc_priv.h (GC_activation_frame_s): Rename to
GC_traced_stack_sect_s.
* include/private/gc_priv.h (GC_activation_frame): Rename to
GC_traced_stack_sect.
* misc.c (GC_activation_frame, GC_call_with_gc_active): Ditto.
* doc/README.macros (UNICODE): Document.

13 years ago2009-12-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 7 Dec 2009 17:12:40 +0000 (17:12 +0000)]
2009-12-07  Ivan Maidanski <ivmai@mail.ru>

* doc/README.macros (GC_READ_ENV_FILE): Document (new macro).
* include/private/gc_priv.h (GETENV): Recognize GC_READ_ENV_FILE;
declare and use GC_envfile_getenv().
* misc.c (GC_envfile_content, GC_envfile_length): New static
variable (only if GC_READ_ENV_FILE).
* misc.c (GC_ENVFILE_MAXLEN): New macro (used in GC_envfile_init).
* misc.c (GC_envfile_init, GC_envfile_getenv): New function (only
if GC_READ_ENV_FILE).
* misc.c (GC_init): Call GC_envfile_init() (before using GETENV)
if GC_READ_ENV_FILE.
* misc.c (GC_init): Move GC_setpagesize() and GC_init_win32()
calls to be just before GC_envfile_init() one (since the latter
uses GET_MEM).
* misc.c (GC_abort): use ExitProcess() (instead of DebugBreak) for
WinCE if NO_DEBUGGING; add a comment for DebugBreak() (for WinCE).
* mark_rts.c (GC_add_roots_inner): Remove redundant trailing '\n'
from the ABORT message.
* misc.c (GC_init): Ditto.
* os_dep.c (GC_get_main_stack_base, GC_register_data_segments):
Ditto.
* pthread_stop_world.c (GC_push_all_stacks): Ditto.
* pthread_support.c (GC_init_real_syms, start_mark_threads):
Ditto.

13 years ago2009-12-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 6 Dec 2009 11:06:31 +0000 (11:06 +0000)]
2009-12-06  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_get_next_stack): Don't define for Cygwin
(since unused for now).

13 years ago2009-12-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 6 Dec 2009 09:08:11 +0000 (09:08 +0000)]
2009-12-06  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (HAVE_REGISTER_MAIN_STATIC_DATA): Don't define unless
GC_register_main_static_data() is defined.
* dyn_load.c (GC_register_dynamic_libraries): Define only if used
(if DYNAMIC_LOADING or PCR or Win32/CE).
* dyn_load.c (GC_register_main_static_data): Define the default
one only if DYNAMIC_LOADING.
* include/private/gc_priv.h (GC_register_dynamic_libraries):
Declare only if used (to prevent compiler warning).

13 years ago2009-12-04 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 4 Dec 2009 10:20:18 +0000 (10:20 +0000)]
2009-12-04  Ivan Maidanski <ivmai@mail.ru>

* mark_rts.c (GC_approx_sp): Add a comment (for GCC).

13 years ago2009-12-04 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 4 Dec 2009 09:55:54 +0000 (09:55 +0000)]
2009-12-04  Ivan Maidanski <ivmai@mail.ru>

* include/gc_version.h, configure.ac, doc/README: Change to
version 7.2alpha5.
* configure: Regenerate.

13 years ago2009-12-01 Ivan Maidanski <ivmai@mail.ru> gc7_2alpha4
ivmai [Tue, 1 Dec 2009 20:34:23 +0000 (20:34 +0000)]
2009-12-01  Ivan Maidanski <ivmai@mail.ru>

* include/gc_version.h, configure.ac, doc/README: Change to
version 7.2alpha4.
* configure: Regenerate.

13 years ago2009-11-21 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 21 Nov 2009 08:57:47 +0000 (08:57 +0000)]
2009-11-21  Ivan Maidanski <ivmai@mail.ru>

* configure.ac (AC_CONFIG_COMMANDS): Quote srcdir value.
* configure: Regenerate.

13 years ago2009-11-18 Ivan Maidanski <ivmai@mail.ru> (really mostly Zoltan Varga)
ivmai [Wed, 18 Nov 2009 09:39:06 +0000 (09:39 +0000)]
2009-11-18  Ivan Maidanski <ivmai@mail.ru> (really mostly Zoltan Varga)

* include/gc.h (GC_get_suspend_signal): New function declaration.
* misc.c (GC_get_suspend_signal): New API function (only if
THREADS).

13 years ago2009-11-16 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 16 Nov 2009 19:56:54 +0000 (19:56 +0000)]
2009-11-16  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (min_bytes_allocd): Multiply GC_free_space_divisor by
two if GC_incremental (instead of TRUE_INCREMENTAL).

13 years ago2009-11-10 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 10 Nov 2009 08:33:27 +0000 (08:33 +0000)]
2009-11-10  Ivan Maidanski <ivmai@mail.ru>

* sparc_mach_dep.S (GC_push_regs): Remove the reference.

13 years ago2009-11-09 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 9 Nov 2009 12:27:34 +0000 (12:27 +0000)]
2009-11-09  Ivan Maidanski <ivmai@mail.ru>

* os_dep.c (SIZE_T, PULONG_PTR): Remove.
* os_dep.c (ULONG_PTR): Replace with GC_ULONG_PTR (defined as GC
"word"); add the comment.
* os_dep.c (GetWriteWatch_type, detect_GetWriteWatch,
GC_gww_read_dirty): Prefix ULONG_PTR with "GC_".

13 years ago2009-11-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 7 Nov 2009 10:01:15 +0000 (10:01 +0000)]
2009-11-07  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (THREAD_TABLE_SZ): Change back to a power-of-two
const value (for speed).
* win32_threads.c (THREAD_TABLE_INDEX): New macro.
* win32_threads.c (GC_new_thread, GC_lookup_thread_inner,
GC_delete_gc_thread, GC_delete_thread, GC_lookup_pthread): Use
THREAD_TABLE_INDEX instead of THREAD_TABLE_SZ.
* win32_threads.c (PTHREAD_MAP_HASH): Rename to PTHREAD_MAP_INDEX.

13 years ago2009-11-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 7 Nov 2009 09:04:33 +0000 (09:04 +0000)]
2009-11-07  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (THREAD_TABLE_SZ): Make the const value prime.

13 years ago2009-11-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 6 Nov 2009 12:07:59 +0000 (12:07 +0000)]
2009-11-06  Ivan Maidanski <ivmai@mail.ru>

* backgraph.c: Remove apostrophe char from "#error".

13 years ago2009-11-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 6 Nov 2009 11:12:00 +0000 (11:12 +0000)]
2009-11-06  Ivan Maidanski <ivmai@mail.ru>

* doc/README.macros (GC_DISABLE_INCREMENTAL): Document.
* include/private/gcconfig.h (GC_DISABLE_INCREMENTAL): Recognize
new macro; implicitly define it if SMALL_CONFIG.
* alloc.c (GC_incremental, GC_timeout_stop_func): Check for
GC_DISABLE_INCREMENTAL instead of SMALL_CONFIG.
* include/private/gc_priv.h (GC_incremental, TRUE_INCREMENTAL,
GC_push_conditional): Ditto.
* mark.c (GC_push_next_marked_dirty, GC_push_selected,
GC_push_conditional, GC_block_was_dirty): Ditto.
* misc.c (GC_enable_incremental): Ditto.
* misc.c (GC_init): Ditto (for "GC_PAUSE_TIME_TARGET" and
"GC_ENABLE_INCREMENTAL" environment variables).
* misc.c (GC_enable_incremental): Reformat the code.

13 years ago2009-11-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 6 Nov 2009 09:17:00 +0000 (09:17 +0000)]
2009-11-06  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (WIN32_LEAN_AND_MEAN): Guard with ifndef.
* misc.c (WIN32_LEAN_AND_MEAN): Ditto.
* os_dep.c (WIN32_LEAN_AND_MEAN): Ditto.
* allchblk.c (GC_allochblk_nth): Fix a minor typo (don't/doesn't)
in a comment.
* backgraph.c: Ditto.
* dyn_load.c (GC_register_dynamic_libraries): Ditto.
* extra/threadlibs.c (main): Ditto.
* pthread_support.c (pthread_join): Ditto.
* tests/test.c (main): Ditto.

13 years ago2009-11-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 6 Nov 2009 07:16:05 +0000 (07:16 +0000)]
2009-11-06  Ivan Maidanski <ivmai@mail.ru>

* mach_dep.c (GC_push_regs): Remove STATIC (just to catch
a duplicate symbol definition linker error).
* misc.c (GC_clear_stack_inner): Ditto.
* sparc_mach_dep.S (GC_push_regs): Comment out the reference.
* sparc_mach_dep.S: Remove trailing spaces at EOLn; remove
multiple trailing blank lines.

13 years ago2009-11-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 6 Nov 2009 05:54:29 +0000 (05:54 +0000)]
2009-11-06  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_write_disabled): New variable
declaration (only if GC_ASSERTIONS and Win32 threads).
* misc.c (GC_write): Add assertion for GC_write_disabled value is
not on (only if THREADS).
* win32_threads.c (GC_write_disabled): New variable (only if
GC_ASSERTIONS and not Cygwin).
* win32_threads.c (GC_stop_world): Set and clear GC_write_disabled
(while holding GC_write_cs).

13 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 17:19:06 +0000 (17:19 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* win32_threads.c (GC_please_stop): If DllMain-based thread
registration is not compiled in then define GC_please_stop as
a non-volatile variable for assertion only.
* win32_threads.c (GC_stop_world): Set and clear only if defined.
* win32_threads.c (GC_stop_world): Add the comment for GC_printf()
usage (while holding GC_write_cs).
* win32_threads.c (GC_delete_gc_thread): Ditto.
* os_depc.c (GC_remove_protection): Ditto.

13 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 15:44:07 +0000 (15:44 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* pthread_support.c (GC_inner_start_routine): Join 3 sequential
GC_printf() calls into a single one (for DEBUG_THREADS).

13 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 12:35:44 +0000 (12:35 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_total_stacksize): New variable
declaration (only if THREADS).
* alloc.c (GC_total_stacksize): New variable (only if THREADS).
* alloc.c (min_bytes_allocd): Calculate stack_size using
GC_stackbottom only in the single-threaded case; otherwise use
GC_total_stacksize; print GC_total_stacksize value if
DEBUG_THREADS.
* darwin_stop_world.c (GC_push_all_stacks): Use "%p" printf type
specifier for lo/hi values (instead of "%lx").
* darwin_stop_world.c (GC_push_all_stacks): Use
GC_push_all_stack_frames() instead of GC_push_all_stack().
* darwin_stop_world.c (GC_push_all_stacks): Recalculate
GC_total_stacksize value.
* pthread_stop_world.c (GC_push_all_stacks): Ditto.
* win32_threads.c (GC_push_all_stacks): Ditto.
* win32_threads.c (GC_push_stack_for): Pass "me" argument; return
stack size; don't check for non-zero value of thread->stack_base.
* win32_threads.c (GC_push_all_stacks): Don't call
GC_push_stack_for() and don't check for "t->id == me" if
thread->stack_base is zero.

13 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 11:58:23 +0000 (11:58 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (GC_dump_meminfo): Prefix "%lx" printf type specifier
with "0x".
* os_dep.c (PROTECT): Ditto.
* win32_threads.c (GC_mark_thread_local_free_lists): Cast p->id to
int (to match printf type specifier).

13 years ago2009-11-05 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 5 Nov 2009 08:12:27 +0000 (08:12 +0000)]
2009-11-05  Ivan Maidanski <ivmai@mail.ru>

* tests/test.c (check_heap_stats): Take into account the unmapped
memory size when checking for "Unexpected heap growth"; remove
FIXME.

13 years ago2009-11-03 Hans Boehm <Hans.Boehm@hp.com>
hboehm [Tue, 3 Nov 2009 22:06:30 +0000 (22:06 +0000)]
2009-11-03  Hans Boehm <Hans.Boehm@hp.com>

        * alloc.c: Revert last change.

13 years ago2009-11-02 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 2 Nov 2009 17:46:29 +0000 (17:46 +0000)]
2009-11-02  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h (STACKBOTTOM): Add a presence check
for eCos/NOSYS.
* misc.c (GC_write): Comment out _Jv_diag_write() call (since no
longer defined in GCJ).

13 years ago2009-11-02 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 2 Nov 2009 07:43:54 +0000 (07:43 +0000)]
2009-11-02  Ivan Maidanski <ivmai@mail.ru>

* os_dep.c (brk): Rename to ecos_gc_brk.

13 years ago2009-11-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 1 Nov 2009 09:44:56 +0000 (09:44 +0000)]
2009-11-01  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (min_bytes_allocd): Use GC_stackbottom value to compute
stack_size even if THREADS.
* doc/README.macros (DEBUG_THREADS): Document.
* pthread_support.c (DEBUG_THREADS): Remove the commented out
definition.
* win32_threads.c (DEBUG_WIN32_THREADS): Remove duplicate
definition.
* win32_threads.c: Include errno.h (except for WinCE).
* win32_threads.c (GC_win32_start_inner): Copy "start" and "param"
to local variables, and free "arg" parameter before "start"
invocation.
* win32_threads.c (GC_beginthreadex): Set errno to EAGAIN on error
(instead of calling SetLastError(ERROR_NOT_ENOUGH_MEMORY)).
* win32_threads.c (GC_beginthreadex): Return 0 on error (instead
of -1).

13 years ago2009-10-23 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 23 Oct 2009 10:23:41 +0000 (10:23 +0000)]
2009-10-23  Ivan Maidanski <ivmai@mail.ru>

* darwin_stop_world.c (GC_darwin_register_mach_handler_thread):
Use GC_INNER for the function definition.
* include/private/darwin_stop_world.h
(GC_darwin_register_mach_handler_thread): Remove the prototype.
* include/private/darwin_stop_world.h: Add copyright header.
* os_dep.c (GC_darwin_register_mach_handler_thread): Use GC_INNER
for the function prototype.
* include/private/gc_priv.h (NDEBUG): Explicitly define if
NO_DEBUGGING and not GC_ASSERTIONS (before the standard headers
inclusion).

13 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 20:26:19 +0000 (20:26 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Move DebugBreak() workaround (for
x86mingw32ce toolchain) to gc_priv.h (after windows.h inclusion).

13 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 17:52:36 +0000 (17:52 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_unmap_old, GC_merge_unmapped, GC_allochblk,
GC_freehblk): Use GC_INNER for the function definition.
* alloc.c (GC_never_stop_func, GC_should_collect,
GC_try_to_collect_inner, GC_collect_a_little_inner,
GC_set_fl_marks, GC_add_to_our_memory, GC_add_to_heap,
GC_expand_hp_inner, GC_collect_or_expand, GC_allocobj): Ditto.
* backgraph.c (GC_build_back_graph, GC_traverse_back_graph):
Ditto.
* blacklst.c (GC_default_print_heap_obj_proc, GC_bl_init,
GC_promote_black_lists, GC_unpromote_black_lists,
GC_add_to_black_list_normal, GC_add_to_black_list_stack,
GC_is_black_listed): Ditto.
* darwin_stop_world.c (GC_push_all_stacks, GC_push_all_stacks,
GC_stop_init, GC_stop_world, GC_start_world): Ditto.
* dbg_mlc.c (GC_has_other_debug_info, GC_store_back_pointer,
GC_marked_for_finalization, GC_generate_random_backtrace_no_gc,
GC_store_debug_info, GC_start_debugging,
GC_debug_generic_malloc_inner,
GC_debug_generic_malloc_inner_ignore_off_page,
GC_debug_malloc_uncollectable, GC_debug_free_inner): Ditto.
* dyn_load.c (GC_register_dynamic_libraries,
GC_register_main_static_data, GC_init_dyld): Ditto.
* finalize.c (GC_push_finalizer_structures, GC_finalize,
GC_notify_or_invoke_finalizers, GC_print_finalization_stats):
Ditto.
* gcj_mlc.c (GC_core_gcj_malloc): Ditto.
* headers.c (GC_find_header, GC_header_cache_miss,
GC_scratch_alloc, GC_init_headers, GC_install_header,
GC_install_counts, GC_remove_header, GC_remove_counts,
GC_next_used_block, GC_prev_block): Ditto.
* mach_dep.c (GC_with_callee_saves_pushed): Ditto.
* malloc.c (GC_collect_or_expand, GC_alloc_large,
GC_generic_malloc_inner, GC_generic_malloc_inner_ignore_off_page,
GC_core_malloc_atomic, GC_core_malloc, GC_free_inner): Ditto.
* mallocx.c (GC_generic_malloc_ignore_off_page): Ditto.
* mark.c (GC_collection_in_progress, GC_clear_hdr_marks,
GC_set_hdr_marks, GC_set_mark_bit, GC_clear_mark_bit,
GC_clear_marks, GC_initiate_gc, GC_mark_some,
GC_mark_stack_empty, GC_invalidate_mark_state,
GC_signal_mark_stack_overflow, GC_mark_from, GC_help_marker,
GC_mark_init, GC_push_all, GC_push_conditional,
GC_mark_and_push_stack, GC_push_all_eager, GC_push_all_stack):
Ditto.
* mark_rts.c (GC_is_static_root, GC_roots_present, GC_approx_sp,
GC_exclude_static_roots_inner, GC_push_all_register_frames,
GC_push_all_stack_frames, GC_cond_register_dynamic_libraries,
GC_push_roots): Ditto.
* misc.c (GC_extend_size_map, GC_clear_stack, GC_err_write):
Ditto.
* new_hblk.c (GC_build_fl, GC_new_hblk): Ditto.
* obj_map.c (GC_register_displacement_inner, GC_add_map_entry,
GC_initialize_offsets): Ditto.
* os_dep.c (GC_get_maps, GC_parse_map_entry, GC_text_mapping,
GC_init_linux_data_start, GC_init_netbsd_elf, GC_setpagesize,
GC_set_and_save_fault_handler, GC_setup_temporary_fault_handler,
GC_reset_fault_handler, GC_get_register_stack_base, GC_init_win32,
GC_add_current_malloc_heap, GC_is_heap_base, GC_unmap, GC_remap,
GC_unmap_gap, GC_push_all_stacks, GC_gww_dirty_init,
GC_dirty_init, GC_read_dirty, GC_page_was_dirty,
GC_page_was_ever_dirty, GC_remove_protection,
GC_write_fault_handler, GC_mprotect_stop, GC_mprotect_resume,
GC_save_callers, GC_print_callers): Ditto.
* pthread_stop_world.c (GC_push_all_stacks, GC_stop_world,
GC_start_world, GC_stop_init): Ditto.
* pthread_support.c (GC_mark_thread_local_free_lists,
GC_lookup_thread, GC_reset_finalizer_nested,
GC_check_finalizer_nested, GC_segment_is_thread_stack,
GC_greatest_stack_base_below, GC_thr_init, GC_init_parallel,
GC_do_blocking_inner, GC_lock, GC_acquire_mark_lock,
GC_release_mark_lock, GC_wait_for_reclaim, GC_notify_all_builder,
GC_wait_marker, GC_notify_all_marker): Ditto.
* reclaim.c (GC_print_all_errors, GC_block_empty,
GC_reclaim_generic, GC_start_reclaim, GC_continue_reclaim,
GC_reclaim_all): Ditto.
* thread_local_alloc.c (GC_init_thread_local,
GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto.
* win32_threads.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested, GC_do_blocking_inner, GC_stop_world,
GC_start_world, GC_push_all_stacks, GC_get_next_stack,
GC_acquire_mark_lock, GC_release_mark_lock, GC_wait_for_reclaim,
GC_notify_all_builder, GC_wait_marker, GC_notify_all_marker,
GC_thr_init, GC_init_parallel, GC_lock,
GC_mark_thread_local_free_lists): Ditto.
* alloc.c (GC_add_current_malloc_heap, GC_build_back_graph,
GC_traverse_back_graph): Use GC_INNER for the function prototype.
* darwin_stop_world.c (GC_mprotect_stop, GC_mprotect_resume):
Ditto.
* dbg_mlc.c (GC_default_print_heap_obj_proc): Ditto.
* dyn_load.c (GC_parse_map_entry, GC_get_maps,
GC_segment_is_thread_stack, GC_roots_present, GC_is_heap_base,
GC_get_next_stack): Ditto.
* finalize.c (GC_reset_finalizer_nested,
GC_check_finalizer_nested): Ditto.
* gcj_mlc.c (GC_start_debugging): Ditto.
* include/private/dbg_mlc.h (GC_save_callers, GC_print_callers,
GC_has_other_debug_info, GC_store_debug_info): Ditto.
* include/private/gc_hdrs.h (GC_header_cache_miss): Ditto.
* include/private/gc_locks.h (GC_lock): Ditto.
* include/private/gc_pmark.h (GC_signal_mark_stack_overflow,
GC_mark_from): Ditto.
* include/private/pthread_support.h (GC_lookup_thread,
GC_stop_init): Ditto.
* include/private/thread_local_alloc.h (GC_init_thread_local,
GC_destroy_thread_local, GC_mark_thread_local_fls_for): Ditto.
* malloc.c (GC_extend_size_map, GC_text_mapping): Ditto.
* mark.c (GC_page_was_ever_dirty): Ditto.
* mark_rts.c (GC_mark_thread_local_free_lists): Ditto.
* misc.c (GC_register_main_static_data, GC_init_win32,
GC_setpagesize, GC_init_linux_data_start,
GC_set_and_save_fault_handler, GC_init_dyld, GC_init_netbsd_elf,
GC_do_blocking_inner): Ditto.
* os_dep.c (GC_greatest_stack_base_below): Ditto.
* win32_threads.c (GC_write_fault_handler, GC_gww_dirty_init):
Ditto.
* include/private/gc_priv.h: Ditto (for most prototypes).
* include/private/gc_priv.h (GC_INNER): Update the comment.
* doc/README.macros (GC_DLL): Update.

13 years ago2009-10-22 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 22 Oct 2009 15:00:59 +0000 (15:00 +0000)]
2009-10-22  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_collection_in_progress): Move the prototype to
gc_priv.h.
* gc_dlopen.c (GC_collection_in_progress): Ditto.
* pthread_support.c (GC_collection_in_progress): Ditto.
* misc.c (GC_init_parallel): Ditto.
* pthread_support.c (GC_init_parallel): Ditto.
* win32_threads.c (GC_init_parallel): Ditto.
* darwin_stop_world.c (GC_thr_init): Ditto.
* misc.c (GC_thr_init): Ditto.
* pthread_stop_world.c (GC_thr_init): Ditto.
* pthread_support.c (GC_thr_init): Ditto.
* blacklst.c (GC_clear_bl, GC_copy_bl,
GC_number_stack_black_listed): Make STATIC.
* dbg_mlc.c (GC_print_obj, GC_make_closure,
GC_debug_invoke_finalizer): Ditto.
* malloc.c (GC_alloc_large_and_clear): Ditto.
* mark.c (GC_push_selected, GC_push_marked1, GC_push_marked2,
GC_push_marked4, GC_push_marked, GC_push_next_marked,
GC_push_next_marked_dirty, GC_push_next_marked_uncollectable):
Ditto.
* misc.c (GC_clear_stack_inner): Ditto.
* os_dep.c (GC_repeat_read, GC_default_push_other_roots): Ditto.
* darwin_stop_world.c (FindTopOfStack): Make static; define only
if not DARWIN_DONT_PARSE_STACK.
* dbg_mlc.c (GC_debug_free_inner): Define only if DBG_HDRS_ALL.
* dyn_load.c (GC_repeat_read): Remove unused prototype.
* include/private/gc_pmark.h (GC_find_start): Ditto.
* misc.c (GC_read, GC_register_finalizer_no_order): Ditto.
* dyn_load.c (GC_segment_is_thread_stack): Add prototype (only if
THREADS).
* dyn_load.c (GC_register_main_static_data): Define only if
DYNAMIC_LOADING.
* finalize.c (GC_enqueue_all_finalizers): Remove unnecessary tail
"return" statement.
* gc_dlopen.c (GC_SOLARIS_THREADS): Don't recognize (since implies
GC_PTHREADS).
* include/gc.h: Fix a typo.
* include/gc_inline.h (GC_ASSERT): Define (if not defined) since
the header is public.
* include/gc_inline.h (GC_generic_malloc_many): New public
function declaration.
* mallocx.c (GC_generic_malloc_many): Make public.
* include/private/gc_priv.h (GC_INNER): Use visibility attribute
(if available).
* include/private/gc_priv.h (GC_EXTERN): Define using GC_INNER.
* include/private/gc_priv.h: Include atomic_ops.h if THREADS and
MPROTECT_VDB.
* os_dep.c: Don't include atomic_ops.h
* win32_threads.c: Ditto.
* include/private/gc_priv.h (GC_push_selected, GC_push_regs,
GC_push_marked, GC_number_stack_black_listed,
GC_alloc_large_and_clear, GC_reclaim_or_delete_all,
GC_generic_malloc_many, GC_make_closure,
GC_debug_invoke_finalizer, GC_print_obj, GC_page_was_ever_dirty):
Remove the prototype.
* mark.c (GC_page_was_ever_dirty): Add prototype (only if
PROC_VDB).
* include/private/gc_priv.h (GC_push_next_marked_dirty,
GC_push_next_marked, GC_push_next_marked_uncollectable): Move
the prototype to mark.c.
* include/private/gc_priv.h (GC_is_static_root): Declare only if
not THREADS.
* include/private/gc_priv.h (GC_free_inner): Declare only if
THREADS.
* include/private/gc_priv.h (GC_debug_free_inner): Declare only if
THREADS and DBG_HDRS_ALL.
* include/private/gc_priv.h (GC_markers): Declare GC_markers only
if PARALLEL_MARK.
* include/private/gc_priv.h (GC_register_main_static_data): Move
the prototype to misc.c.
* mach_dep.c (GC_push_regs): Make STATIC; define only along with
HAVE_PUSH_REGS definition.
* mach_dep.c (GC_clear_stack_inner): Replace K&R-style function
definition with the ANSI C one.
* mark.c (GC_started_thread_while_stopped): Declared only if not
GNU C.
* win32_threads.c (GC_started_thread_while_stopped): Don't define
if GNU C.
* mark.c (GC_mark_from): Avoid unbalanced brackets in
#if-#else-#endif blocks.
* mark_rts.c (GC_is_static_root): Define only if not THREADS.
* os_dep.c (GC_get_stack_base): Make public (for OpenBSD).
* os_dep.c (GC_page_was_ever_dirty): Comment out the function
except for PROC_VDB.
* tests/test.c (main): Don't reference GC_print_obj,
GC_make_closure, GC_debug_invoke_finalizer,
GC_page_was_ever_dirty, GC_is_fresh (in GC_noop).
* thread_local_alloc.c: Don't include "gc_inline.h".
* win32_threads.c (GC_write_fault_handler): Declare only if
MPROTECT_VDB.

13 years ago2009-10-21 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 21 Oct 2009 09:33:39 +0000 (09:33 +0000)]
2009-10-21  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (DEBUG): Remove macro (since unused).
* allchblk.c: Include private/gc_priv.h before other includes and
definitions.
* alloc.c: Ditto.
* gc_dlopen.c: Ditto.
* headers.c: Ditto.
* mallocx.c: Ditto.
* mark_rts.c: Ditto.
* new_hblk.c: Ditto.
* reclaim.c: Ditto.
* mark.c: Include private/gc_pmark.h before other includes.
* misc.c: Ditto.
* dyn_load.c (_GNU_SOURCE): Move the definition to gc_priv.h.
* pthread_support.c (_USING_POSIX4A_DRAFT10): Ditto.
* pthread_support.c (_POSIX4A_DRAFT10_SOURCE): Remove (since
already defined in gc_config_macros.h).
* dyn_load.c (GC_init_dyld): Remove parameter cast for
_dyld_register_func_for_add_image() and
_dyld_register_func_for_remove_image(); add the comment about
possible warnings; add FIXME for the deprecated
_dyld_bind_fully_image_containing_address().
* include/private/gc_priv.h: Include gc.h before the standard
headers inclusion.
* tests/test.c: Ditto.
* include/private/gcconfig.h (DebugBreak): Update the comment.
* typd_mlc.c (ED_INITIAL_SIZE): Remove ';'.
* alloc.c: Reformat the code (partly adjust indentation).
* backgraph.c: Ditto.
* blacklst.c: Ditto.
* checksums.c: Ditto.
* finalize.c: Ditto.
* gcj_mlc.c: Ditto.
* mach_dep.c: Ditto.
* mark_rts.c: Ditto.
* obj_map.c: Ditto.
* os_dep.c: Ditto.
* ptr_chck.c: Ditto.
* stubborn.c: Ditto.
* thread_local_alloc.c: Ditto.
* typd_mlc.c: Ditto.

13 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)
ivmai [Tue, 20 Oct 2009 21:27:25 +0000 (21:27 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really mostly OpenBSD contributors)

* configure.ac (openbsd): Define GC_OPENBSD_THREADS.
* configure.ac: Add AM_CONDITIONAL(OPENBSD_THREADS).
* configure.ac: Add sparc-openbsd case.
* doc/README.macros (GC_NETBSD_THREADS, GC_OPENBSD_THREADS):
Document.
* tests/test.c (main): Handle OpenBSD case.
* extra/threadlibs.c: Add the copyright header; expand all tabs to
spaces; remove trailing spaces at EOLn.
* include/private/pthread_stop_world.h: Ditto.
* extra/threadlibs.c (main): Replace K&R-style function definition
with the ANSI C one.
* extra/threadlibs.c (main): Handle GC_OPENBSD_THREADS case.
* dyn_load.c (OPENBSD): Recognize (similar to NETBSD).
* include/gc_config_macros.h (GC_SOLARIS_THREADS): Recognize;
define it for OpenBSD.
* include/gc_pthread_redirects.h (GC_pthread_sigmask,
pthread_sigmask): Don't declare and redefine for OpenBSD.
* include/private/gcconfig.h: Handle OpenBSD (on arm, sh, i386,
amd64, powerpc).
* mach_dep.c (NO_GETCONTEXT): Ditto.
* include/private/pthread_stop_world.h (thread_stop_info): Don't
define last_stop_count field if OpenBSD.
* misc.c (GC_init_dyld): Add declaration (if NetBSD).
* misc.c (GC_init): Don't call GC_init_netbsd_elf() for OpenBSD.
* os_dep.c (GC_init_netbsd_elf): Don't define for OpenBSD.
* os_dep.c (old_segv_act, GC_jmp_buf_openbsd): New static variable
(only if OpenBSD).
* os_dep.c (GC_fault_handler_openbsd, GC_find_limit_openbsd,
GC_skip_hole_openbsd): New static function (only if OpenBSD).
* os_dep.c (GC_get_stack_base, GC_get_main_stack_base,
GC_register_data_segments): Define specially for OpenBSD case.
* os_dep.c (GC_fault_handler_lock): Initialize to
AO_TS_INITIALIZER (instead of 0).
* pthread_support.c (GC_allocate_lock): Ditto.
* pthread_stop_world.c (NSIG, GC_print_sig_mask,
GC_remove_allowed_signals, suspend_handler_mask, GC_stop_count,
GC_world_is_stopped, GC_retry_signals, SIG_THR_RESTART,
GC_suspend_ack_sem, GC_suspend_handler_inner, GC_suspend_handler,
GC_restart_handler): Don't define and use if OpenBSD.
* pthread_stop_world.c (GC_suspend_all, GC_stop_world,
GC_start_world): Handle OpenBSD case.
* pthread_stop_world.c (GC_stop_init): Define as empty if OpenBSD.
* pthread_support.c (pthread_sigmask): Don't undefine the macro and
don't define the wrapper function if OpenBSD.
* pthread_support.c (GC_thr_init): Handle OpenBSD case.
* configure: Regenerate.
* include/private/config.h.in: Ditto.

13 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Tue, 20 Oct 2009 21:21:16 +0000 (21:21 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* dyn_load.c: Move the inclusion of private/gc_priv.h below
definition of a feature macro (_GNU_SOURCE).

13 years ago2009-10-20 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 20 Oct 2009 13:34:26 +0000 (13:34 +0000)]
2009-10-20  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (REVEAL_POINTER): Remove redundant parentheses.
* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): New macros
(only if GC_I_HIDE_POINTERS).
* backgraph.c (GET_OH_BG_PTR): Prefix REVEAL_POINTER() with "GC_".
* dbg_mlc.c (GC_get_back_ptr_info): Ditto.
* finalize.c (GC_grow_table, GC_dump_finalization, GC_finalize,
GC_enqueue_all_finalizers): Ditto.
* backgraph.c (SET_OH_BG_PTR): Prefix HIDE_POINTER() with "GC_".
* finalize.c (GC_general_register_disappearing_link,
GC_unregister_disappearing_link, GC_register_finalizer_inner,
GC_finalize): Ditto.
* include/private/dbg_mlc.h (HIDE_BACK_PTR): Ditto.
* include/private/dbg_mlc.h (GC_I_HIDE_POINTERS): Define instead
of I_HIDE_POINTERS.
* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto.
* include/gc.h (_GC_H): Strip leading underscore.
* include/gc_backptr.h (_GC_H): Ditto.
* include/gc_gcj.h (_GC_H): Ditto.
* include/gc_mark.h (_GC_H): Ditto.
* include/gc_typed.h (_GC_TYPED_H, _GC_H): Ditto.
* include/javaxfc.h (_GC_H): Ditto.
* include/new_gc_alloc.h (__GC_SPECIALIZE): Ditto.
* include/private/dbg_mlc.h (_GC_H): Ditto.
* include/private/gc_priv.h (_GC_H): Ditto.
* include/gc_backptr.h: Reformat the code (adjust indentation,
comment out function parameter names).
* include/gc_gcj.h: Ditto.
* include/gc_mark.h: Ditto.
* include/gc_typed.h: Ditto.
* include/javaxfc.h: Ditto.
* include/private/dbg_mlc.h: Ditto.
* include/private/gc_priv.h: Ditto.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 17:08:27 +0000 (17:08 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 15:06:58 +0000 (15:06 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_INNER): New macro (for GC-scope
variable definitions).
* include/private/gc_priv.h (GC_EXTERN): Update the comment.
* allchblk.c (GC_unmap_threshold): Define as GC_INNER.
* alloc.c (GC_incremental, GC_world_stopped, GC_n_heap_sects,
GC_n_memory, GC_fail_count): Ditto.
* blacklst.c (GC_black_list_spacing, GC_print_heap_obj): Ditto.
* gcj_mlc.c (GC_gcj_malloc_initialized, GC_gcjobjfreelist): Ditto.
* mach_dep.c (GC_save_regs_ret_val): Ditto.
* mark.c (GC_n_mark_procs, GC_obj_kinds, GC_n_kinds,
GC_mark_stack, GC_mark_stack_limit, GC_mark_stack_size,
GC_mark_stack_top, GC_mark_state, GC_mark_stack_too_small,
GC_mark_no, GC_markers): Ditto.
* mark_rts.c (GC_root_size, GC_push_typed_structures): Ditto.
* misc.c (GC_allocate_ml, GC_debugging_started, GC_check_heap,
GC_print_all_smashed, GC_print_back_height, GC_dump_regularly,
GC_backtraces, GC_force_unmap_on_gcollect,
GC_large_alloc_warn_interval, GC_is_initialized, GC_write_cs,
GC_current_warn_proc, GC_blocked_sp, GC_activation_frame): Ditto.
* os_dep.c (GC_page_size, GC_dont_query_stack_min,
GC_no_win32_dlls, GC_wnt, GC_sysinfo, GC_push_other_roots,
GC_dirty_maintained, GC_fault_handler_lock): Ditto.
* pthread_support.c (GC_allocate_ml, GC_lock_holder,
GC_need_to_lock, GC_thr_initialized, GC_threads,
GC_in_thread_creation, GC_collecting, GC_allocate_lock,
GC_mark_lock_holder): Ditto.
* reclaim.c (GC_bytes_found, GC_fl_builder_count, GC_have_errors):
Ditto.
* win32_threads.c (GC_allocate_ml, GC_lock_holder,
GC_need_to_lock, GC_mark_lock_holder, GC_collecting): Ditto.
* extra/gc.c (GC_INNER, GC_EXTERN): Define as STATIC.
* mach_dep.c (GC_with_callee_saves_pushed): Remove redundant {}.
* os_dep.c (GC_init_win32): Reformat the comment.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 14:17:03 +0000 (14:17 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (GC_bytes_allocd, GC_objfreelist,
GC_aobjfreelist): Replace GC_EXTERN to extern for SEPARATE_GLOBALS
case (since they are not defined inside GC at present).
* include/private/gc_priv.h (GC_objects_are_marked): Remove the
declaration (since made static).
* mark.c (GC_objects_are_marked): Define as STATIC.
* win32_threads.c (GC_thr_initialized, GC_in_thread_creation):
Ditto.
* mark.c (GC_N_KINDS_INITIAL_VALUE): New macro (defined and used
to initialize GC_n_kinds).
* win32_threads.c (start_mark_threads): Adjust the comment.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 11:32:44 +0000 (11:32 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
function.
* backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto.
* mark_rts.c (add_roots_to_index): Ditto.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 10:56:20 +0000 (10:56 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* extra/gc.c: New file.
* Makefile.am (EXTRA_DIST): Add "extra/gc.c".
* configure: Regenerate.
* Makefile.in: Ditto.

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru>
ivmai [Mon, 19 Oct 2009 08:44:47 +0000 (08:44 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru>

* misc.c (GC_log): Remove the declaration; move the definition (to
the place where it is used); make STATIC.
* misc.c (GC_init): Use GC_err_printf() instead of GC_log_printf()
to print open log failure.
* misc.c (GC_write): Don't abort on open log failure if the GC is
compiled with GC_PRINT_VERBOSE_STATS (useful for WinCE).

13 years ago2009-10-19 Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler)
ivmai [Mon, 19 Oct 2009 04:47:24 +0000 (04:47 +0000)]
2009-10-19  Ivan Maidanski <ivmai@mail.ru> (really Andreas Tobler)

* include/private/gcconfig.h (USE_MMAP): Guard with ifndef.

13 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 10:47:44 +0000 (10:47 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Move
the variable declaration to gc_priv.h.
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Ditto.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
* finalize.c (GC_fail_count): Ditto.
* include/private/gc_locks.h (GC_allocate_ml, GC_lock_holder,
GC_collecting, GC_mark_lock_holder, GC_need_to_lock): Ditto.
* include/private/gc_pmark.h (GC_n_mark_procs, GC_mark_stack_size,
GC_mark_stack_limit, GC_mark_stack_top, GC_mark_stack,
GC_mark_stack_too_small, GC_mark_state): Ditto.
* include/private/pthread_support.h (GC_threads,
GC_thr_initialized, GC_in_thread_creation): Ditto.
* mallocx.c (GC_bytes_found): Ditto.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
* misc.c (GC_unmap_threshold): Ditto.
* os_dep.c (GC_unmap_threshold): Ditto.
* pthread_support.c (GC_markers): Ditto.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.
* include/private/gc_priv.h (GC_EXTERN): New macro (used mostly as
a tag for now); defined after "gcconfig.h" inclusion.
* include/private/gc_priv.h: Use GC_EXTERN instead of "extern"
keyword for most global variables.
* alloc.c (GC_copyright): Add the comment about the symbol
visibility.
* finalize.c (GC_fo_entries): Ditto.
* include/private/gc_priv.h (GC_print_stats): Ditto.
* misc.c (GC_quiet): Ditto.
* mallocx.c (GC_bytes_allocd_tmp): Make the volatile variable
STATIC.
* pthread_support.c (GC_threads): Add explicit zero initializer
(to make the variable definition differ from the declaration).

13 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 08:46:08 +0000 (08:46 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* backgraph.c (GC_quiet): Remove the declaration (not needed
anymore since gc_priv.h is always included).
* checksums.c (GC_quiet): Ditto.
* gcj_mlc.c (GC_quiet): Ditto.
* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
comment.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* mark.c (GC_first_nonempty): Make the volatile variable STATIC.
* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
Ditto.
* win32_threads.c (GC_please_stop, GC_max_thread_index,
GC_mark_mutex_waitcnt): Ditto.

13 years ago2009-10-18 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sun, 18 Oct 2009 05:21:39 +0000 (05:21 +0000)]
2009-10-18  Ivan Maidanski <ivmai@mail.ru>

* pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
'D') in the name.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:54:30 +0000 (21:54 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* gc_dlopen.c (GC_MUST_RESTORE_REDEFINED_DLOPEN): Define if dlopen
redirection is turned off; turn it on later when dlopen real
symbol is no longer needed (according to the comment and the same
as in dyn_load.c).
* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): Rename to WRAP_DLFUNC and
REAL_DLFUNC, respectively (to have unique names since the
definitions may differ from that of the similar ones in
pthread_support.c).
* mark.c (source): Undefine the macro when no longer needed.
* os_dep.c (handler): Rename the type to GC_fault_handler_t (to
have the unique name across the project).
* os_dep.c (STAT_BUF_SIZE, STAT_READ); Guard with ifndef; add the
comment.
* pthread_support.c (STAT_BUF_SIZE, STAT_READ): Ditto.
* os_dep.c (sbrk): Undo sbrk() redirection (for ECOS) when no
longer needed.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:22:12 +0000 (21:22 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* pthread_stop_world.c (pthread_sigmask): Undefine before using
in GC_print_sig_mask() (only if DEBUG_THREADS); add the comment.
* win32_threads.c (dlopen, _beginthread): Don't undefine (since
neither redirected nor used here).
* win32_threads.c (GC_Thread_Rep): Rename "table_management" to
"tm" for short; remove "tm_" prefix.
* win32_threads.c (in_use, next): Don't define the macros; use
tm.in_use and tm.next fields, respectively (to ease debugging).
* win32_threads.c (HASH): Rename to PTHREAD_MAP_HASH (to have
unique name across the project).

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 21:00:46 +0000 (21:00 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h
inclusion.
* include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is
not included yet.
* finalize.c (I_HIDE_POINTERS): Don't define.
* include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto.
* misc.c (I_HIDE_POINTERS): Ditto.
* include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER,
GC_hidden_pointer): Don't define if HIDE_POINTER is undefined.
* include/private/gc_pmark.h: Remove the comment about gc_priv.h
inclusion order.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 20:40:55 +0000 (20:40 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c: Include gc_priv.h before using configuration
information (MACOS).
* dyn_load.c (GC_must_restore_redefined_dlopen): Rename to
GC_MUST_RESTORE_REDEFINED_DLOPEN.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 20:12:19 +0000 (20:12 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* backgraph.c (SET_OH_BG_PTR): Place outermost parenthesis
properly.
* darwin_stop_world.c: Replace "if DEBUG_THREADS" with
"ifdef DEBUG_THREADS".
* pthread_stop_world.c: Ditto.
* pthread_support.c: Ditto.
* include/gc_inline.h: Guard with GC_INLINE_H.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 11:18:17 +0000 (11:18 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_copyright): Define as const.
* alloc.c (GC_collect_at_heapsize): Replace "static" with "STATIC"
(since the name starts with "GC_" prefix).
* dbg_mlc.c (GC_describe_type_fns): Ditto.
* dyn_load.c (GC_FirstDLOpenedLinkMap,
GC_register_dynlib_callback, GC_dyld_sections,
GC_dyld_name_for_hdr, GC_dyld_image_add, GC_dyld_image_remove):
Ditto.
* malloc.c (GC_libpthread_start, GC_libpthread_end,
GC_libld_start, GC_libld_end): Ditto.
* mark_rts.c (GC_remove_root_at_pos, GC_rebuild_root_index):
Ditto.
* os_dep.c (GC_gww_read_dirty, GC_gww_page_was_dirty,
GC_gww_page_was_ever_dirty, GC_mprotect_thread_notify,
GC_mprotect_thread_reply, GC_mprotect_thread, GC_darwin_sigbus,
GC_forward_exception): Ditto.
* pthread_support.c (GC_syms_initialized): Ditto.
* typd_mlc.c (GC_push_typed_structures_proc): Ditto.
* win32_threads.c (GC_win32_dll_threads,
GC_register_my_thread_inner, GC_lookup_pthread, GC_get_stack_min,
GC_waitForSingleObjectInfinite): Ditto.
* darwin_stop_world.c (GC_use_mach_handler_thread,
GC_use_mach_handler_thread, GC_mach_threads_count): Replace
"static" with "STATIC" and add zero initializer.
* os_dep.c (GC_task_self, GC_ports, GC_mprotect_state,
GC_sigbus_count): Ditto.
* headers.c (free_hdr): Replace "static" with GC_INLINE.
* misc.c (GC_tmp): Rename static variable to fwrite_gc_res.
* os_dep.c (memory): Rename static variable to ecos_gc_memory.
* os_dep.c (async_set_pht_entry_from_index): Make static (for
MPROTECT_VDB case).
* pthread_support.c (GC_real_pthread_create,
GC_real_pthread_sigmask, GC_real_pthread_join,
GC_real_pthread_detach, GC_init_real_syms): Use REAL_FUNC() macro
for static GC_real_XXX symbols.
* win32_threads.c (GC_may_be_in_stack): Remove "GC_" prefix.

13 years ago2009-10-17 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 17 Oct 2009 10:12:52 +0000 (10:12 +0000)]
2009-10-17  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_never_stop_func, GC_check_fl_marks,
GC_finish_collection): Reformat the code (make opening bracket
style uniform across the file).
* allchblk.c (GC_allochblk): Ditto.
* backgraph.c (add_edge): Ditto.
* dbg_mlc.c (GC_marked_for_finalization): Ditto.
* dyn_load.c (GC_register_dynamic_libraries, GC_init_dyld): Ditto.
* finalize.c (GC_null_finalize_mark_proc): Ditto.
* gc_dlopen.c (GC_dlopen): Ditto.
* mark.c (GC_push_marked1, GC_push_marked2, GC_push_marked4):
Ditto.
* misc.c (looping_handler, GC_call_with_gc_active,
GC_do_blocking_inner, GC_do_blocking): Ditto.
* os_dep.c (GC_get_main_stack_base, GC_read_dirty): Ditto.
* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
GC_pthread_join, GC_pthread_detach, GC_check_tls,
GC_do_blocking_inner, GC_call_with_gc_active): Ditto.
* reclaim.c (GC_reclaim_clear, GC_reclaim_block,
GC_print_free_list): Ditto.
* os_dep.c (GC_page_was_dirty, GC_page_was_ever_dirty,
GC_remove_protection): Reformat the code (wrap long lines).

13 years ago2009-10-16 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 16 Oct 2009 06:41:03 +0000 (06:41 +0000)]
2009-10-16  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_finish_collection): Replace getenv() with GETENV().
* dyn_load.c (GC_init_dyld): Ditto.
* os_dep.c (GC_print_callers): Ditto.
* dyn_load.c (GC_dyld_name_for_hdr): Cast _dyld_get_image_name()
result (since it's always of "struct mach_header" type).
* dyn_load.c (GC_init_dyld): Cast GC_dyld_image_add and
GC_dyld_image_remove (to always have the first argument of
"struct mach_header" pointer type).

13 years ago2009-10-16 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Fri, 16 Oct 2009 06:25:28 +0000 (06:25 +0000)]
2009-10-16  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Add threads support for OpenBSD case (threads may
not work correctly for it).
* configure: Regenerate.

13 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Thu, 15 Oct 2009 19:39:38 +0000 (19:39 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* acinclude.m4: Rename to m4/gc_set_version.m4.
* aclocal.m4: Regenerate.
* configure: Ditto.
* Makefile.in: Ditto.
* m4/libtool.m4: Delete the file.
* m4/lt~obsolete.m4: Ditto.
* m4/ltoptions.m4: Ditto.
* m4/ltsugar.m4: Ditto.
* m4/ltversion.m4: Ditto.

13 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 15 Oct 2009 16:41:07 +0000 (16:41 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Define DebugBreak() as _exit(-1) for
x86mingw32ce toolchain to workaround the incorrect DebugBreak()
declaration in winbase.h (the workaround would turn into a no-op
when DebugBreak() will be defined as a macro in the toolchain).

13 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 15 Oct 2009 12:49:40 +0000 (12:49 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru>

* include/private/gcconfig.h: Recognize __i386__ if WinCE (for
x86mingw32ce toolchain).
* include/private/gcconfig.h (NO_GETENV): Don't define for CeGCC
toolchain (or if already defined).
* include/private/gcconfig.h (NO_GETENV_WIN32): New macro (always
defined for WinCE or if NO_GETENV is defined).
* misc.c (GC_CreateLogFile): Use NO_GETENV_WIN32 macro instead of
NO_GETENV one.

13 years ago2009-10-15 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Thu, 15 Oct 2009 06:25:01 +0000 (06:25 +0000)]
2009-10-15  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Add AC_CONFIG_MACRO_DIR([m4]).
* Makefile.am: Add "ACLOCAL_AMFLAGS = -I m4".
* libtool.m4: Remove.
* aclocal.m4: Regenerate.
* configure: Ditto.
* Makefile.in: Ditto.
* m4/libtool.m4: New file (generated).
* m4/lt~obsolete.m4: Ditto.
* m4/ltoptions.m4: Ditto.
* m4/ltsugar.m4: Ditto.
* m4/ltversion.m4: Ditto.

13 years ago2009-10-10 Ivan Maidanski <ivmai@mail.ru>
ivmai [Sat, 10 Oct 2009 07:45:57 +0000 (07:45 +0000)]
2009-10-10  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (GC_UNDERSCORE_STDCALL): Recognize new macro;
prefix GC_CreateThread and GC_ExitThread with '_' if defined.
* doc/README.macros (GC_UNDERSCORE_STDCALL): Document.

13 years ago2009-10-09 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 9 Oct 2009 17:03:35 +0000 (17:03 +0000)]
2009-10-09  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_collect_or_expand): Add "retry" argument; add the
comments; don't use "default" stop_func on a retry if
GC_dont_expand.
* alloc.c (GC_collect_or_expand): Reformat the code (make the
indentation style uniform across the function).
* alloc.c (GC_allocobj): Pass "retry" argument to
GC_collect_or_expand().
* malloc.c (GC_alloc_large): Ditto.
* include/private/gc_priv.h (GC_collect_or_expand): Move the
declaration to malloc.c; add "retry" argument.

13 years ago2009-10-09 Ivan Maidanski <ivmai@mail.ru>
ivmai [Fri, 9 Oct 2009 07:04:46 +0000 (07:04 +0000)]
2009-10-09  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_start_call_back): Move the variable definition from
misc.c.
* include/private/gc_priv.h (GC_start_call_back): Remove the
declaration.
* alloc.c (GC_notify_full_gc): Remove unnecessary cast of 0.
* alloc.c (GC_try_to_collect_inner): Also call stop_func at the
beginning of the function.
* include/gc.h (GC_try_to_collect): Refine the comment about
stop_func.

13 years ago2009-10-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 8 Oct 2009 08:24:13 +0000 (08:24 +0000)]
2009-10-08  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_default_stop_func, GC_try_to_collect_general,
GC_gcollect): Add the comment.
* alloc.c (GC_try_to_collect_general): Move the assertion on
stop_func != 0 to GC_try_to_collect().
* alloc.c (GC_try_to_collect_general): If stop_func == 0 then use
GC_default_stop_func instead (holding the lock).
* alloc.c (GC_gcollect): Pass 0 as stop_func instead of
GC_default_stop_func (to prevent data races).

13 years ago2009-10-08 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 8 Oct 2009 07:17:23 +0000 (07:17 +0000)]
2009-10-08  Ivan Maidanski <ivmai@mail.ru>

* Makefile.direct: Move "define arguments" documentation to
doc/README.macros; add reference to doc/README.macros.
* Makefile.dj: Change the documentation reference to
doc/README.macros.
* README.QUICK: Ditto.
* configure.ac: Ditto.
* allchblk.c: Remove unnecessary "-D" from the comment.
* doc/README.macros: Ditto.
* README.environment: Ditto.
* include/gc.h: Ditto.
* include/gc_inline.h: Ditto.
* include/private/gcconfig.h: Ditto.
* README.QUICK: Fix a typo.
* README.QUICK: Expand all tabs to spaces.
* configure: Regenerate.
* include/private/config.h.in: Ditto.

13 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 15:22:30 +0000 (15:22 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* misc.c (GC_CreateLogFile): Use FILE_ATTRIBUTE_NORMAL for
CreateFile(); don't immediately flush every write if very verbose.

13 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 12:22:07 +0000 (12:22 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* doc/README.win32: Replace ".exe.log" to ".gc.log".
* doc/README.win64: Ditto.
* doc/README.win64: Fix a typo.
* misc.c (GC_CreateLogFile): Strip executable file extension for
the log file; use ".gc.log" extension (instead of ".log").

13 years ago2009-10-07 Ivan Maidanski <ivmai@mail.ru>
ivmai [Wed, 7 Oct 2009 06:42:34 +0000 (06:42 +0000)]
2009-10-07  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Avoid the redefinition of
GC_xxx_THREADS macros.

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 16:29:55 +0000 (16:29 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_try_to_collect_general): Change the type of "result"
local variable to GC_bool.

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 16:16:01 +0000 (16:16 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Use old behavior for FreeBSD and
NetBSD platform detection code (check that other GC_xxx_THREADS
are undefined); add FIXME.

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 15:38:52 +0000 (15:38 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc_config_macros.h: Rearrange the platform detection
code (GC_WIN32_PTHREADS implies GC_WIN32_THREADS; define
GC_THREADS first if GC_XXX_THREADS already set; define proper
GC_XXX_THREADS if GC_THREADS; define GC_PTHREADS in a single
place; define _REENTRANT if posix threads except for Win32).
* include/gc_config_macros.h: Reformat the code (make the
indentation style uniform across the file).

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 12:50:34 +0000 (12:50 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* alloc.c (GC_try_to_collect_general): New function (move the code
from GC_try_to_collect, pass force_unmap argument).
* alloc.c (GC_try_to_collect, GC_gcollect): Call
GC_try_to_collect_general().
* alloc.c (GC_gcollect_and_unmap): New public function.
* include/gc.h (GC_gcollect_and_unmap): New function declaration.
* tests/test.c (window_proc): Call GC_gcollect_and_unmap() on
WM_HIBERNATE event (instead of GC_set_force_unmap_on_gcollect()
and GC_gcollect()).

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 10:52:03 +0000 (10:52 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h (GC_allow_register_threads, GC_register_my_thread,
GC_unregister_my_thread, GC_malloc_many): Refine the comment.
* include/gc.h (GC_malloc_many, GC_NEXT): Declare unconditionally
(that is, don't depend on GC_THREADS macro).
* include/gc.h: Don't check for __CYGWIN32__ and __CYGWIN__ along
with a check for GC_PTHREADS (since the former implies the
latter).

13 years ago2009-10-06 Ivan Maidanski <ivmai@mail.ru>
ivmai [Tue, 6 Oct 2009 08:01:01 +0000 (08:01 +0000)]
2009-10-06  Ivan Maidanski <ivmai@mail.ru>

* include/gc.h: Reformat the code (make the indentation style
uniform across the file).
* include/gc.h (GC_SOLARIS_THREADS): Don't check for.
* include/gc.h (GC_MIN, GC_MAX): Don't define.
* mallocx.c (GC_malloc_many): Add comment to #endif.

13 years ago2009-10-02 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
ivmai [Fri, 2 Oct 2009 08:29:50 +0000 (08:29 +0000)]
2009-10-02  Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)

* configure.ac: Drop the subdir-objects Automake option, since
it's incompatible with picking source files from libatomic_ops.
* Makefile.in: Regenerate.

13 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler)
ivmai [Thu, 1 Oct 2009 21:13:37 +0000 (21:13 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru> (really mostly Andreas Tobler)

* allchblk.c (GC_fail_count, GC_large_alloc_warn_interval): Add
"extern" keyword to a global variable declaration (some compilers
require it).
* alloc.c (GC_bytes_found, GC_unmap_threshold,
GC_force_unmap_on_gcollect): Ditto.
* dyn_load.c (GC_no_win32_dlls, GC_wnt): Ditto.
* finalize.c (GC_fail_count): Ditto.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* mallocx.c (GC_bytes_found): Ditto.
* mark_rts.c (GC_save_regs_ret_val, GC_world_stopped): Ditto.
* misc.c (GC_unmap_threshold): Ditto.
* os_dep.c (GC_unmap_threshold, GC_old_allocator): Ditto.
* pthread_support.c (GC_markers): Ditto.
* thread_local_alloc.c (GC_gcjobjfreelist,
GC_gcj_malloc_initialized, GC_gcj_kind): Ditto.
* win32_threads.c (GC_fault_handler_lock, GC_write_cs,
GC_dont_query_stack_min, GC_markers, GC_wnt): Ditto.

13 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 20:04:23 +0000 (20:04 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* Makefile.in: Regenerate (by autoreconf -vif, deleting libtool.m4
first and using libtool-2.2, automake-1.10.2, autoconf-2.64).
* aclocal.m4: Ditto.
* config.guess: Ditto.
* config.sub: Ditto.
* configure: Ditto.
* depcomp: Ditto.
* install-sh: Ditto.
* ltmain.sh: Ditto.
* missing: Ditto.
* mkinstalldirs: Ditto.
* include/private/config.h.in: Ditto.

13 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 19:23:14 +0000 (19:23 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* tests/huge_test.c: Define GC_IGNORE_WARN (if not defined) to
suppress misleading GC "Out of Memory!" warning printed on every
GC_MALLOC(LONG_MAX) call.
* tests/huge_test.c: Include "gc.h" instead of <gc.h>.
* tests/huge_test.c (main): Replace K&R-style function definition
with the ANSI C one.
* tests/huge_test.c: Expand all tabs to spaces.

13 years ago2009-10-01 Ivan Maidanski <ivmai@mail.ru>
ivmai [Thu, 1 Oct 2009 12:48:38 +0000 (12:48 +0000)]
2009-10-01  Ivan Maidanski <ivmai@mail.ru>

* dyn_load.c (GC_register_dynamic_libraries): Always use
lpMaximumApplicationAddress value for WinCE (even for old
versions).
* os_dep.c (VER_PLATFORM_WIN32_CE): Define if not in winbase.h.
* os_dep.c (GC_dont_query_stack_min): New global variable (only if
WinCE and THREADS).
* os_dep.c (GC_setpagesize): Adjust lpMaximumApplicationAddress
for WinCE (prior to version 6) if not _WIN32_WCE_EMULATION; set
GC_dont_query_stack_min for older WinCE (prior to version 5).
* win32_threads.c (GC_dont_query_stack_min): Declare.
* win32_threads.c (GC_get_stack_min): Rename the macro to
GC_wince_evaluate_stack_min for WinCE; update the comment.
* win32_threads.c (GC_push_stack_for, GC_get_next_stack): Use
GC_wince_evaluate_stack_min() instead of GC_get_stack_min() for
WinCE and don't update thread's last_stack_min value (only if
GC_dont_query_stack_min).
* win32_threads.c (GC_push_stack_for): Skip assertion for WinCE if
GC_dont_query_stack_min (since the evaluated stack_min value may
be incorrect if the stack is bigger than 64 KiB).