/[gcl]/gcl/o/sgbc.c
ViewVC logotype

Diff of /gcl/o/sgbc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by camm, Sat Jul 20 07:10:56 2002 UTC revision 1.5 by camm, Mon Jul 29 22:50:54 2002 UTC
# Line 93  sgc_mark_cons(object x) { Line 93  sgc_mark_cons(object x) {
93  void  void
94  sgc_mark_object1(object x) {  sgc_mark_object1(object x) {
95    
96    int i, j;    long i;
97      int j;
98    object *p;    object *p;
99    char *cp;    char *cp;
100        
# Line 285  sgc_mark_object1(object x) { Line 286  sgc_mark_object1(object x) {
286            x->a.a_self = (object *)copy_relblock(cp, j);            x->a.a_self = (object *)copy_relblock(cp, j);
287        }        }
288        else if (x->a.a_displaced->c.c_car == Cnil) {        else if (x->a.a_displaced->c.c_car == Cnil) {
289          i = (int)(object *)copy_relblock(cp, j)          i = (long)(object *)copy_relblock(cp, j)
290            - (int)(x->a.a_self);            - (long)(x->a.a_self);
291          adjust_displaced(x, i);          adjust_displaced(x, i);
292        }        }
293      }      }
# Line 635  sgc_mark_phase(void) { Line 636  sgc_mark_phase(void) {
636        tm=tm_of(t);        tm=tm_of(t);
637        p=pagetochar(i);        p=pagetochar(i);
638        if ( t == t_cons)        if ( t == t_cons)
639          for (j = tm->tm_nppage; --j >= 0; p += sizeof(struct cons)) {          for (j = tm->tm_nppage; --j >= 0; p += tm_table[t_cons].tm_size/*  sizeof(struct cons) */) {
640            object x = (object) p;            object x = (object) p;
641            if (SGC_OR_M(x))            if (SGC_OR_M(x))
642              continue;              continue;
# Line 887  sgc_contblock_sweep_phase(void) { Line 888  sgc_contblock_sweep_phase(void) {
888    
889    
890  #define PAGE_ROUND_UP(adr) \  #define PAGE_ROUND_UP(adr) \
891      ((char *)(PAGESIZE*(((int)(adr)+PAGESIZE -1) >> PAGEWIDTH)))      ((char *)(PAGESIZE*(((long)(adr)+PAGESIZE -1) >> PAGEWIDTH)))
892    
893  char *old_rb_start;  char *old_rb_start;
894    
# Line 1161  make_writable(int beg, int i) { Line 1162  make_writable(int beg, int i) {
1162    }    }
1163  }  }
1164    
1165  int debug_fault =0;  long debug_fault =0;
1166  int fault_count =0;  int fault_count =0;
1167  extern char etext;  extern char etext;
1168  /*  void memprotect_handler(int sig, int code, struct sigcontext *scp, char *addr); */  /*  void memprotect_handler(int sig, int code, struct sigcontext *scp, char *addr); */
1169  void  void
1170  memprotect_handler(int sig, int code, struct sigcontext *scp, char *addr) {  memprotect_handler(int sig, long code, struct sigcontext *scp, char *addr) {
1171        
1172    int p;    int p;
1173    int j=page_multiple;    int j=page_multiple;
# Line 1174  memprotect_handler(int sig, int code, st Line 1175  memprotect_handler(int sig, int code, st
1175                     arguments on the stack! */                     arguments on the stack! */
1176  #ifdef GET_FAULT_ADDR  #ifdef GET_FAULT_ADDR
1177    faddr=GET_FAULT_ADDR(sig,code,scp,addr);    faddr=GET_FAULT_ADDR(sig,code,scp,addr);
1178    debug_fault = (int) faddr;    debug_fault = (long) faddr;
1179  #ifdef DEBUG_MPROTECT  #ifdef DEBUG_MPROTECT
1180    printf("fault:0x%x [%d] (%d)  ",faddr,page(faddr),faddr >= core_end);    printf("fault:0x%x [%d] (%d)  ",faddr,page(faddr),faddr >= core_end);
1181  #endif  #endif
1182    if (faddr >= core_end || (unsigned int)faddr < DBEGIN) {    if (faddr >= core_end || (unsigned long)faddr < DBEGIN) {
1183      if (fault_count > 300) error("fault count too high");      if (fault_count > 300) error("fault count too high");
1184      fault_count ++;      fault_count ++;
1185      INSTALL_MPROTECT_HANDLER;      INSTALL_MPROTECT_HANDLER;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26