[BACK]Return to stubborn.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / gc

Diff for /OpenXM_contrib2/asir2000/gc/stubborn.c between version 1.1 and 1.4

version 1.1, 1999/12/03 07:39:10 version 1.4, 2002/07/24 08:00:12
Line 14 
Line 14 
 /* Boehm, July 31, 1995 5:02 pm PDT */  /* Boehm, July 31, 1995 5:02 pm PDT */
   
   
 #include "gc_priv.h"  #include "private/gc_priv.h"
   
 # ifdef STUBBORN_ALLOC  # ifdef STUBBORN_ALLOC
 /* Stubborn object (hard to change, nearly immutable) allocation. */  /* Stubborn object (hard to change, nearly immutable) allocation. */
Line 31  extern ptr_t GC_clear_stack(); /* in misc.c, behaves l
Line 31  extern ptr_t GC_clear_stack(); /* in misc.c, behaves l
   
 GC_PTR * GC_changing_list_start;  GC_PTR * GC_changing_list_start;
   
   void GC_push_stubborn_structures GC_PROTO((void))
   {
       GC_push_all((ptr_t)(&GC_changing_list_start),
                   (ptr_t)(&GC_changing_list_start) + sizeof(GC_PTR *));
   }
   
 # ifdef THREADS  # ifdef THREADS
   VOLATILE GC_PTR * VOLATILE GC_changing_list_current;    VOLATILE GC_PTR * VOLATILE GC_changing_list_current;
 # else  # else
Line 50  void GC_stubborn_init()
Line 56  void GC_stubborn_init()
 #   define INIT_SIZE 10  #   define INIT_SIZE 10
   
     GC_changing_list_start = (GC_PTR *)      GC_changing_list_start = (GC_PTR *)
                         GC_generic_malloc_inner(                          GC_INTERNAL_MALLOC(
                                 (word)(INIT_SIZE * sizeof(GC_PTR)),                                  (word)(INIT_SIZE * sizeof(GC_PTR)),
                                 PTRFREE);                                  PTRFREE);
     BZERO(GC_changing_list_start,      BZERO(GC_changing_list_start,
Line 88  GC_bool GC_compact_changing_list()
Line 94  GC_bool GC_compact_changing_list()
     }      }
     if (2 * count > old_size) new_size = 2 * count;      if (2 * count > old_size) new_size = 2 * count;
     new_list = (GC_PTR *)      new_list = (GC_PTR *)
                 GC_generic_malloc_inner(                  GC_INTERNAL_MALLOC(
                                 new_size * sizeof(GC_PTR), PTRFREE);                                  new_size * sizeof(GC_PTR), PTRFREE);
                 /* PTRFREE is a lie.  But we don't want the collector to  */                  /* PTRFREE is a lie.  But we don't want the collector to  */
                 /* consider these.  We do want the list itself to be      */                  /* consider these.  We do want the list itself to be      */
Line 313  GC_PTR p;
Line 319  GC_PTR p;
 {  {
 }  }
   
   void GC_push_stubborn_structures GC_PROTO((void))
   {
   }
   
 #endif  #endif

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>