<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hi Brian,<br>
<br>
Nicely reworded, Looks good.<br>
<br>
Do any of the existing direct buffer tests exercise that exception?<br>
If not, can one be improved to do so.<br>
<br>
Check the copyright date too.<br>
<br>
Thanks, Roger<br>
<br>
<div class="moz-cite-prefix">On 2/21/19 4:09 PM, Brian Burkhalter
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:1ABDA6F3-FA4C-499D-836B-C8DBE14C9EA9@oracle.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Feb 21, 2019, at 9:29 AM, Alan Bateman <<a
href="mailto:Alan.Bateman@oracle.com" class=""
moz-do-not-send="true">Alan.Bateman@oracle.com</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class=""><span style="caret-color: rgb(0, 0, 0);
font-family: Helvetica; font-size: 12px; font-style:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; float: none; display: inline
!important;" class="">On 21/02/2019 17:01, Brian
Burkhalter wrote:</span><br style="caret-color: rgb(0, 0,
0); font-family: Helvetica; font-size: 12px; font-style:
normal; font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none;" class="">
<blockquote type="cite" style="font-family: Helvetica;
font-size: 12px; font-style: normal; font-variant-caps:
normal; font-weight: normal; letter-spacing: normal;
orphans: auto; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; widows: auto;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; text-decoration: none;"
class="">Ping<br class="">
<br class="">
If we don’t want to improve the error message I suggest
resolving this as “Won’t Fix."<br class="">
</blockquote>
<span style="caret-color: rgb(0, 0, 0); font-family:
Helvetica; font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start; text-indent:
0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; float: none; display: inline
!important;" class="">"MAX_MEMORY" or "TOTAL_CAPACITY" are
the names of JDK internal fields so it might be better to
leave those names out of the message. We ould be able to
come up with shorter exception message to say that X bytes
of direct memory cannot be allocated and have it include
the current allocated and limit.</span></div>
</blockquote>
</div>
<br class="">
<div class="">Here is an updated version:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">@@
-172,8 +172,11 @@</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">Â Â
     }</span></div>
<p style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765); min-height: 13px;" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">Â </span><br
class="webkit-block-placeholder">
</p>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">Â Â
     // no luck</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">-Â
     throw new OutOfMemoryError("Direct buffer
memory");</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">-</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">+Â
     throw new OutOfMemoryError</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">+Â
       ("Cannot reserve "</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">+
        + size + " bytes of direct buffer memory
(allocated: "</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">+
        + RESERVED_MEMORY.get() + ", limit: " +
MAX_MEMORY +")");</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">+
        </span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">Â Â
   } finally {</span></div>
</div>
<div class=""><span style="font-variant-ligatures:
no-common-ligatures" class=""><br class="">
</span></div>
<div class="">Example error:</div>
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">bpb:CharBufferPutString{6}$
java -XX:MaxDirectMemorySize=42 -jar target/benchmarks.jar
-f 1 -wi 5 -w 5 -i 5 -r 5</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">Error
occurred during initialization of boot layer</span></div>
<div style="margin: 0px; font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo; background-color:
rgba(255, 255, 255, 0.811765);" class=""><span
style="font-variant-ligatures: no-common-ligatures" class="">java.lang.OutOfMemoryError:
Cannot reserve 8192 bytes of direct buffer memory
(allocated: 0, limit: 42)</span></div>
</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class=""><br class="">
</div>
<div class="">Brian</div>
</blockquote>
<br>
</body>
</html>