kernel: leave shared, physical and fixed segments alone in killbig()

This commit is contained in:
cinap_lenrek 2015-04-16 16:30:14 +02:00
parent ef647a54c0
commit 82a797da70

View file

@ -1552,12 +1552,18 @@ killbig(char *why)
kp->procctl = Proc_exitbig; kp->procctl = Proc_exitbig;
for(i = 0; i < NSEG; i++) { for(i = 0; i < NSEG; i++) {
s = kp->seg[i]; s = kp->seg[i];
if(s != nil) { if(s == nil)
continue;
switch(s->type & SG_TYPE){
case SG_SHARED:
case SG_PHYSICAL:
case SG_FIXED:
continue;
}
qlock(s); qlock(s);
mfreeseg(s, s->base, (s->top - s->base)/BY2PG); mfreeseg(s, s->base, (s->top - s->base)/BY2PG);
qunlock(s); qunlock(s);
} }
}
qunlock(&kp->seglock); qunlock(&kp->seglock);
} }