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

inefficient DatagramChannel buffer allocation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta3
    • generic
    • generic

      From skimming the source for sun.nio.ch.DatagramChannelImpl.
      it looks to me like 'buf' needs to be reassigned in getDirectBuffer()
      whenever it allocates a new buffer. Right now, it gets left as null
      and then is passed to receive() which then pointlessly allocates
      another buffer to actually receive the data.

      As far as I can see this is a performance issue but the
      code should behave correctly from a user perspective.

            mmcclosksunw Michael Mccloskey (Inactive)
            jdn Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: