Changeset 13297


Ignore:
Timestamp:
Dec 16, 2009, 10:50:07 PM (10 years ago)
Author:
gb
Message:

gc.h: declare 'relocatable_mark_ref_bits' (e.g., base of mark/refbits
for relocatable section of heap.)

pmcl-kernel.c: use relocatable_mark_ref_bits, low_relocatable_address
to initialize markbits and in ensure_gc_structures_writable(); that
makes the code a bit clearer and keeps the reloctab from growing
unnecessarily.

In lower_heap_start(), if EGC is off, active_dynamic_area->markbits
needs to be lowered (to incorporate changes to heap origin.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r13295 r13297  
    138138
    139139LispObj lisp_nil = (LispObj) 0;
    140 bitvector global_mark_ref_bits = NULL, dynamic_mark_ref_bits = NULL;
     140bitvector global_mark_ref_bits = NULL, dynamic_mark_ref_bits = NULL, relocatable_mark_ref_bits = NULL;
    141141
    142142
     
    661661  high_markable_address = high;
    662662  dynamic_mark_ref_bits = (bitvector)(((BytePtr)global_mark_ref_bits)+prefix_size);
     663  relocatable_mark_ref_bits = dynamic_mark_ref_bits;
    663664  n = align_to_power_of_2(markbits_size,log2_page_size);
    664665  markbits_limit = ((BytePtr)dynamic_mark_ref_bits)+n;
     
    694695{
    695696  natural
    696     ndnodes = area_dnode(lisp_global(HEAP_END),lisp_global(HEAP_START)),
     697    ndnodes = area_dnode(lisp_global(HEAP_END),low_relocatable_address),
    697698    markbits_size = (3*sizeof(LispObj))+((ndnodes+7)>>3),
    698699    reloctab_size = (sizeof(LispObj)*(((ndnodes+((1<<bitmap_shift)-1))>>bitmap_shift)+1)),
     
    700701  BytePtr
    701702    new_reloctab_limit = (BytePtr)align_to_power_of_2(((natural)global_reloctab)+reloctab_size,log2_page_size),
    702     new_markbits_limit = (BytePtr)align_to_power_of_2(((natural)dynamic_mark_ref_bits)+markbits_size,log2_page_size);
     703    new_markbits_limit = (BytePtr)align_to_power_of_2(((natural)relocatable_mark_ref_bits)+markbits_size,log2_page_size);
    703704
    704705  if (new_reloctab_limit > reloctab_limit) {
     
    24302431  static_cons_area->low = new_low;
    24312432  lower_heap_start(new_low, tenured_area);
     2433  /* what a mess this is ... */
    24322434  if (active_dynamic_area->low == old_low) {
    24332435    active_dynamic_area->low = new_low;
     2436  }
     2437  if (!active_dynamic_area->older) {
     2438    active_dynamic_area->markbits = tenured_area->refbits;
    24342439  }
    24352440  if (g1_area->low == old_low) {
Note: See TracChangeset for help on using the changeset viewer.