object o=sSAleaf_collection_thresholdA->s.s_dbind;
sSAleaf_collection_thresholdA->s.s_dbind=make_fixnum(0);
- for (;rb_pointer!=rb_start&&rb_pointer!=rb_end;)
+ for (;rb_pointer!=rb_start&&rb_pointer!=rb_end;) {
+ tm_table[t_relocatable].tm_adjgbccnt--;
GBC(t_relocatable);
+ }
sSAleaf_collection_thresholdA->s.s_dbind=o;
}
rebalance_maxpages(struct typemanager *my_tm,fixnum z) {
fixnum d;
- ufixnum i,j;
+ ufixnum i,j,r=(my_tm->tm_type==t_relocatable ? 2 : 1);
- d=(z-my_tm->tm_maxpage)*(my_tm->tm_type==t_relocatable ? 2 : 1);
+ d=(z-my_tm->tm_maxpage)*r;
j=sum_maxpages();
if (j+d>phys_pages) {
if (e+phys_pages-j<=0)
return 0;
- f=1.0-(double)e/k;
+ f=k ? 1.0-(double)e/k : 1.0;
for (i=t_start;i<t_other;i++)
if (tm_table[i].tm_npage && tm_table+i!=my_tm) {
massert(set_tm_maxpage(tm_table+i,tm_table[i].tm_npage+f*(tm_table[i].tm_maxpage-tm_table[i].tm_npage)));
}
- massert(set_tm_maxpage(my_tm,(my_tm->tm_maxpage+(phys_pages-sum_maxpages()))/(my_tm->tm_type==t_relocatable ? 2 : 1)));
+ massert(set_tm_maxpage(my_tm,(my_tm->tm_maxpage*r+(phys_pages-sum_maxpages()))/r));
return 1;
if (cbv->v.v_fillp+1==cbv->v.v_dim) {
- void *v=alloc_relblock(2*cbv->v.v_dim*sizeof(fixnum));
+ void *v;
+ object o=sSAleaf_collection_thresholdA->s.s_dbind;
+
+ sSAleaf_collection_thresholdA->s.s_dbind=make_fixnum(-1);
+ v=alloc_relblock(2*cbv->v.v_dim*sizeof(fixnum));
+ sSAleaf_collection_thresholdA->s.s_dbind=o;
memcpy(v,cbv->v.v_self,cbv->v.v_dim*sizeof(fixnum));
cbv->v.v_self=v;
cbp->cb_size=s;
cbp->cb_link=*cbpp;
- *cbpp=cbp;
if ((!cbp->cb_link || cbp->cb_link->cb_size!=s)) {
cbppp=expand_contblock_index(cbppp);
cbppp[1]=&cbp->cb_link;
}
+ *cbpp=cbp;
+
}
static inline void
if (rb_pointer>rb_end) {
fprintf(stderr,"Moving relblock low before expanding relblock pages\n");
fflush(stderr);
+ tm_table[t_relocatable].tm_adjgbccnt--;
GBC(t_relocatable);
}
nrbpage+=m;
struct pageinfo *v;
STATIC char *s, *e, *p, *q;
- object o;
ufixnum i;
reset_contblock_freelist();
- o=sSAleaf_collection_thresholdA->s.s_dbind;
- sSAleaf_collection_thresholdA->s.s_dbind=make_fixnum(-1);
-
for (i=0;i<contblock_array->v.v_fillp && (v=(void *)contblock_array->v.v_self[i]);i++) {
bool z;
}
- sSAleaf_collection_thresholdA->s.s_dbind=o;
-
sweep_link_array();
}
/* 1 args */
- if (x0 == Ct)
+ if (x0 == Ct) {
+ tm_table[t_contiguous].tm_adjgbccnt--;
GBC(t_other);
- else if (x0 == Cnil)
+ } else if (x0 == Cnil) {
+ tm_table[t_cons].tm_adjgbccnt--;
GBC(t_cons);
- else if (eql(small_fixnum(0),x0))
+ } else if (eql(small_fixnum(0),x0)) {
+ tm_table[t_contiguous].tm_adjgbccnt--;
GBC(t_contiguous);
- else {
+ } else {
x0 = small_fixnum(1);
+ tm_table[t_relocatable].tm_adjgbccnt--;
GBC(t_relocatable);
}
RETURN1(x0);