From f23a2462d9f1eadc2778589e8817f17d7c4ea847 Mon Sep 17 00:00:00 2001 From: hboehm Date: Tue, 11 Jul 2006 18:44:37 +0000 Subject: [PATCH] 2006-07-11 Hans Boehm * mallocx.c (GC_malloc_atomic_uncollectable): Fix two serious editing errors. * os_dep.c (GC_get_stack_base): Return GC_SUCCESS from default version. * pthread_support.c (start_mark_threads): Remove dummy version. * libatomic_ops-1.1/src/atomic_ops/sysdeps/hpc/ia64.h: Fix typos. Didn't compile. * tests/thread_leak_test.c(test): Return something. --- mallocx.c | 3 +-- os_dep.c | 1 + pthread_support.c | 8 +------- tests/thread_leak_test.c | 1 + 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/mallocx.c b/mallocx.c index 59e9a8d8..d2c8f80c 100644 --- a/mallocx.c +++ b/mallocx.c @@ -538,7 +538,7 @@ void * GC_malloc_atomic_uncollectable(size_t lb) if (EXTRA_BYTES != 0 && lb != 0) lb--; /* We don't need the extra byte, since this won't be */ /* collected anyway. */ - lg = GC_size_map[lg]; + lg = GC_size_map[lb]; opp = &(GC_auobjfreelist[lg]); LOCK(); if( (op = *opp) != 0 ) { @@ -556,7 +556,6 @@ void * GC_malloc_atomic_uncollectable(size_t lb) GC_ASSERT(0 == op || GC_is_marked(op)); return((void *) op); } else { - size_t lb; hdr * hhdr; op = (ptr_t)GC_generic_malloc(lb, AUNCOLLECTABLE); diff --git a/os_dep.c b/os_dep.c index f66a31e6..ac8f2789 100644 --- a/os_dep.c +++ b/os_dep.c @@ -1227,6 +1227,7 @@ int GC_get_stack_base(struct GC_stack_base *b) # else b -> mem_base = GC_find_limit(&dummy, FALSE); # endif + return GC_SUCCESS; # else return GC_UNIMPLEMENTED; # endif diff --git a/pthread_support.c b/pthread_support.c index fbb337f4..6eec221e 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -351,13 +351,7 @@ static void start_mark_threads(void) } } -#else /* !PARALLEL_MARK */ - -static __inline__ void start_mark_threads(void) -{ -} - -#endif /* !PARALLEL_MARK */ +#endif /* PARALLEL_MARK */ GC_bool GC_thr_initialized = FALSE; diff --git a/tests/thread_leak_test.c b/tests/thread_leak_test.c index ac93ae05..11adb971 100644 --- a/tests/thread_leak_test.c +++ b/tests/thread_leak_test.c @@ -15,6 +15,7 @@ void * test(void * arg) { for (i = 1; i < 10; ++i) { free(p[i]); } + return 0; } #define NTHREADS 5 -- 2.40.0