Changeset 11955


Ignore:
Timestamp:
Apr 18, 2009, 9:48:32 AM (10 years ago)
Author:
gb
Message:

Propagate r11952 (don't zero refbits when growing heap) to 1.3.

File:
1 edited

Legend:

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

    r11924 r11955  
    649649    ndnodes = area_dnode(lisp_global(HEAP_END),lisp_global(HEAP_START)),
    650650    markbits_size = (3*sizeof(LispObj))+((ndnodes+7)>>3),
    651     reloctab_size = (sizeof(LispObj)*(((ndnodes+((1<<bitmap_shift)-1))>>bitmap_shift)+1));
     651    reloctab_size = (sizeof(LispObj)*(((ndnodes+((1<<bitmap_shift)-1))>>bitmap_shift)+1)),
     652    n;
    652653  BytePtr
    653     new_reloctab_limit = ((BytePtr)global_reloctab)+reloctab_size,
    654     new_markbits_limit = ((BytePtr)global_mark_ref_bits)+markbits_size;
     654    new_reloctab_limit = (BytePtr)align_to_power_of_2(((natural)global_reloctab)+reloctab_size,log2_page_size),
     655    new_markbits_limit = (BytePtr)align_to_power_of_2(((natural)global_mark_ref_bits)+markbits_size,log2_page_size);
    655656
    656657  if (new_reloctab_limit > reloctab_limit) {
    657     CommitMemory(global_reloctab, reloctab_size);
    658     UnProtectMemory(global_reloctab, reloctab_size);
     658    n = new_reloctab_limit - reloctab_limit;
     659    CommitMemory(reloctab_limit, n);
     660    UnProtectMemory(reloctab_limit, n);
    659661    reloctab_limit = new_reloctab_limit;
    660662  }
    661663 
    662664  if (new_markbits_limit > markbits_limit) {
    663     CommitMemory(global_mark_ref_bits, markbits_size);
    664     UnProtectMemory(global_mark_ref_bits, markbits_size);
     665    n = new_markbits_limit-markbits_limit;
     666    CommitMemory(markbits_limit, n);
     667    UnProtectMemory(markbits_limit, n);
    665668    markbits_limit = new_markbits_limit;
    666669  }
     
    692695  lisp_global(HEAP_START) = ptr_to_lispobj(a->low);
    693696  lisp_global(HEAP_END) = ptr_to_lispobj(a->high);
     697  markbits_limit = (BytePtr)global_mark_ref_bits;
     698  reloctab_limit = (BytePtr)global_reloctab;
    694699  ensure_gc_structures_writable();
    695700  return a;
Note: See TracChangeset for help on using the changeset viewer.