| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit 84b695d01)
Issue #206 (bdwgc).
* os_dep.c [ADDRESS_SANITIZER && (UNIX_LIKE || NEED_FIND_LIMIT
|| MPROTECT_VDB) && !CUSTOM_ASAN_DEF_OPTIONS] (__asan_default_options):
Add the declaration wrapped into EXTERN_C_BEGIN.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 2dff48cb3 from 'release-8_2')
Issue #257 (bdwgc).
* alloc.c (GC_collect_a_little_inner): Call GC_mark_some() (in a loop)
even if GC_dont_gc.
* alloc.c (GC_collect_a_little, GC_allocobj): Do not call
GC_collect_a_little_inner() if GC_dont_gc.
* tests/test.c (check_heap_stats): Do not call GC_collect_a_little()
(repeatedly) if GC_is_disabled().
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit d1bc109ec from 'master')
* include/gc_cpp.h [GC_INCLUDE_NEW]: Include <new> right after
include gc.h (regardless of GC_NEW_ABORTS_ON_OOM and
_LIBCPP_NO_EXCEPTIONS).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit d1aa5274a from 'release-8_2')
The client should keep a pointer within the first heap block for such
an allocated object. Previously, it was mentioned in the documentation
and comments that such a pointer should be within the first 256 or 512
bytes.
* README.md (The C Interface to the Allocator): Fix the description
(comment) of GC_malloc_ignore_off_page (the client promises to keep
a pointer within the first hblk of the object instead of 256 or 512
bytes, or a page).
* doc/gcinterface.md (GC_MALLOC_IGNORE_OFF_PAGE): Likewise.
* doc/gc.man (GC_malloc_atomic_ignore_off_page): Likewise.
* include/gc.h (GC_malloc_ignore_off_page): Likewise.
* include/gc_mark.h (GC_generic_malloc_ignore_off_page): Likewise.
* include/private/gc_priv.h (IGNORE_OFF_PAGE): Likewise.
* include/private/gc_priv.h [DBG_HDRS_ALL || GC_GCJ_SUPPORT
|| !GC_NO_FINALIZATION] (GC_generic_malloc_inner_ignore_off_page):
Likewise.
* malloc.c [DBG_HDRS_ALL || GC_GCJ_SUPPORT || !GC_NO_FINALIZATION]
(GC_generic_malloc_inner_ignore_off_page): Likewise.
* include/gc_gcj.h (GC_gcj_malloc_ignore_off_page): Refine comment.
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 223ce4fdf from 'master')
* typd_mlc.c (GC_calloc_explicitly_typed): If descr_type is NO_MEM then
return the result of GC_get_oom_fn()(lb) instead of NULL.
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit d4c4a7ba5 from 'master')
* fnlz_mlc.c [ENABLE_DISCLAIM] (GC_register_disclaim_proc): Do not
check that proc is non-zero.
* include/gc_disclaim.h (GC_register_disclaim_proc): Remove
GC_ATTR_NONNULL(2) attribute.
* reclaim.c [ENABLE_DISCLAIM] (GC_disclaim_and_reclaim): Add assertion
that disclaim is non-zero.
|
|
|
|
|
| |
* include/private/gc_pmark.h [ENABLE_TRACE] (TRACE_TARGET): Do not
dereference GC_trace_addr if it is not a pointer to a heap object.
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 4d83569d5 from 'master')
* tests/test.c [GC_GCJ_SUPPORT] (gcj_cons): Increment
collectable_count.
|
|
|
|
|
|
|
|
|
|
|
| |
EXTRA_BYTES should be always counted when updating GC_bytes_allocd.
* malloc.c (GC_generic_malloc_inner): Define lb_adjusted local
variable and set it to ADD_SLOP(lb); increment GC_bytes_allocd by
lb_adjusted instead of lb (in case of a non-small object).
* malloc.c [DBG_HDRS_ALL || GC_GCJ_SUPPORT || !GC_NO_FINALIZATION]
(GC_generic_malloc_inner_ignore_off_page): Change type of lb_adjusted
local variable from word to size_t.
|
|
|
|
|
|
|
| |
(fix of commit 6c1a92445)
* fnlz_mlc.c [ENABLE_DISCLAIM] (GC_finalized_disclaim): Fix old
function name in comment ("GC_disclaim_and_reclaim").
|
|
|
|
|
|
| |
* mark.c [GC_ATOMIC_UNCOLLECTABLE] (GC_obj_kinds): Remove misleading
comment ("add length to descr") for FALSE value (for ok_relocate_descr
field).
|
|
|
|
|
| |
* malloc.c (GC_generic_malloc_inner): Fix a typo
("to directly allocate") in comment.
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit a04c55a5b from 'master')
* dbg_mlc.c (store_old): Fix name in comment ("GC_register_finalizer").
* include/gc.h (GC_java_finalization): Fix name in comment
("GC_register_finalizer_unreachable").
|
|
|
|
|
| |
* cord/tests/cordtest.c (test_basics): Adjust indentation of
CORD_next() call inside while loop.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 923a30202 from 'master')
* tests/test.c (run_one_test): Do not call GC_malloc(0) inside
GC_printf argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 5a8c02852 from 'master')
A finished thread may still stay in GC_threads, but it is no longer
considered during a garbage collection phase, thus
GC_thread_is_registered() should return false in such a case.
* include/gc.h [GC_THREADS] (GC_thread_is_registered): Refine
comment (describe the case when the thread is marked as finished).
* pthread_support.c (GC_thread_is_registered): Return FALSE if
me->flags&FINISHED.
* win32_threads.c (GC_thread_is_registered): Return FALSE if
KNOWN_FINISHED(me).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 30d32b4e9 from 'master')
* include/gc_disclaim.h (GC_finalized_malloc): Add comment that the
debugging version of the function is missing.
* tests/disclaim_bench.c (testobj_new): Use GC_malloc() instead of
GC_NEW().
* tests/disclaim_weakmap_test.c (weakmap_add, weakmap_new): Likewise.
* tests/disclaim_bench.c (testobj_new): Use
GC_register_finalizer_no_order() instead of
GC_REGISTER_FINALIZER_NO_ORDER().
* tests/disclaim_bench.c (main): Use GC_malloc() instead of
GC_MALLOC().
* tests/weakmap.c (weakmap_add, weakmap_new): Use
GC_ptr_store_and_dirty() instead of GC_PTR_STORE_AND_DIRTY().
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 1a8160ea8 from 'master')
* pthread_support.c (GC_start_rtn_prepare_thread): Fix a typo in
comment ("used in").
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 272e61e46 from 'master')
* include/gc_pthread_redirects.h [!GC_PTHREAD_REDIRECTS_ONLY
&& !GC_NO_PTHREAD_SIGMASK && !(GC_PTHREAD_SIGMASK_NEEDED || _BSD_SOURCE
|| _GNU_SOURCE || _POSIX_C_SOURCE>=199506L || _XOPEN_SOURCE>=500)]
(GC_NO_PTHREAD_SIGMASK): Define macro.
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 051f57762 from 'master')
* tests/test.c (test_generic_malloc_or_special): Call
CHECK_OUT_OF_MEMORY() before GC_get_kind_and_size().
* tests/test.c [DBG_HDRS_ALL] (run_one_test): Set y to fail_proc1
right before its use; call CHECK_OUT_OF_MEMORY() before each GC_size()
invocation; call CHECK_OUT_OF_MEMORY() before GC_base().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit a6cd81cbd from 'master')
GC_nacl_shutdown_gc_thread() should be called (and value of
GC_nacl_gc_thread_self should be cleared) on thread termination even
for non-detached threads. Thus, GC_nacl_initialize_gc_thread() should
be called (and value of GC_nacl_gc_thread_self should be set)
additionally if the thread is registered from its destructor.
* pthread_support.c [NACL] (GC_delete_thread): Do not call
GC_nacl_shutdown_gc_thread() and do not clear GC_nacl_gc_thread_self.
* pthread_support.c [NACL] (GC_unregister_my_thread_inner): Call
GC_nacl_shutdown_gc_thread() and clear value of GC_nacl_gc_thread_self
(after GC_destroy_thread_local).
* pthread_support.c [NACL] (GC_register_my_thread): If KNOWN_FINISHED
then set GC_nacl_gc_thread_self to me and call
GC_nacl_initialize_gc_thread().
|
|
|
|
|
|
|
| |
(a cherry-pick of commit ee779ffc5 from 'master')
* pthread_start.c [GC_PTHREADS && !GC_WIN32_THREADS && NACL]
(GC_pthread_start_inner): Call GC_thread_exit_proc(me) before return.
|
| |
|
|
|
|
|
| |
* docs/scale.md (The Parallel Marking Algorithm): Fix a typo
("our approach").
|
|
|
|
| |
* ChangeLog (7.0alpha9): Fix a typo ("STATIC").
|
|
|
|
|
|
|
| |
* os_dep.c [!OS2 && !MSWIN32 && !MSWINCE && !CYGWIN32 && !AMIGA
&& !OPENBSD && !PCR && MACOS && !THINK_C && __MWERKS__ && !__POWERPC__
&& __option(far_data)] (GC_register_data_segments): Fix typo in
comment ("the").
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit f6befb64d from 'master')
GC_PTR_STORE_AND_DIRTY() might be expanded to a debugging version of
the store-and-dirty function, thus the former should not be used for
pointers returned from the non-debugging version of a GC allocation
routine like GC_FAST_MALLOC_GRANS().
* include/gc_inline.h: Add comment that the debugging version of
this API is missing.
* include/gc_inline.h (GC_CONS): Use GC_ptr_store_and_dirty()
instead of GC_PTR_STORE_AND_DIRTY().
|
|
|
|
|
|
| |
(fix of commit c7047ca9e)
* misc.c (GC_set_oom_fn): Move GC_ASSERT() to be after DCL_LOCK_STATE.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 25aa62fee from 'master')
* ChangeLog (4.3): Fix typo ("it's").
* doc/platforms/README.amiga (GC_AMIGA_GC): Likewise.
* extra/AmigaOS.c (GC_amiga_allocwrapper_any): Fix typo in comment
("it's").
* malloc.c (GC_free): Likewise.
* new_hblk.c (GC_build_fl): Likewise.
* os_dep.c [DATASTART_USES_BSDGETDATASTART] (GC_FreeBSDGetDataStart):
Likewise.
* reclaim.c (GC_start_reclaim): Likewise.
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 05b220b98 from 'master')
* pthread_support.c [CAN_HANDLE_FORK && (GC_DARWIN_THREADS
|| THREAD_LOCAL_ALLOC && !USE_CUSTOM_SPECIFIC)]
(GC_remove_all_threads_but_me): Rename GC_free_internal to
GC_free_inner in comments.
* win32_threads.c [CAN_HANDLE_FORK && THREAD_LOCAL_ALLOC
&& !USE_CUSTOM_SPECIFIC] (GC_remove_all_threads_but_me): Likewise.
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit c716d77bd from 'release-8_2')
* ChangeLog: Fix typo ("GC_allochblk_nth").
* include/private/gc_priv.h (GC_alloc_large): Fix typo in comment
("GC_allochblk_nth").
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 99a571390 from 'master')
* pthread_support.c [CPPCHECK && THREAD_SANITIZER] (GC_new_thread):
Cast result->dummy[0] to unsigned char.
|
| |
|
|
|
|
| |
(a cherry-pick of commit 4fe277030 from 'release-7_6')
|
|
|
|
| |
(a cherry-pick of commit ec801e0ef from 'release-7_4')
|
|
|
|
|
| |
* doc/README.macros (REDIRECT_REALLOC): Fix typo ("realloc" w/o GC_
prefix).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 856760844 from 'release-8_2')
Issue #488 (bdwgc).
Write to GC_heapsize_at_forced_unmap should be only performed when
holding the allocation lock.
* alloc.c (GC_heapsize_at_forced_unmap): Move the definition upper to
be before GC_try_to_collect_general(); add comment.
* alloc.c (GC_try_to_collect_general): Set GC_heapsize_at_forced_unmap
value (after LOCK) if force_unmap; move comment from
GC_heapsize_at_forced_unmap().
* alloc.c (GC_try_to_collect_general): Remove GC_ATTR_UNUSED for
force_unmap.
* alloc.c (GC_gcollect_and_unmap): Do not set
GC_heapsize_at_forced_unmap.
|
|
|
|
|
|
| |
(a cherry-pick of commit 99536f178 from 'release-8_2')
* pthread_support.c (GC_thr_init): Cast WARN argument to signed_word.
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit e55d1b99b from 'release-8_2')
* pthread_support.c [PARALLEL_MARK]
(GC_start_mark_threads_inner): Do not pass errno value to WARN() calls
(because pthread_create and pthread_sigmask do not set errno).
* win32_threads.c [PARALLEL_MARK && GC_PTHREADS_PARAMARK
&& !NO_MARKER_SPECIAL_SIGMASK] (GC_start_mark_threads_inner): Likewise.
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 397e06470 from 'master')
* Makefile.direct (OBJS): Add comment.
* Makefile.direct (libalphagc.so): Add dependency on dyn_load.o.
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 4b101ee06 from 'release-8_2')
* win32_threads.c [THREAD_LOCAL_ALLOC] (GC_register_my_thread_inner):
Update comment; do not call GC_init_thread_local().
* win32_threads.c [THREAD_LOCAL_ALLOC] (GC_register_my_thread): Call
GC_init_thread_local() both after GC_register_my_thread_inner() and
GC_record_stack_base() calls (in case of return GC_SUCCESS).
* win32_threads.c [GC_PTHREADS && THREAD_LOCAL_ALLOC]
(GC_pthread_start_inner): Call GC_init_thread_local().
|
|
|
|
|
|
|
|
|
|
|
|
| |
(a cherry-pick of commit 0d19067c3 from 'master')
Now, if GC_no_dls then GC_is_visible does not cause registration of
dynamic libraries.
* ptr_chck.c [!THREADS && (DYNAMIC_LOADING || MSWIN32 || MSWINCE
|| CYGWIN32 || PCR)] (GC_is_visible): Do not call
GC_register_dynamic_libraries() followed by GC_is_static_root()
if GC_no_dls.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(fix of commit 1c62b365b)
This is observed on Linux, at least.
* os_dep.c [!OS2 && !PCR && !AMIGA && !USE_WINALLOC && !MACOS
&& !DOS4GW && !NINTENDO_SWITCH && !NONSTOP && !SN_TARGET_ORBIS
&& !SN_TARGET_PS3 && !SN_TARGET_PSP2 && !RTEMS && !__CC_ARM
&& MMAP_SUPPORTED && !MSWIN_XBOX1] (GC_unix_mmap_get_mem): Call ABORT()
if allocation failed and GC_pages_executable and last_addr==HEAP_START
and errno is EPERM.
|
|
|
|
|
|
|
|
|
| |
* pthread_support.c (pthread_create): Call ABORT() if
pthread_attr_getdetachstate() has failed.
* win32_threads.c [GC_PTHREADS] (GC_pthread_create): Likewise.
* win32_threads.c [GC_PTHREADS] (start_info.detached): Change type from
GC_bool to int (to match the type of the 2nd argument of
pthread_attr_getdetachstate).
|
|
|
|
|
|
|
|
| |
(fix of commit 8e6460052)
* misc.c [!DONT_USE_ATEXIT && THREADS] (GC_exit_check): Wrap each
update of GC_in_thread_creation into LOCK/UNLOCK (but not GC_gcollect
call); add comment.
|