18 Commits

Author SHA1 Message Date
Ivan Maidanski 6da20ac5b4 Fix more typos in comments and documentation
* alloc.c: Fix typo ("overflow").
* configure.ac: Fix typo ("optimization").
* doc/README.amiga: Fix typos ("also", "specific", "unnecessary").
* doc/README.cords: Fix typos ("descendants", "highlighted").
* ChangeLog: Fix typos ("[un]collectible").
* README.md: Likewise.
* dbg_mlc.c: Likewise.
* doc/README.hp: Likewise.
* doc/README.linux: Likewise.
* doc/gcdescr.html: Likewise.
* doc/gcinterface.html: Likewise.
* include/gc_mark.h: Likewise.
* include/gc_pthread_redirects.h: Likewise.
* include/new_gc_alloc.h: Likewise.
* include/private/dbg_mlc.h: Likewise.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* new_hblk.c: Likewise.
* ChangeLog: Fix typo ("multi-threaded").
* cord/cordxtra.c: Likewise.
* doc/debugging.html: Likewise.
* doc/gcinterface.html: Likewise.
* doc/leak.html: Likewise.
* doc/overview.html: Likewise.
* doc/simple_example.html: Likewise.
* include/gc_mark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* os_dep.c: Likewise.
* ptr_chck.c: Likewise.
* README.md: Fix typo ("pointer-free").
* allchblk.c: Likewise.
* doc/debugging.html: Likewise.
* doc/gcdescr.html: Likewise.
2013-07-11 12:44:35 +04:00
Ivan Maidanski 0ac46cc66e Eliminate 'missing exception specification' warning in gc_cpp.cc (Clang)
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW): Define new macro (if not defined
yet) for GCC v4.2+ (or clang).
* gc_cpp.cc: Include new (for std::bad_alloc) if
GC_NEW_DELETE_NEED_THROW.
* gc_cpp.cc (GC_DECL_NEW_THROW, GC_DECL_DELETE_THROW): New macros
(used to eliminate compiler "missing exception specification" warning
for 'new' and 'delete' operators).
* gc_cpp.cc (new, delete, new[], delete[]): Use
GC_DECL_NEW/DELETE_THROW to define 'throw' clause properly.
2012-08-30 18:01:57 +04:00
Ivan Maidanski b7717690fe Include "config.h" instead of "private/config.h" on HAVE_CONFIG_H
(Change the behavior of HAVE_CONFIG_H macro to the standard one
which assumes that no folder is specified in #include "config.h".)

* configure.ac (AM_CONFIG_HEADER): Replace include/private/config.h to
include/config.h.
* cord/cordbscs.c: Include "config.h" (instead of "private/config.h")
if HAVE_CONFIG_H defined.
* cord/cordprnt.c: Likewise.
* cord/cordxtra.c: Likewise.
* gc_cpp.cc: Likewise.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* real_malloc.c: Likewise.
* tests/disclaim_test.c: Likewise.
* tests/initsecondarythread.c: Likewise.
* tests/subthread_create.c: Likewise.
* tests/test.c: Likewise.
* tests/test_cpp.cc: Likewise.
* tests/thread_leak_test.c: Likewise.
* tests/threadkey_test.c: Likewise.
2012-08-30 15:35:26 +04:00
Ivan Maidanski 2ea2a650ec Reformat code of gc_cpp.cc/h
* gc_cpp.cc (new, new[], delete[]): Reformat code.
* include/gc_cpp.h (GCPlacement, gc, gc_cleanup, new, new[], delete,
cleanup): Likewise.
2011-12-26 10:22:29 +04:00
Ivan Maidanski f6bbc2a7e3 HOTFIX: Fix gc_cpp.cc for Cygwin (remove duplicate function definition).
* gc_cpp.cc (operator delete): Do not define for Cygwin since already
defined in include/gc_cpp.h file.
2011-09-13 14:42:15 +04:00
Ivan Maidanski 6451756248 Remove information about the authors from the source files.
(This information could be observed via "git log" or by looking into
the original version of a file.)

* Makefile.am: Remove original-author and modified-by information
(as well as a time-stamp) from the file header.
* configure.ac: Ditto.
* cord/cordbscs.c: Ditto.
* cord/cordprnt.c: Ditto.
* cord/cordxtra.c: Ditto.
* cord/de.c: Ditto.
* cord/de_cmds.h: Ditto.
* cord/de_win.h: Ditto.
* doc/README.arm.cross: Ditto.
* doc/doc.am: Ditto.
* dyn_load.c: Ditto.
* gc_cpp.cc: Ditto.
* gc_dlopen.c: Ditto.
* include/cord.h: Ditto.
* include/include.am: Ditto.
* include/private/cord_pos.h: Ditto.
* include/private/gc_hdrs.h: Ditto.
* include/weakpointer.h: Ditto.
* m4/gc_set_version.m4: Ditto.
* tests/test_cpp.cc: Ditto.
* cord/cordprnt.c: Fix a typo in a comment.
* AUTHORS: Add authors.
* cord/cordprnt.c: Expand all tabs to spaces; remove trailing spaces
at EOLn.
* cord/de.c: Ditto.
* cord/de_cmds.h: Ditto.
* cord/de_win.c: Ditto.
* cord/de_win.h: Ditto.
* doc/README.arm.cross: Ditto.
* include/private/cord_pos.h: Ditto.
* include/weakpointer.h: Ditto.
* m4/gc_set_version.m4: Ditto.
2011-08-25 00:16:06 +04:00
ivmai 2b8606bf1e 2009-10-19 Ivan Maidanski <ivmai@mail.ru>
* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
2011-07-26 21:06:51 +04:00
ivmai db2565100a 2009-09-16 Ivan Maidanski <ivmai@mail.ru>
* ChangeLog: Remove trailing spaces at EOLn; insert blank lines
	where missed.
	* doc/README: Expand all tabs to spaces; remove trailing spaces at
	EOLn; remove multiple trailing blank lines.
	* doc/README.autoconf: Ditto.
	* doc/README.DGUX386: Ditto.
	* doc/README.environment: Ditto.
	* doc/README.macros: Ditto.
	* doc/README.win32: Ditto.
	* tests/test.c: Ditto.
	* tests/test_cpp.cc: Ditto.
	* backgraph.c: Ditto.
	* blacklst.c: Ditto.
	* checksums.c: Ditto.
	* darwin_stop_world.c: Ditto.
	* dbg_mlc.c: Ditto.
	* dyn_load.c: Ditto.
	* finalize.c: Ditto.
	* gc_dlopen.c: Ditto.
	* gcj_mlc.c: Ditto.
	* headers.c: Ditto.
	* mach_dep.c: Ditto.
	* malloc.c: Ditto.
	* mallocx.c: Ditto.
	* new_hblk.c: Ditto.
	* obj_map.c: Ditto.
	* ptr_chck.c: Ditto.
	* real_malloc.c: Ditto.
	* reclaim.c: Ditto.
	* stubborn.c: Ditto.
	* thread_local_alloc.c: Ditto.
	* typd_mlc.c: Ditto.
	* gc_cpp.cc: Ditto.
	* include/gc_allocator.h: Ditto.
	* include/gc_backptr.h: Ditto.
	* include/gc_config_macros.h: Ditto.
	* include/gc_cpp.h: Ditto.
	* include/gc_gcj.h: Ditto.
	* include/gc_inline.h: Ditto.
	* include/gc_mark.h: Ditto.
	* include/gc_pthread_redirects.h: Ditto.
	* include/gc_typed.h: Ditto.
	* include/gc_version.h: Ditto.
	* include/javaxfc.h: Ditto.
	* include/new_gc_alloc.h: Ditto.
	* include/private/darwin_semaphore.h: Ditto.
	* include/private/dbg_mlc.h: Ditto.
	* include/private/gc_hdrs.h: Ditto.
	* include/private/gc_locks.h: Ditto.
	* include/private/gc_pmark.h: Ditto.
	* include/private/gcconfig.h: Ditto.
	* include/private/pthread_support.h: Ditto.
	* include/private/thread_local_alloc.h: Ditto.
	* darwin_stop_world.c: Add copyright header.
	* include/gc_backptr.h: Ditto.
	* include/gc_config_macros.h: Ditto.
	* include/gc_pthread_redirects.h: Ditto.
	* include/gc_version.h: Ditto.
	* include/javaxfc.h: Ditto.
	* include/private/darwin_semaphore.h: Ditto.
	* include/private/pthread_support.h: Ditto.
	* gc_cpp.cc: Make copyright header uniform across the package.
	* include/gc_cpp.h: Ditto.
2011-07-26 21:06:46 +04:00
ivmai d70b0280af 2009-09-16 Ivan Maidanski <ivmai@mail.ru> (really Petter Urkedal)
(gc_config_h_6a.patch with a minor correction)

	* include/private/gc_priv.h: Change include of config.h to
	private/config.h.
	* include/private/gc_pmark.h: Ditto.
	* gc_cpp.cc: Ditto.
	* tests/test.c: Ditto.
	* tests/test_cpp.cc: Include private/config.h (if HAVE_CONFIG_H);
	undefine GC_BUILD.
2011-07-26 21:06:46 +04:00
ivmai f9aaf5b9e7 2009-09-10 Ivan Maidanski <ivmai@mail.ru>
(diff116a, diff116b, diff116c)

	* Makefile.direct (GC_DLL): Add the comment for.
	* doc/README.macros: Fix a typo.
	* doc/README.macros (_DLL, GC_DLL, GC_NOT_DLL): Update info.
	* doc/README.macros (__STDC__): Remove info.
	* dbg_mlc.c (GC_get_back_ptr_info, GC_generate_random_heap_address,
	GC_generate_random_valid_address, GC_print_backtrace,
	GC_generate_random_backtrace, GC_register_describe_type_fn): Add
	GC_API and GC_CALL to function definition.
	* malloc.c (GC_generic_malloc): Ditto.
	* mallocx.c (GC_incr_bytes_allocd, GC_incr_bytes_freed): Ditto.
	* mark.c (GC_mark_and_push): Ditto.
	* misc.c (GC_new_free_list_inner, GC_new_free_list,
	GC_new_kind_inner, GC_new_kind, GC_new_proc_inner, GC_new_proc):
	Ditto.
	* include/gc_backptr.h (GC_get_back_ptr_info,
	GC_generate_random_heap_address, GC_generate_random_valid_address,
	GC_generate_random_backtrace, GC_print_backtrace): Add GC_API and
	GC_CALL to function prototype.
	* include/gc_mark.h (GC_mark_and_push, GC_new_free_list,
	GC_new_free_list_inner, GC_new_kind, GC_new_kind_inner,
	GC_new_proc, GC_new_proc_inner, GC_generic_malloc,
	GC_register_describe_type_fn): Ditto.
	* include/new_gc_alloc.h (GC_incr_bytes_allocd, GC_incr_mem_freed,
	GC_generic_malloc_words_small): Ditto.
	* gc_cpp.cc: Include "config.h" (if HAVE_CONFIG_H defined).
	* include/private/gc_pmark.h: Ditto.
	* include/private/gc_priv.h: Ditto.
	* tests/test.c: Ditto.
	* gc_cpp.cc: Define GC_BUILD.
	* include/private/gc_pmark.h: Ditto.
	* include/private/gc_priv.h: Ditto.
	* gc_dlopen.c (WRAP_FUNC, REAL_FUNC): New macro.
	* gc_dlopen.c (dlopen): Add GC_API to the wrapper function
	definition.
	* pthread_support.c (GC_pthread_create, GC_pthread_sigmask,
	GC_pthread_join, GC_pthread_detach, pthread_sigmask, pthread_join,
	pthread_detach, pthread_create): Ditto.
	* win32_threads.c (GC_pthread_join, GC_pthread_create,
	GC_pthread_sigmask, GC_pthread_detach): Ditto.
	* gc_dlopen.c (dlopen): Use WRAP_FUNC and REAL_FUNC macros.
	* include/gc_backptr.h: Include "gc.h".
	* include/gc_backptr.h: Use extern "C" for the exported functions.
	* include/gc_mark.h: Ditto.
	* include/gc_config_macros.h (GC_THREADS): Define the macro if any
	GC_XXX_THREADS is defined.
	* include/gc_config_macros.h (_PTHREADS, _POSIX4A_DRAFT10_SOURCE):
	Move the definitions below the place where GC_NETBSD_THREADS and
	GC_DGUX386_THREADS are defined.
	* include/gc_config_macros.h (GC_DLL): Don't define (even if _DLL
	is defined) for GCC.
	* include/gc_config_macros.h (GC_API): Define for Cygwin (in the
	same way as for VC++); define for GCC v4+ (other than already
	recognized MinGW/Cygwin) as a "default" visibility attribute if
	GC_DLL is defined.
	* include/gc_config_macros.h (GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE):
	New macro.
	* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
	GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
	GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
	GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
	GC_debug_malloc_atomic,	GC_debug_strdup,
	GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
	GC_debug_malloc_ignore_off_page,
	GC_debug_malloc_atomic_ignore_off_page,
	GC_debug_malloc_replacement): Add GC_ATTR_MALLOC attribute.
	* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
	GC_gcj_malloc_ignore_off_page): Ditto.
	* include/gc.h (GC_malloc, GC_malloc_atomic,
	GC_malloc_uncollectable, GC_malloc_stubborn,
	GC_malloc_atomic_uncollectable, GC_malloc_ignore_off_page,
	GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
	GC_debug_malloc_atomic, GC_debug_malloc_uncollectable,
	GC_debug_malloc_stubborn, GC_debug_malloc_ignore_off_page,
	GC_debug_malloc_atomic_ignore_off_page,
	GC_debug_malloc_replacement: Add GC_ATTR_ALLOC_SIZE attribute
	(for the first argument).
	* include/gc_gcj.h (GC_gcj_malloc, GC_debug_gcj_malloc,
	GC_gcj_malloc_ignore_off_page): Ditto.
	* include/gc.h (GC_memalign, GC_realloc, GC_debug_realloc,
	GC_debug_realloc_replacement): Add GC_ATTR_ALLOC_SIZE attribute
	(for the second argument).
	* include/gc.h (GC_malloc, GC_malloc_atomic, GC_strdup,
	GC_malloc_uncollectable, GC_malloc_stubborn, GC_memalign,
	GC_malloc_atomic_uncollectable, GC_free, GC_base, GC_size,
	GC_realloc, GC_expand_hp, GC_set_max_heap_size,
	GC_exclude_static_roots, GC_add_roots, GC_remove_roots,
	GC_register_displacement, GC_debug_register_displacement,
	GC_try_to_collect, GC_malloc_ignore_off_page,
	GC_malloc_atomic_ignore_off_page, GC_debug_malloc,
	GC_debug_malloc_atomic, GC_debug_strdup,
	GC_debug_malloc_uncollectable, GC_debug_malloc_stubborn,
	GC_debug_malloc_ignore_off_page,
	GC_debug_malloc_atomic_ignore_off_page, GC_debug_free,
	GC_debug_realloc, GC_debug_malloc_replacement,
	GC_debug_realloc_replacement, GC_finalization_proc,
	GC_register_finalizer, GC_debug_register_finalizer,
	GC_register_finalizer_ignore_self,
	GC_debug_register_finalizer_ignore_self,
	GC_register_finalizer_no_order,
	GC_debug_register_finalizer_no_order,
	GC_register_finalizer_unreachable,
	GC_debug_register_finalizer_unreachable,
	GC_register_disappearing_link,
	GC_general_register_disappearing_link,
	GC_unregister_disappearing_link, GC_noop1, GC_warn_proc,
	GC_set_warn_proc, GC_ignore_warn_proc, GC_fn_type,
	GC_call_with_alloc_lock, GC_stack_base_func,
	GC_call_with_stack_base, GC_same_obj, GC_pre_incr, GC_post_incr,
	GC_is_visible, GC_is_valid_displacement, GC_same_obj_print_proc,
	GC_is_valid_displacement_print_proc, GC_is_visible_print_proc,
	GC_malloc_many, GC_CreateThread, GC_beginthreadex,
	GC_endthreadex): Comment out (or remove if single and meaningless)
	function argument names (to avoid identifiers out of the name
	space).
	* include/gc_gcj.h (GC_init_gcj_malloc, GC_gcj_malloc,
	GC_debug_gcj_malloc, GC_gcj_malloc_ignore_off_page): Ditto.
	* include/gc.h (GC_try_to_collect): Update the comment.
	* include/gc.h (GC_size, GC_register_my_thread): Add const
	qualifier for the argument referent.
	* misc.c (GC_size): Ditto.
	* pthread_support.c (GC_register_my_thread_inner,
	GC_register_my_thread): Ditto.
	* win32_threads.c (GC_register_my_thread_inner,
	GC_register_my_thread): Ditto.
	* include/gc.h (GC_INIT_CONF_ROOTS): New macro for internal use
	(define instead of GC_INIT() for Cygwin and AIX).
	* include/gc.h (GC_DONT_EXPAND, GC_MAX_RETRIES,
	GC_FREE_SPACE_DIVISOR, GC_FULL_FREQ, GC_TIME_LIMIT, GC_IGNORE_WARN,
	GC_INITIAL_HEAP_SIZE): Recognize new macro.
	* include/gc.h (GC_INIT_CONF_DONT_EXPAND, GC_INIT_CONF_MAX_RETRIES,
	GC_INIT_CONF_FREE_SPACE_DIVISOR, GC_INIT_CONF_FULL_FREQ,
	GC_INIT_CONF_TIME_LIMIT, GC_INIT_CONF_IGNORE_WARN,
	GC_INIT_CONF_INITIAL_HEAP_SIZE): New macro for internal use.
	* include/gc.h (GC_INIT): Use GC_INIT_CONF_XXX macros.
	* include/gc_mark.h: Prefix GC_H with '_'.
	* include/gc_mark.h (GC_least_plausible_heap_addr,
	GC_greatest_plausible_heap_addr, GC_debug_header_size): Use GC_API
	for the public variable declaration.
	* include/new_gc_alloc.h (GC_objfreelist_ptr, GC_aobjfreelist_ptr,
	GC_uobjfreelist_ptr, GC_auobjfreelist_ptr): Ditto.
	* include/gc_pthread_redirects.h (GC_pthread_create,
	GC_pthread_sigmask, GC_dlopen, GC_pthread_join, GC_pthread_detach):
	Use GC_API for the wrapper prototype.
	* include/gc_pthread_redirects.h (pthread_create, pthread_join,
	pthread_detach, pthread_sigmask, dlopen): Undefine unconditionally
	before redirecting.
	* include/new_gc_alloc.h: Replace GC_incr_mem_freed() with
	GC_incr_bytes_freed(); remove FIXME.
	* include/private/gc_priv.h (GC_make_closure,
	GC_debug_invoke_finalizer, GC_noop): Remove GC_API for the private
	function.
	* tests/test.c (GC_print_stats): Handle GC_DLL case regardless of
	the target.
2011-07-26 21:06:46 +04:00
hboehm 68b9f2740e 2008-07-25 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Ivan Maidanski)
Ivan's description of the patch follows. Note that a few pieces like
	the GC_malloc(0) patch, were not applied since an alternate had been
	previously applied.  A few differed stylistically from the rest of
	the code (mostly casts to void * instead of target type),
	or were classified as too minor to bother.  Note that
	all of Ivan's static declarations which did not correct outright
	naming bugs (as a few did), where replaced by STATIC, which is
	ignored by default.

        - minor bug fixing (for FreeBSD, for THREAD_LOCAL_ALLOC and for
	  GC_malloc(0));
        - addition of missing getter/setter functions for public variables
	  (may be useful if compiled as Win32 DLL);
        - addition of missing GC_API for some exported functions;
        - addition of missing "static" declarator for internal functions
	   and variables (where possible);
        - replacement of all remaining K&R-style definitions with ANSI
	  C ones (__STDC__ macro is not used anymore);
        - addition of some Win32 macro definitions (that may be missing in
	  the standard headers supplied with a compiler) for GWW_VDB mode;
        - elimination of most compiler warnings (except for
	  "uninitialized data" warning);
        - several typos correction;
        - missing parenthesis addition in macros in some header files of
	  "libatomic_ops" module.

	My highlights based on reading the patch:

	* allchblk.c: Remove GC_freehblk_ptr decl.
	Make free_list_index_of() static.
	* include/gc.h: Use __int64 on win64, define GC_oom_func,
	GC_finalizer_notifier_proc, GC_finalizer_notifier_proc,
	add getter and setters: GC_get_gc_no, GC_get_parallel,
	GC_set_oom_fn, GC_set_finalize_on_demand,
	GC_set_java_finalization, GC_set_dont_expand,
	GC_set_no_dls, GC_set_max_retries, GC_set_dont_precollect,
	GC_set_finalizer_notifier.  Always define GC_win32_free_heap.
	gc_config_macros.h: Define _REENTRANT after processing
	GC_THREADS.
	* include/gc_cpp.h: Improve GC_PLACEMENT_DELETE test,
	handling of operator new[] for old Windows compilers.
	* include/gc_inline.h (GC_MALLOC_FAST_GRANS): Add parentheses
	around arguments.
	* dbg_mlc.c, malloc.c, misc.c: Add many GC_API specs.
	* mark.c (GC_mark_and_push_stack): Fix source argument for
	blacklist printing.
	* misc.c: Fix log file naming based on environment variable
	for Windows.  Make GC_set_warn_proc and GC_set_free_space_divisor
	just return current value with 0 argument.  Add DONT_USER_USER32_DLL.
	Add various getters and setters as in gc.h.
	* os_dep.c: Remove no longer used GC_disable/enable_signals
	implementations.  (GC_get_stack_base): Add pthread_attr_destroy
	call.  No longer set GC_old_bus_handler in DARWIN workaround.
	* pthread_support.c: GC_register_my_thread must also
	call GC_init_thread_local.
2011-07-26 21:06:43 +04:00
hboehm d564f15789 2007-12-18 Hans Boehm <Hans.Boehm@hp.com>
* gc_cpp.cc: Don't include gc_cpp.h from local directory.

2007-12-18  Hans Boehm <Hans.Boehm@hp.com> (really Adam Megacz)

	* allchblk.c, configure.ac (add --enable-munmap)
	* configure: Regenerate.
2011-07-26 21:06:41 +04:00
hboehm e740040e62 2006-04-12 Hans Boehm <Hans.Boehm@hp.com> (Really mostly Andrei Polushin.)
* Makefile, Makefile.am, Makefile.direct, NT_MAKEFILE,
	NT_STATIC_THREADS_MAKEFILE, NT_THREADS_MAKEFILE, gc.mak,
	msvc_dbg.c, include/private/msvc_dbg.h:
	Add msvc_dbg.c, include/private/msvc_dbg.h.
	* Makefile.am, configure.ac: Simplify solaris threads handling.
	* gc_cpp.cc: Add another msft-specific new operator.
	* misc.c: Use per executable log-file location.
	* os_dep.c: Improve GetWriteWatch handling (incomplete).
	Support stack traces for MSVC++.
	* configure, Makefile.in: Regenerate.
	* include/gc_allocator.h: Add <new> include, more PTRFREE decls,
	MSVC++ 6 support.
2011-07-26 21:06:36 +04:00
Ivan Maidanski f3632431e7 gc6.1 tarball import 2011-07-26 17:08:53 +04:00
Ivan Maidanski 3313dcc53d gc6.1alpha4 tarball import 2011-07-26 17:07:21 +04:00
Ivan Maidanski 9f27ae7aee gc6.0 tarball import 2011-07-26 17:03:41 +04:00
Ivan Maidanski c521d2cf16 gc4.13 tarball import 2011-07-26 15:20:24 +04:00
Ivan Maidanski acf2e57f20 gc4.8 tarball import 2011-07-26 14:51:28 +04:00