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.
This commit is contained in:
parent
2fb18c3339
commit
03f68c49f6
1 changed files with 1 additions and 2 deletions
|
@ -250,8 +250,7 @@ attachimage(int type, Chan *c, uintptr base, ulong len)
|
|||
/* 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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue