summaryrefslogtreecommitdiff
path: root/malloc.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-10-19 08:42:27 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-10-19 11:10:59 +0300
commit95b934dbdae5883f589da6cf4e5a4d27aa575204 (patch)
tree5117e28b147d4ff91e4acd6566c2a1a9512c3ae4 /malloc.c
parentdb7e0a5d2f8722f81557fb927001fd543daff5d1 (diff)
downloadbdwgc-95b934dbdae5883f589da6cf4e5a4d27aa575204.tar.gz
Remove duplicate 'called once' check in GC_init_lib_bounds
(refactoring) GC_init_lib_bounds() is called only once - this is ensured by lib_bounds_set variable. * malloc.c [REDIRECT_MALLOC && !REDIRECT_MALLOC_IN_HEADER && GC_LINUX_THREADS] (GC_init_lib_bounds): Do not check value of GC_libpthread_start; do not set GC_libpthread_start to 1 after WARN().
Diffstat (limited to 'malloc.c')
-rw-r--r--malloc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/malloc.c b/malloc.c
index df3b330f..be426e86 100644
--- a/malloc.c
+++ b/malloc.c
@@ -465,7 +465,6 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_uncollectable(size_t lb)
{
IF_CANCEL(int cancel_state;)
- if (GC_libpthread_start != 0) return;
DISABLE_CANCEL(cancel_state);
GC_init(); /* if not called yet */
if (!GC_text_mapping("libpthread-",
@@ -473,8 +472,6 @@ GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc_uncollectable(size_t lb)
WARN("Failed to find libpthread.so text mapping: Expect crash\n", 0);
/* This might still work with some versions of libpthread, */
/* so we don't abort. Perhaps we should. */
- /* Generate message only once: */
- GC_libpthread_start = (ptr_t)1;
}
if (!GC_text_mapping("ld-", &GC_libld_start, &GC_libld_end)) {
WARN("Failed to find ld.so text mapping: Expect crash\n", 0);