2006-07-11 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Tue, 11 Jul 2006 18:44:37 +0000 (18:44 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:38 +0000 (21:06 +0400)
* 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
os_dep.c
pthread_support.c
tests/thread_leak_test.c

index 59e9a8d..d2c8f80 100644 (file)
--- 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);
index f66a31e..ac8f278 100644 (file)
--- 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
index fbb337f..6eec221 100644 (file)
@@ -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;
 
index ac93ae0..11adb97 100644 (file)
@@ -15,6 +15,7 @@ void * test(void * arg) {
     for (i = 1; i < 10; ++i) {
         free(p[i]);
     }
+    return 0;
 }       
 
 #define NTHREADS 5