| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(refactoring)
* extra/msvc_dbg.c [!_M_ARM && !_M_ARM64 && !_M_X64 && _MSC_VER]:
Include "gc/gc.h" instead of "gc.h".
* gc_badalc.cc: Likewise.
* gc_cpp.cc: Likewise.
* include/private/gc_alloc_ptrs.h: Likewise.
* include/private/gc_atomic_ops.h [GC_BUILTIN_ATOMIC]: Likewise.
* include/private/gc_priv.h [!GC_H]: Likewise.
* gc_cpp.cc: Include "gc/gc_cpp.h" instead of "gc_cpp.h".
* include/private/gcconfig.h: Change include gc.h to include gc/gc.h
in comment.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(reformatting)
* CMakeLists.txt: Remove an extra space after comma in license header
comment.
* Makefile.am: Likewise.
* allchblk.c: Likewise.
* alloc.c: Likewise.
* backgraph.c: Likewise.
* blacklst.c: Likewise.
* checksums.c: Likewise.
* configure.ac: Likewise.
* cord/cordbscs.c: Likewise.
* cord/cordprnt.c: Likewise.
* cord/cordxtra.c: Likewise.
* cord/tests/cordtest.c: Likewise.
* cord/tests/de.c: Likewise.
* cord/tests/de_cmds.h: Likewise.
* cord/tests/de_win.c: Likewise.
* cord/tests/de_win.h: Likewise.
* cord/tests/de_win.rc: Likewise.
* darwin_stop_world.c: Likewise.
* dbg_mlc.c: Likewise.
* dyn_load.c: Likewise.
* extra/gc.c: Likewise.
* extra/msvc_dbg.c: Likewise.
* extra/pcr_interface.c: Likewise.
* extra/real_malloc.c: Likewise.
* finalize.c: Likewise.
* fnlz_mlc.c: Likewise.
* gc_badalc.cc: Likewise.
* gc_cpp.cc: Likewise.
* gc_dlopen.c: Likewise.
* gcj_mlc.c: Likewise.
* headers.c: Likewise.
* include/gc/cord.h: Likewise.
* include/gc/cord_pos.h: Likewise.
* include/gc/ec.h: Likewise.
* include/gc/gc.h: Likewise.
* include/gc/gc_backptr.h: Likewise.
* include/gc/gc_config_macros.h: Likewise.
* include/gc/gc_disclaim.h: Likewise.
* include/gc/gc_gcj.h: Likewise.
* include/gc/gc_inline.h: Likewise.
* include/gc/gc_mark.h: Likewise.
* include/gc/gc_pthread_redirects.h: Likewise.
* include/gc/gc_tiny_fl.h: Likewise.
* include/gc/gc_typed.h: Likewise.
* include/gc/gc_version.h: Likewise.
* include/gc/javaxfc.h: Likewise.
* include/gc/leak_detector.h: Likewise.
* include/include.am: Likewise.
* include/private/darwin_semaphore.h: Likewise.
* include/private/darwin_stop_world.h: Likewise.
* include/private/dbg_mlc.h: Likewise.
* include/private/gc_alloc_ptrs.h: Likewise.
* include/private/gc_atomic_ops.h: Likewise.
* include/private/gc_hdrs.h: Likewise.
* include/private/gc_locks.h: Likewise.
* include/private/gc_pmark.h: Likewise.
* include/private/gc_priv.h: Likewise.
* include/private/gcconfig.h: Likewise.
* include/private/pthread_stop_world.h: Likewise.
* include/private/pthread_support.h: Likewise.
* include/private/specific.h: Likewise.
* include/private/thread_local_alloc.h: Likewise.
* m4/gc_set_version.m4: Likewise.
* mach_dep.c: Likewise.
* malloc.c: Likewise.
* mallocx.c: Likewise.
* mark.c: Likewise.
* mark_rts.c: Likewise.
* misc.c: Likewise.
* new_hblk.c: Likewise.
* obj_map.c: Likewise.
* os_dep.c: Likewise.
* pthread_start.c: Likewise.
* pthread_stop_world.c: Likewise.
* pthread_support.c: Likewise.
* ptr_chck.c: Likewise.
* reclaim.c: Likewise.
* specific.c: Likewise.
* tests/atomicops.c: Likewise.
* tests/cpp.cc: Likewise.
* tests/disclaim.c: Likewise.
* tests/disclaim_bench.c: Likewise.
* tests/gctest.c: Likewise.
* tests/tests.am: Likewise.
* tests/weakmap.c: Likewise.
* thread_local_alloc.c: Likewise.
* tools/setjmp_t.c: Likewise.
* tools/threadlibs.c: Likewise.
* typd_mlc.c: Likewise.
* win32_threads.c: Likewise.
* LICENSE: Remove an extra space after comma in license terms.
|
|
|
|
|
|
|
|
|
|
| |
Issue #331 (bdwgc).
The copyright message in these 2 files was different from the BDWGC
default one (e.g. see that in malloc.c) by a mistake.
* cord/tests/de_win.rc: Alter copyright to match that of de_win.c.
* gc_cpp.cc: Alter copyright to match that of gc_cpp.h.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* gc_badalc.cc: Do not include gc_cpp.h.
* gc_cpp.cc: Remove GC_NOEXCEPT in comment for an include.
* include/gc_allocator.h [!GC_ATTR_EXPLICIT] (GC_ATTR_EXPLICIT): Do
not define.
* include/gc_allocator.h [!GC_NOEXCEPT] (GC_NOEXCEPT): Likewise.
* include/gc_cpp.h [!GC_NOEXCEPT] (GC_NOEXCEPT): Likewise.
* tests/test_cpp.cc [!GC_ATTR_EXPLICIT] (GC_ATTR_EXPLICIT): Likewise.
* include/gc_config_macros.h [__cplusplus && !GC_ATTR_EXPLICIT]
(GC_ATTR_EXPLICIT): Define macro (moved from gc_allocator.h).
* include/gc_config_macros.h [__cplusplus && !GC_NOEXCEPT]
(GC_NOEXCEPT): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #314 (bdgwc).
MS VC defines __cplusplus to 199711L by default (unless /Zc:__cplusplus
is passed to the compiler).
* gc_cpp.cc [GC_NEW_DELETE_NEED_THROW && _MSVC_LANG>=201703]
(GC_DECL_NEW_THROW): Define to noexcept(false) instead of
throw(bad_alloc).
* gc_cpp.cc [!_MSC_VER && !__DMC__ || GC_NO_INLINE_STD_NEW]: Change
__cplusplus>201103 to __cplusplus>=201402.
* include/gc_cpp.h [!GC_NO_INLINE_STD_NEW && (_MSC_VER || __DMC__
|| (__BORLANDC__ || __CYGWIN__ || __CYGWIN32__ || __MINGW32__
|| __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL)]: Likewise.
* gc_cpp.cc [(!_MSC_VER && !__DMC__ || GC_NO_INLINE_STD_NEW)
&& _MSVC_LANG>=201402] (delete(void*,size_t)): Define.
* gc_cpp.cc [(!_MSC_VER && !__DMC__ || GC_NO_INLINE_STD_NEW)
&& _MSVC_LANG>=201402 && GC_OPERATOR_NEW_ARRAY && !CPPCHECK]
(delete[](void*,size_t)): Likewise.
* include/gc_cpp.h [!GC_NO_INLINE_STD_NEW && (_MSC_VER || __DMC__
|| (__BORLANDC__ || __CYGWIN__ || __CYGWIN32__ || __MINGW32__
|| __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL) && _MSVC_LANG>=201402]
(delete(void*,size_t)): Likewise.
* include/gc_cpp.h [!GC_NO_INLINE_STD_NEW && (_MSC_VER || __DMC__
|| (__BORLANDC__ || __CYGWIN__ || __CYGWIN32__ || __MINGW32__
|| __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL) && _MSVC_LANG>=201402
&& GC_OPERATOR_NEW_ARRAY] (delete[](void*,size_t)): Likewise.
* include/gc_allocator.h [!GC_ATTR_EXPLICIT && _MSVC_LANG>=201103]
(GC_ATTR_EXPLICIT): Define to "explicit" instead of empty.
* tests/test_cpp.cc [!GC_ATTR_EXPLICIT && _MSVC_LANG>=201103]
(GC_ATTR_EXPLICIT): Likewise.
* include/gc_allocator.h [!GC_NOEXCEPT && _MSC_VER
&& !(_HAS_EXCEPTIONS && !_HAS_EXCEPTIONS) && _MSVC_LANG>=201103]
(GC_NOEXCEPT): Define to noexcept instead of throw().
* include/gc_cpp.h [!GC_NOEXCEPT && _MSC_VER && !(_HAS_EXCEPTIONS
&& !_HAS_EXCEPTIONS) && _MSVC_LANG>=201103] (GC_NOEXCEPT): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #268 (bdgwc).
* CMakeLists.txt [enable_cplusplus] (gccpp): Add gc_badalc.cc library
source file.
* Makefile.am [CPLUSPLUS] (libgccpp_la_SOURCES): Likewise.
* Makefile.am (EXTRA_DIST): Add gc_badalc.cpp.
* Makefile.direct (SRCS): Add gc_badalc.cc.
* Makefile.direct (gc_badalc.o): New target.
* NT_MAKEFILE (gc_badalc.obj): Likewise.
* WCC_MAKEFILE (gc_badalc.obj): Likewise.
* digimars.mak (gc_badalc.obj): Likewise.
* build/s60v3/libgc.mmp (SOURCE): Mention gc_badalc.cpp (commented out).
* Makefile.direct (c++): Add dependency on gc_badalc.o; pass gc_badalc.o
to ru tool.
* NT_MAKEFILE (gccpp.lib): Add dependency on gc_badalc.obj; pass
gc_badalc.obj to lib or link tool.
* WCC_MAKEFILE (gccpp.lib, gccpp.dll): Likewise.
* digimars.mak (OBJS): Add gc_badalc.obj.
* doc/README.Mac (Files to build the GC libraries): Add gc_badalc.cc.
* doc/gcinterface.md (C++ Interface): Mention gc_badalc.cc file.
* gc_badalc.cc: New file.
* gc_badalc.cpp: Likewise.
* gc_cpp.cc (GC_throw_bad_alloc): Move to gc_badalc.cc.
* gc_cpp.cc (GC_ALLOCATOR_THROW_OR_ABORT): Add comment; do not define
unless GC_NO_INLINE_STD_NEW, or not _MSC_VER and not __DMC__.
* tests/tests.am [CPLUSPLUS && AVOID_CPP_LIB] (test_cpp_LDADD): Add
gc_badalc.o.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit 3d784ed)
* doc/README.macros (GC_NO_INLINE_STD_NEW): Document.
* gc_cpp.cc [(_MSC_VER || __DMC__) && GC_NO_INLINE_STD_NEW
&& GC_NEW_DELETE_NEED_THROW] (GC_DECL_NEW_THROW): Define.
* gc_cpp.cc [(_MSC_VER || __DMC__) && GC_NO_INLINE_STD_NEW]
(operator new, operator delete): Likewise.
* include/gc_cpp.h [_MSC_VER || __DMC__ || (__BORLANDC__ || __CYGWIN__
|| __MINGW32__ || __WATCOMC__) && !GC_BUILD && !GC_NOT_DLL]
(operator new, operator delete): Do not define inline function if
GC_NO_INLINE_STD_NEW.
* gc_cpp.cc [GC_NO_INLINE_STD_NEW && _MSC_VER] (operator new,
operator delete): Declare; move comment.
|
|
|
|
|
| |
* gc_cpp.cc: Rename gc_c++.h to gc_cpp.h in the head comment.
* tests/test_cpp.cc: Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #287 (bdwgc).
Before this patch, clang 8 (and -std=c++1z) fails for gc_cpp.cc.
The error message produced is: ISO C++17 does not allow dynamic
exception specifications.
The "dynamic exception" syntax was declared deprecated in C++11 and
removed in C++17.
* gc_cpp.cc [!_MSC_VER && !__DMC__ && GC_NEW_DELETE_NEED_THROW
&& __cplusplus >= 201703L] (GC_DECL_NEW_THROW): Define to
noexcept(false); add comment.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* gc_cpp.cc (GC_DONT_INCL_WINDOWS_H): Define macro before include gc.h.
* tests/test_cpp.cc (GC_DONT_INCL_WINDOWS_H): Likewise.
* include/gc.h [GC_WIN32_THREADS && (!GC_PTHREADS || GC_BUILD
|| GC_WINDOWS_H_INCLUDED) && (!GC_NO_THREAD_DECLS || GC_BUILD)]:
If GC_DONT_INCL_WINDOWS_H then do not include process.h, windows.h,
and do not declare GC_CreateThread, GC_ExitThread, GC_DllMain,
GC_beginthreadex, GC_endthreadex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit cb1194d17)
* gc_cpp.cc: Include gc.h (before "new") and "new" standard header
(before gc_cpp.h).
* gc_cpp.cc (GC_ALLOCATOR_THROW_OR_ABORT): New macro (the same
definition as in gc_allocator.h).
* gc_cpp.cc (GC_throw_bad_alloc): New API function definition.
* gc_cpp.cc [!GC_NEW_DELETE_THROW_NOT_NEEDED]
(GC_NEW_DELETE_NEED_THROW): Do not define if _MSC_VER or __DMC__.
* gc_cpp.cc [!_MSC_VER && !__DMC__] (new, new[]): Replace
GC_OP_NEW_OOM_CHECK(obj) to if(!obj)GC_ALLOCATOR_THROW_OR_ABORT().
* gc_cpp.h: Include "new" standard header only if GC_INCLUDE_NEW
and !GC_NEW_ABORTS_ON_OOM and !_LIBCPP_NO_EXCEPTIONS.
* gc_cpp.h [!GC_NEW_ABORTS_ON_OOM && !_LIBCPP_NO_EXCEPTIONS
&& !GC_INCLUDE_NEW] (GC_throw_bad_alloc): Declare API function.
* gc_cpp.h [!GC_NEW_ABORTS_ON_OOM && !_LIBCPP_NO_EXCEPTIONS
&& !GC_INCLUDE_NEW] (GC_OP_NEW_OOM_CHECK): Call GC_throw_bad_alloc()
instead of throw std::bad_alloc; do not use do-while(0) (to eliminate
VC++ warning that the expression is always false).
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit cb1194d17)
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW, GC_DECL_NEW_THROW): Move from
gc_cpp.h.
* include/gc_cpp.h (gc::new, new): Remove GC_DECL_NEW_THROW specifier.
* include/gc_cpp.h [GC_OPERATOR_NEW_ARRAY] (gc::new[], new[]):
Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* gc_cpp.cc [!_MSC_VER && !__DMC__] (delete, delete[]): Rename
GC_DECL_DELETE_THROW to GC_NOEXCEPT.
* include/gc_cpp.h: Always include "new" header.
* include/gc_cpp.h [!GC_NEW_DELETE_THROW_NOT_NEEDED]
(GC_NEW_DELETE_NEED_THROW): Do not define if __BORLANDC__ or _MSC_VER,
or __WATCOMC__, or if __cplusplus>=201103L and !__clang__.
* include/gc_cpp.h (GC_DECL_DELETE_THROW): Remove.
* include/gc_cpp.h [!GC_NOEXCEPT] (GC_NOEXCEPT): Define internal macro
to except or throw(), or nothing (same as that in gc_allocator.h).
* include/gc_cpp.h [!GC_NEW_ABORTS_ON_OOM] (GC_NEW_ABORTS_ON_OOM):
Define if GC_NOEXCEPT is defined to nothing.
* include/gc_cpp.h (new(size_t,void*), new[](size_t,void*), delete):
Add GC_NOEXCEPT.
|
|
|
|
|
|
|
|
| |
* gc_cpp.cc (new, delete, new[], delete[]): Do not define if __DMC__.
* include/gc_cpp.h (new[], delete[], new, delete): Define also if
__DMC__.
* include/gc_cpp.h [_MSC_VER] (new[], delete[]): Replace _MSC_VER>1020
to defined(GC_OPERATOR_NEW_ARRAY).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now, in case of the allocation failure, new and new[] operators throw
bad_alloc (or abort the application if an ancient compiler is used).
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW): Remove.
* gc_cpp.cc (GC_DECL_NEW_THROW, GC_DECL_DELETE_THROW): Move macro
definition to gc_cpp.h.
* gc_cpp.cc [GC_NEW_DELETE_NEED_THROW]: Do not include "new" header.
* gc_cpp.cc [!_MSC_VER] (operator new): Call GC_OP_NEW_OOM_CHECK() for
the allocation result.
* gc_cpp.cc [!_MSC_VER && GC_OPERATOR_NEW_ARRAY && !CPPCHECK]
(operator new[]): Likewise.
* include/gc.h (GC_abort_on_oom): Declare new API function.
* include/gc_cpp.h [!GC_NEW_DELETE_THROW_NOT_NEEDED
&& (GC_GNUC_PREREQ(4,2) || __BORLANDC__>=0x0550 || _MSC_VER>1020
|| __WATCOMC__>=1050)] (GC_NEW_DELETE_NEED_THROW):
Define macro.
* include/gc_cpp.h [GC_NEW_DELETE_NEED_THROW]: Include "new" header.
* include/gc_cpp.h (GC_OP_NEW_OOM_CHECK): New internal macro (throws
bad_alloc or cals GC_abort_on_oom).
* include/gc_cpp.h (gc::new(size_t), gc::new(size_t,GCPlacement), new):
Add GC_DECL_NEW_THROW; call GC_OP_NEW_OOM_CHECK() for the allocation
result.
* include/gc_cpp.h [GC_OPERATOR_NEW_ARRAY] (gc::new[](size_t),
gc::new[](size_t,GCPlacement, new[]): Likewise.
* misc.c (GC_abort_on_oom): Implement function.
* tests/test.c [CPPCHECK] (main): Call UNTESTED(GC_abort_on_oom).
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Issue #195 (bdwgc).
Sized variants of global operator delete should be defined along with
the non-sized ones. Otherwise compiler might invoke the one from the
standard library (as observed in e.g. Cygwin) leading to a crash.
* gc_cpp.cc [!_MSC_VER && __cplusplus>201103L] (operator delete):
Define sized variant (the size argument is ignored for now).
* gc_cpp.cc [!_MSC_VER && __cplusplus>201103L && GC_OPERATOR_NEW_ARRAY
&& !CPPCHECK] (operator delete[]): Likewise.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* cord/cordxtra.c (CORD_ATTR_UNUSED): Use GC_GNUC_PREREQ() instead of
direct use of __GNUC[_MINOR]__.
* gc_cpp.cc (GC_NEW_DELETE_NEED_THROW): Likewise.
* include/gc_config_macros.h (GC_API, GC_ATTR_MALLOC, GC_ATTR_ALLOC_SIZE,
GC_ATTR_NONNULL, GC_ATTR_DEPRECATED, GC_RETURN_ADDR,
GC_RETURN_ADDR_PARENT, GC_PTHREAD_EXIT_ATTRIBUTE): Likewise.
* include/gc_cpp.h (GC_NO_OPERATOR_NEW_ARRAY): Likewise.
* include/gc_inline.h (GC_EXPECT, GC_PREFETCH_FOR_WRITE): Likewise.
* include/new_gc_alloc.h: Likewise.
* include/private/gc_priv.h (GC_INNER, GC_ATTR_UNUSED, EXPECT, GC_INLINE,
GC_ATTR_NOINLINE, GC_API_OSCALL, GC_ATTR_FORMAT_PRINTF,
NONNULL_ARG_NOT_NULL): Likewise.
* include/private/gc_priv.h [CANCEL_SAFE] (GC_cancel_disable_count):
Likewise.
* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT, PREFETCH,
GC_PREFETCH_FOR_WRITE): Likewise.
* include/private/gcconfig.h [I386 && LINUX && __ELF__]
(GC_NO_SIGSETJMP): Likewise.
* include/private/gcconfig.h [X86_64 && MSWIN32] (MPROTECT_VDB):
Likewise.
* include/private/thread_local_alloc.h [CYGWIN32] (USE_PTHREAD_SPECIFIC):
Likewise.
* include/private/thread_local_alloc.h [LINUX && !ARM32 && !AVR32
|| PLATFORM_ANDROID && !__clang__] (USE_COMPILER_TLS): Likewise.
* mark.c [MSWIN32 || MSWINCE] (GC_mark_some): Likewise.
* mark_rts.c (GC_approx_sp): Likewise.
* tests/test_cpp.cc (ATTR_UNUSED): Likewise.
* tools/setjmp_t.c (nested_sp): Likewise.
* include/gc_config_macros.h (GC_GNUC_PREREQ): New macro (not for
public use).
* include/private/gc_priv.h (GC_CLANG_PREREQ): New private macro.
* include/private/gcconfig.h (HAVE_BUILTIN_UNWIND_INIT): Refine comment.
* include/private/thread_local_alloc.h [LINUX && !ARM32 && !AVR32
|| PLATFORM_ANDROID && !__clang__] (USE_COMPILER_TLS): Use
GC_CLANG_PREREQ() instead of direct use of __clang_major__ and
__clang_minor__.
* mark.c [MSWIN32 || MSWINCE] (GC_mark_some): Likewise.
|
|
|
|
|
| |
* gc_cpp.cc [!_MSC_VER && GC_OPERATOR_NEW_ARRAY] (operator new[],
operator delete[]): Do not define if CPPCHECK.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix commits 83e0a2c, 3379238)
This commit also eliminates
"operator delete is missing exception specification throw()" compiler
warning.
* gc_cpp.cc (operator delete): Define unconditionally (i.e. for Cygwin
too).
* include/gc_cpp.h [__CYGWIN__]: Do not include "new" header.
* include/gc_cpp.h [__CYGWIN__] (operator delete): Remove (as
replacement function 'operator delete' cannot be declared 'inline').
|
|
|
|
|
|
|
|
|
|
| |
* include/gc_cpp.h: Reformat code (and comments).
* gc_cpp.cc: Likewise.
* include/gc_cpp.h (operator new): Replace if-then-else with switch.
Conflicts:
include/gc_cpp.h
|
|
|
|
|
|
|
|
|
|
|
| |
(revert part of commit 3d784ed)
* gc_cpp.cc (new, delete, new[], delete[]): Add definition (unless
_MSC_VER defined).
Conflicts:
gc_cpp.cc
|
|
|
|
|
|
|
|
|
|
|
|
| |
(code refactoring)
* gc_cpp.cc: Remove commented out code.
* include/gc_cpp.h: Likewise.
Conflicts:
gc_cpp.cc
include/gc_cpp.h
|
|
|
|
|
|
|
|
|
| |
otherwise vc9 will mix up new and delete operators (due to arbitrary ordering during linking)
Conflicts:
gc_cpp.cc
include/gc_cpp.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
| |
* gc_cpp.cc (new, new[], delete[]): Reformat code.
* include/gc_cpp.h (GCPlacement, gc, gc_cleanup, new, new[], delete,
cleanup): Likewise.
|
|
|
|
|
| |
* gc_cpp.cc (operator delete): Do not define for Cygwin since already
defined in include/gc_cpp.h file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
| |
* gc_cpp.cc: Include "gc_cpp.h" instead of <gc_cpp.h>.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
| |
|
| |
|
| |
|
|
|