]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict from master
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 27 Apr 2009 22:09:09 +0000 (17:09 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 27 Apr 2009 22:09:09 +0000 (17:09 -0500)
1  2 
Makefile
vm/data_gc.c
vm/data_gc.h

diff --cc Makefile
Simple merge
diff --cc vm/data_gc.c
Simple merge
diff --cc vm/data_gc.h
index b59cb0eb9eeedf150c9ca9208815913a5c4f5e62,afa45c5522e38a1003d26156bd2a03c3b002b280..a1184d53d4ef07495eac115a2025a27a257b52ce
@@@ -78,17 -78,31 +78,30 @@@ allocation (which does not call GC beca
  registers) does not run out of memory */
  #define ALLOT_BUFFER_ZONE 1024
  
 -static int count;
+ /* If this is defined, we GC every 100 allocations. This catches missing local roots */
+ #ifdef GC_DEBUG
++int gc_count;
+ #endif
  /*
   * It is up to the caller to fill in the object's fields in a meaningful
   * fashion!
   */
 +int count;
  INLINE void *allot_object(CELL type, CELL a)
  {
-   if(!gc_off) { if(count++ % 100 == 0) { printf("!\n"); gc(); } }
 -
+ #ifdef GC_DEBUG
 -
+       if(!gc_off)
+       {
 -              if(count++ % 1000 == 0)
++              if(gc_count++ % 1000 == 0)
+                       gc();
+       }
+ #endif
        CELL *object;
  
-       if(HAVE_NURSERY_P && nursery.size - ALLOT_BUFFER_ZONE > a)
+       if(nursery.size - ALLOT_BUFFER_ZONE > a)
        {
                /* If there is insufficient room, collect the nursery */
                if(nursery.here + ALLOT_BUFFER_ZONE + a > nursery.end)