diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-11 03:57:21 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-07-11 03:57:21 +0200 |
commit | 03f68c49f66e2d33acd73a25eac8a1bc0acbf38d (patch) | |
tree | a412757001e2831b5db512360e03dff842ffd7fd /sys | |
parent | 2fb18c3339cf8255d39bb41d495a79c9fca21ddd (diff) |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/9/port/segment.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/src/9/port/segment.c b/sys/src/9/port/segment.c index f876e2462..75098a590 100644 --- a/sys/src/9/port/segment.c +++ b/sys/src/9/port/segment.c @@ -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"); } |