[PING] JDK 10 RFR of 8184157: (ch) AsynchronousFileChannel hangs with internal error when reading locked file
brian.burkhalter at oracle.com
Fri Aug 11 20:06:11 UTC 2017
On Aug 11, 2017, at 12:57 PM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>> Seeing that overlapped (some) memory is freed only at close, can there be a problem with
>> a very active channel that is open for a long time to accumulate/leak native memory?
>> PendingIoCache:135-136: Or is that just belt and suspenders?
> No I think that is a very good point. After invalidate() the value of “overlapped” is needed but I don’t think the memory it points to. I think the freeMemory() call should be moved into invalidate(). Good catch! I will update and re-post.
Actually I replied too soon. I think the remove() call at line 105 of PendingIoCache takes care of this. If the “overlapped” key was not in the map, then an attempt is made to remove it from the HashSet and if present the same action is taken as if it had been in the map. So the memory release in close() is just for draining anything left in the map and set, if there is even anything there.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the nio-dev