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