Changeset 13346


Ignore:
Timestamp:
Dec 30, 2009, 6:32:24 PM (10 years ago)
Author:
gb
Message:

Check static cons freelist on GC entry, exit.

File:
1 edited

Legend:

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

    r13330 r13346  
    9898natural GCstack_limit = 0;
    9999
     100void
     101check_static_cons_freelist(char *phase)
     102{
     103  LispObj
     104    n,
     105    base = (LispObj)static_cons_area->low,
     106    limit = static_cons_area->ndnodes;
     107  natural i=0;
     108
     109  for (n=lisp_global(STATIC_CONSES);n!=lisp_nil;n=((cons *)untag(n))->cdr, i++) {
     110    if ((fulltag_of(n) != fulltag_cons) ||
     111        (area_dnode(n,base) >= limit)) {
     112      Bug(NULL, "%s: static cons freelist has invalid element 0x" LISP "\n",
     113          phase, i);
     114    }
     115  }
     116}
    100117
    101118void
     
    14271444      check_all_areas(tcr);
    14281445    }
     1446    check_static_cons_freelist("in pre-gc static-cons check");
    14291447  }
    14301448
     
    16901708    check_all_areas(tcr);
    16911709  }
     1710  check_static_cons_freelist("in post-gc static-cons check");
     1711
    16921712
    16931713 
Note: See TracChangeset for help on using the changeset viewer.