kernel: leave shared, physical and fixed segments alone in killbig()
This commit is contained in:
parent
ef647a54c0
commit
82a797da70
1 changed files with 10 additions and 4 deletions
|
@ -1552,11 +1552,17 @@ 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)
|
||||||
qlock(s);
|
continue;
|
||||||
mfreeseg(s, s->base, (s->top - s->base)/BY2PG);
|
switch(s->type & SG_TYPE){
|
||||||
qunlock(s);
|
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);
|
qunlock(&kp->seglock);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue