2007-06-23 Hans Boehm <Hans.Boehm@hp.com>
authorhboehm <hboehm>
Sun, 24 Jun 2007 02:19:31 +0000 (02:19 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:40 +0000 (21:06 +0400)
* alloc.c: Also use GC_check_tls on non-Linux systems.
* mallocx.c (GC_reclaim_generic): Remove bogus declaration.
* include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
with prototype.

ChangeLog
alloc.c
include/private/gc_priv.h
mallocx.c

index cd62f6d..4865325 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-06-23  Hans Boehm <Hans.Boehm@hp.com>
+
+       * alloc.c: Also use GC_check_tls on non-Linux systems.
+       * mallocx.c (GC_reclaim_generic): Remove bogus declaration.
+       * include/private/gc_priv.h (GC_reclaim_generic): Declare correctly
+       with prototype.
+
 2007-06-19  Hans Boehm <Hans.Boehm@hp.com>
 
        * alloc.c (GC_adj_bytes_allocd): Avoid (long) casts, fix comment.
diff --git a/alloc.c b/alloc.c
index 6a6c998..94a968e 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -585,7 +585,7 @@ void GC_clear_fl_marks(ptr_t q)
    }
 }
 
-#if defined(GC_ASSERTIONS) && defined(GC_LINUX_THREADS)
+#if defined(GC_ASSERTIONS) && defined(THREADS) && defined(THREAD_LOCAL_ALLOC)
 extern void GC_check_tls(void);
 #endif
 
@@ -597,7 +597,7 @@ void GC_finish_collection()
     CLOCK_TYPE finalize_time;
     CLOCK_TYPE done_time;
        
-#   if defined(GC_ASSERTIONS) && defined(GC_LINUX_THREADS) \
+#   if defined(GC_ASSERTIONS) && defined(THREADS) \
        && defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
        /* Check that we marked some of our own data.           */
         /* FIXME: Add more checks.                             */
index a6d7f40..ec93ffe 100644 (file)
@@ -1586,6 +1586,13 @@ void GC_reclaim_or_delete_all(void);
 GC_bool GC_reclaim_all(GC_stop_func stop_func, GC_bool ignore_old);
                                /* Reclaim all blocks.  Abort (in a     */
                                /* consistent state) if f returns TRUE. */
+ptr_t GC_reclaim_generic(struct hblk * hbp, hdr *hhdr, size_t sz,
+                        GC_bool init, ptr_t list, signed_word *count);
+                               /* Rebuild free list in hbp with        */
+                               /* header hhdr, with objects of size sz */
+                               /* bytes.  Add list to the end of the   */
+                               /* free list.  Add the number of        */
+                               /* reclaimed bytes to *count.           */
 GC_bool GC_block_empty(hdr * hhdr);
                                /* Block completely unmarked?   */
 GC_bool GC_never_stop_func(void);
index d2c8f80..4ee7409 100644 (file)
--- a/mallocx.c
+++ b/mallocx.c
@@ -250,9 +250,6 @@ volatile signed_word GC_bytes_allocd_tmp = 0;
                         /* expensive.)                                   */
 #endif /* PARALLEL_MARK */
 
-/* See reclaim.c: */
-extern ptr_t GC_reclaim_generic();
-
 /* Return a list of 1 or more objects of the indicated size, linked    */
 /* through the first word in the object.  This has the advantage that  */
 /* it acquires the allocation lock only once, and may greatly reduce   */