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;
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue