Changeset 16371


Ignore:
Timestamp:
Apr 24, 2015, 1:34:11 AM (4 years ago)
Author:
gb
Message:

still in progress

Location:
branches/acl2-egc/lisp-kernel
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/acl2-egc/lisp-kernel/gc-common.c

    r16119 r16371  
    18341834    GCfirstunmarked = calculate_relocation();
    18351835
    1836     if (!GCephemeral_low) {
    1837       reclaim_static_dnodes();
    1838     }
    1839 
    1840     forward_range((LispObj *) ptr_from_lispobj(GCarealow), (LispObj *) ptr_from_lispobj(GCfirstunmarked));
     1836    reclaim_static_dnodes();
     1837
     1838
     1839    forward_range((LispObj *) ptr_from_lispobj(GCareadynamiclow), (LispObj *) ptr_from_lispobj(GCfirstunmarked));
    18411840
    18421841    other_tcr = tcr;
  • branches/acl2-egc/lisp-kernel/image.c

    r15842 r16371  
    312312  case AREA_STATIC_CONS:
    313313    addr = (char *) lisp_global(HEAP_START);
     314    tenured_area = new_area(addr, addr, AREA_STATIC);
     315
    314316    a = new_area(addr-align_to_power_of_2(mem_size,log2_page_size), addr, AREA_STATIC_CONS);
    315317    if (mem_size) {     
     
    325327    sect->area = a;
    326328    static_cons_area = a;
     329    /* not yet
     330    lower_heap_start(a->low,tenured_area);
     331    */
    327332    break;
    328333
     
    421426        break;
    422427      case AREA_STATIC_CONS:
     428        /* not yet
     429 lower_heap_start(static_cons_area->low,tenured_area);
     430        */
    423431        break;
    424432      case AREA_DYNAMIC:
    425         lower_heap_start(static_cons_area->low,a);
    426433        if (bias) {
    427434          relocate_area_contents(a, bias);
  • branches/acl2-egc/lisp-kernel/lisp-debug.c

    r16366 r16371  
    224224{
    225225#ifndef WINDOWS
    226   if (!isatty(fileno(dbgin))) {
     226  if (1 || !isatty(fileno(dbgin))) {
    227227    int fd = open("/dev/tty", O_RDWR);
    228228    if (fd >=0) {
  • branches/acl2-egc/lisp-kernel/lisp.h

    r16366 r16371  
    9292void ensure_static_conses(ExceptionInformation *, TCR *,natural);
    9393
     94void ensure_gc_structures_writable(void);
     95
    9496extern FILE *dbgout,*dbgin;
    9597
  • branches/acl2-egc/lisp-kernel/memory.c

    r16110 r16371  
    708708untenure_from_area(area *from)
    709709{
    710   if (lisp_global(OLDEST_EPHEMERAL) != 0) {
     710  if ((lisp_global(OLDEST_EPHEMERAL) != 0) &&
     711      (from->static_dnodes ==0)) {
    711712    area *a = active_dynamic_area, *child;
    712713    BytePtr curlow = from->low;
  • branches/acl2-egc/lisp-kernel/pmcl-kernel.c

    r16366 r16371  
    703703    CommitMemory(new_markbits,n);
    704704    dynamic_mark_ref_bits = (bitvector)new_markbits;
    705     if (a->refbits) {
     705    if (a) {
     706      if (a->refbits) {
    706707      a->refbits= dynamic_mark_ref_bits;
    707     }
    708     a->static_dnodes += new_dnodes;
    709     a->ndnodes += new_dnodes;
    710     a->low = new_low;
    711     a->refidx -= nidx;
     708      }
     709      a->static_dnodes += new_dnodes;
     710      a->ndnodes += new_dnodes;
     711      a->low = new_low;
     712      a->refidx -= nidx;
     713    }
    712714    low_markable_address = new_low;
    713715    lisp_global(HEAP_START) = (LispObj)new_low;
    714716    static_cons_area->ndnodes = area_dnode(static_cons_area->high,new_low);
     717    ensure_gc_structures_writable();
    715718  }
    716719}
     
    720723{
    721724  natural
    722     ndnodes = area_dnode(lisp_global(HEAP_END),low_relocatable_address),
     725    ndnodes = area_dnode(lisp_global(HEAP_END),tenured_area->low),
    723726    markbits_size = (3*sizeof(LispObj))+((ndnodes+7)>>3),
    724727    reloctab_size = (sizeof(LispObj)*(((ndnodes+((1<<bitmap_shift)-1))>>bitmap_shift)+1)),
     
    14021405    }
    14031406  }
     1407  redirect_debugger_io();
     1408#if 0
     1409  fprintf(dbgout,"ccl pid = %d", getpid());
     1410  sleep(20);
     1411#endif
     1412
     1413
    14041414}
    14051415
     
    17801790    g1_area = new_area(lowptr, lowptr, AREA_STATIC);
    17811791    g2_area = new_area(lowptr, lowptr, AREA_STATIC);
    1782     tenured_area = new_area(lowptr, lowptr, AREA_STATIC);
    1783     add_area_holding_area_lock(tenured_area);
    17841792    add_area_holding_area_lock(g2_area);
    17851793    add_area_holding_area_lock(g1_area);
    1786 
     1794    add_area_holding_area_lock(tenured_area);
    17871795    g1_area->code = AREA_DYNAMIC;
    17881796    g2_area->code = AREA_DYNAMIC;
     
    18111819    g1_area->threshold = default_g1_threshold;
    18121820    a->threshold = default_g0_threshold;
     1821    if (static_cons_area && static_cons_area->low) {
     1822      lower_heap_start(static_cons_area->low, tenured_area);
     1823    }
    18131824  }
    18141825}
  • branches/acl2-egc/lisp-kernel/x86-gc.c

    r16339 r16371  
    311311
    312312  if (current != end) {
    313     Bug(NULL, "Overran end of memory range: start = 0x%08x, end = 0x%08x, prev = 0x%08x, current = 0x%08x",
     313    Bug(NULL, "Overran end of memory range: start = 0x" LISP ", end = 0x" LISP ", prev = 0x" LISP ", current = 0x" LISP "",
    314314        start, end, prev, current);
    315315  }
Note: See TracChangeset for help on using the changeset viewer.