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

Diff of /gcl/o/gbc.c

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

revision 1.13.4.1 by camm, Wed Jul 30 15:11:12 2003 UTC revision 1.13.4.2 by camm, Fri Aug 29 20:42:00 2003 UTC
# Line 1012  contblock_sweep_phase(void) { Line 1012  contblock_sweep_phase(void) {
1012      e = pagetochar(j);      e = pagetochar(j);
1013      for (p = s;  p < e;) {      for (p = s;  p < e;) {
1014        if (get_mark_bit((int *)p)) {        if (get_mark_bit((int *)p)) {
1015          p += PTR_ALIGN;          /* SGC cont pages: cont blocks must be no smaller than
1016               sizeof(struct contblock), and must not have a sweep
1017               granularity greater than this amount (e.g. CPTR_ALIGN) if
1018               contblock leaks are to be avoided.  Used to be aligned at
1019               PTR_ALIGN. CM 20030827 */
1020            p += CPTR_ALIGN;
1021          continue;          continue;
1022        }        }
1023        q = p + PTR_ALIGN;        q = p + CPTR_ALIGN;
1024        while (q < e) {        while (q < e) {
1025          if (!get_mark_bit((int *)q)) {          if (!get_mark_bit((int *)q)) {
1026            q += PTR_ALIGN;            q += CPTR_ALIGN;
1027            continue;            continue;
1028          }          }
1029          break;          break;
1030        }        }
1031        insert_contblock(p, q - p);        insert_contblock(p, q - p);
1032        p = q + PTR_ALIGN;        p = q + CPTR_ALIGN;
1033      }      }
1034      i = j + 1;      i = j + 1;
1035    }    }
# Line 1067  GBC(enum type t) { Line 1072  GBC(enum type t) {
1072      if(sgc_enabled) sgc_quit();      if(sgc_enabled) sgc_quit();
1073            
1074      }      }
1075      
1076      
1077  #ifdef DEBUG  #ifdef DEBUG
1078    debug = symbol_value(sSAgbc_messageA) != Cnil;    debug = symbol_value(sSAgbc_messageA) != Cnil;
1079  #endif  #endif
# Line 1278  GBC(enum type t) { Line 1283  GBC(enum type t) {
1283        
1284    interrupt_enable = TRUE;    interrupt_enable = TRUE;
1285        
1286      if (in_sgc && sgc_enabled==0)
1287        sgc_start();
1288      
1289    if (saving_system) {    if (saving_system) {
1290      j = (rb_pointer-rb_start+PAGESIZE-1) / PAGESIZE;      j = (rb_pointer-rb_start+PAGESIZE-1) / PAGESIZE;
1291            
# Line 1323  GBC(enum type t) { Line 1331  GBC(enum type t) {
1331    if (GBC_exit_hook != NULL)    if (GBC_exit_hook != NULL)
1332      (*GBC_exit_hook)();      (*GBC_exit_hook)();
1333        
     
   if (in_sgc && sgc_enabled==0)  
     sgc_start();  
     
1334    if(gc_time>=0 && !--gc_recursive) {gc_time=gc_time+(gc_start=(runtime()-gc_start));}    if(gc_time>=0 && !--gc_recursive) {gc_time=gc_time+(gc_start=(runtime()-gc_start));}
1335        
1336    if (sSAnotify_gbcA->s.s_dbind != Cnil) {    if (sSAnotify_gbcA->s.s_dbind != Cnil) {
# Line 1423  mark_contblock(void *p, int s) { Line 1427  mark_contblock(void *p, int s) {
1427    if (!MAYBE_DATA_P(p) || (enum type)type_map[page(p)] != t_contiguous)    if (!MAYBE_DATA_P(p) || (enum type)type_map[page(p)] != t_contiguous)
1428      return;      return;
1429    q = p + s;    q = p + s;
1430    x = (int *)ROUND_DOWN_PTR(p);    /* SGC cont pages: contblock pages must be no smaller than
1431    y = (int *)ROUND_UP_PTR(q);       sizeof(struct contblock).  CM 20030827 */
1432      x = (int *)ROUND_DOWN_PTR_CONT(p);
1433      y = (int *)ROUND_UP_PTR_CONT(q);
1434    for (;  x < y;  x++)    for (;  x < y;  x++)
1435      set_mark_bit(x);      set_mark_bit(x);
1436  }  }

Legend:
Removed from v.1.13.4.1  
changed lines
  Added in v.1.13.4.2

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