diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-16 16:30:14 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-16 16:30:14 +0200 |
commit | 82a797da707881fa3188cab7424738cd07fe9c92 (patch) | |
tree | dc5d8690e8c749b8ff5f724bbaf26536ce852f26 /sys/src | |
parent | ef647a54c006a2a748463c81132c22ecb01d2dac (diff) |
kernel: leave shared, physical and fixed segments alone in killbig()
Diffstat (limited to 'sys/src')
-rw-r--r-- | sys/src/9/port/proc.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/src/9/port/proc.c b/sys/src/9/port/proc.c index 0f5f6f992..111fec5fa 100644 --- a/sys/src/9/port/proc.c +++ b/sys/src/9/port/proc.c @@ -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); } |