ref: abb878d168964d0e660c3fbd9488247a5c699424
parent: 19320940aab33bb9d04f25016c959542dd1d2789
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Jul 10 23:57:21 EDT 2014
kernel: only complain about no images when theres nothing more to reclaim uncaching a thousand pages (arround 4MB) might not be enougth. so keep on reclaiming pages and only complain once theres nothing more to reclaim.
--- a/sys/src/9/port/segment.c
+++ b/sys/src/9/port/segment.c
@@ -250,8 +250,7 @@
/* dump pages of inactive images to free image structures */
while((i = imagealloc.free) == nil) {unlock(&imagealloc);
- imagereclaim(1000);
- if(imagealloc.free == nil){+ if(imagereclaim(1000) == 0 && imagealloc.free == nil){freebroken(); /* can use the memory */
resrcwait("no image after reclaim");}
--
⑨