diff options
| -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"); } |
