ref: 66dc6513c568289884c61049ea5f53db67a80a28
parent: e594d98f14e6d77a0503b77848d46132dfb6e357
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 16 12:30:14 EDT 2015
kernel: leave shared, physical and fixed segments alone in killbig()
--- a/sys/src/9/port/proc.c
+++ b/sys/src/9/port/proc.c
@@ -1552,11 +1552,17 @@
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);
}
--
⑨