Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8147468

(bf) Allow users to bound the size of buffers cached in the per-thread buffer caches

    Details

    • Subcomponent:
    • Resolved In Build:
      b104
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        Some NIO channel operations use temporary DirectByteBuffers which are cached in thread-local caches to avoid having to allocate / free a buffer at every operation.

        Unfortunately, there is no bound imposed on the size of buffers added to the thread-local caches. So, infrequent channel operations that require a very large buffer can create a native memory leak.

        We should introduce a property, jdk.nio.MaxCachedBufferSize that if set sets a limit on the size of the buffers that can be added to the thread-local caches. Operations that require a buffer that is larger than this limit will allocate then free an one-off buffer.

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/9dd3af3d5b3f
            User: tonyp
            Date: 2016-01-28 16:18:28 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/9dd3af3d5b3f User: tonyp Date: 2016-01-28 16:18:28 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/9dd3af3d5b3f
            User: lana
            Date: 2016-02-03 20:54:42 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/9dd3af3d5b3f User: lana Date: 2016-02-03 20:54:42 +0000

              People

              • Assignee:
                tonyp Tony Printezis
                Reporter:
                tonyp Tony Printezis
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: