<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Alan,<br><div><br><blockquote type="cite"><div>On 12 Sep 2023, at 20:58, Alan Bateman <Alan.Bateman@oracle.com> wrote:</div><div><div><br>
    <div class="moz-cite-prefix">On 12/09/2023 18:05,
      <a class="moz-txt-link-abbreviated" href="mailto:github@paul.kungfoocoder.org">github@paul.kungfoocoder.org</a> wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:D3EFDB1F-13D8-4633-9831-65A998554FF8@paul.kungfoocoder.org">
      
      <div style="display: block;"><span style="caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40);">Note that this isn't
          strictly a problem of </span><code class="notranslate" style="box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; white-space: break-spaces; border-radius: 6px; caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40);">Files.copy</code><span style="caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40); font-size: 14px; background-color: rgb(255, 255, 255);">, but
          rather of the output stream returned by</span><code class="notranslate" style="box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; white-space: break-spaces; border-radius: 6px; caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40);">Files.newOutputStream</code><span style="caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40); font-size: 14px; background-color: rgb(255, 255, 255);">, as
          evidenced by </span><code class="notranslate" style="box-sizing: border-box; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.9px; padding: 0.2em 0.4em; margin: 0px; white-space: break-spaces; border-radius: 6px; caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40);">echo 'new java.io.ByteArrayInputStream(new byte[256*1024*1024]).transferTo(java.nio.file.Files.newOutputStream(java.nio.file.Path.of("/tmp/aaa")));' | jshell -R-XX:MaxDirectMemorySize=25M</code><span style="caret-color: rgb(31, 35, 40); color: rgb(31, 35, 40); font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; font-size: 11.9px; white-space: break-spaces;"> </span></div>
      <br>
    </blockquote>
    Right, it's ChannelOutputStream.writeFully that doesn't limit the
    size of the writes to the underlying FileChannel. Improving that
    would reduce direct buffer usage for several operations (not just
    copy).<br></div></div></blockquote></div><br><div>Agreed. My question is what is the next step now that I have identified this problem? Do others agree that this is something that should be fixed? What can I do to move this forward?</div><div><br></div><div>Cheers,</div><div>Paul</div></body></html>