Changeset 15270 in project for chicken/trunk


Ignore:
Timestamp:
07/28/09 14:53:18 (10 years ago)
Author:
felix winkelmann
Message:

enabled gc-report shows reclaimed locative-table entries

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r15262 r15270  
    9292*** Use record-descriptors instead of symbols as 1st slot in structure objects?
    9393**** see Kon's proposal for new record-descriptors in "misc/Chicken Runtime Data Type Proposal"
     94*** Weak locatives can probably be used to implement weak hash-tables
    9495
    9596** syntax-error
  • chicken/trunk/runtime.c

    r14237 r15270  
    33943394C_regparm void C_fcall update_locative_table(int mode)
    33953395{
    3396   int i, hi = 0;
     3396  int i, hi = 0, invalidated = 0;
    33973397  C_header h;
    33983398  C_word loc, obj, obj2, offset, loc2, ptr;
    33993399  C_uword ptr2;
    3400 
    3401   /*C_printf("major: %d, %d locs in %d\n", major, locative_table_count, locative_table_size); */
    34023400
    34033401  for(i = 0; i < locative_table_count; ++i) {
     
    34163414          locative_table[ i ] = C_SCHEME_UNDEFINED;
    34173415          C_set_block_item(loc, 0, 0);
     3416          ++invalidated;
    34183417          break;
    34193418        }
     
    34433442          locative_table[ i ] = C_SCHEME_UNDEFINED;
    34443443          C_set_block_item(loc, 0, 0);
     3444          ++invalidated;
    34453445          break;
    34463446        }
     
    34713471          locative_table[ i ] = C_SCHEME_UNDEFINED; /* pointed-at object is dead */
    34723472          C_set_block_item(loc, 0, 0);
     3473          ++invalidated;
    34733474        }
    34743475       
     
    34853486    }
    34863487  }
     3488
     3489  if(gc_report_flag && invalidated > 0)
     3490    C_printf(C_text("[GC] locative-table entries reclaimed: %d\n"), invalidated);
    34873491
    34883492  if(mode != GC_REALLOC) locative_table_count = hi;
Note: See TracChangeset for help on using the changeset viewer.