<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 28/08/2023 15:52, Pedro Lamarão
wrote:<br>
</div>
<blockquote type="cite" cite="mid:CAC8PkgF0iZ=cvO9OzOrKbQRxHnFL-hAnMabO8Y63g2uZYH9N+g@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">Em seg., 28 de ago. de 2023 às 11:45, Maurizio
Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">maurizio.cimadamore@oracle.com</a>>
escreveu:</div>
<div dir="ltr"><br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
To get rid of the warning, you have to explicitly opt-in the
calling <br>
module into native access (which is done using the <br>
--enable-native-access command line flag).<br>
</blockquote>
</div>
<div><br>
</div>
<div>If I understand correctly, you are worried about the
specific combination of native memory pinning with GC's
incapable of granular pinning.</div>
<div>Wouldn't it be sufficient to warn about this specific
combination, maybe even suggesting a more appropriate,
alternative GC?</div>
<div>"warning: GC globally locked by native memory pinning
(consider switching to XYZ GC)"</div>
</div>
</blockquote>
<p>Yes, that is the worry. Note that, at the time of writing, only
Shenandoah (which is going to be removed from 22) supports
region-based pinning.</p>
<p>Support for region-based pinning for G1 (the default) is in the
works:</p>
<p><a class="moz-txt-link-freetext" href="https://bugs.openjdk.org/browse/JDK-8276094">https://bugs.openjdk.org/browse/JDK-8276094</a></p>
<p>So, I believe that before we provide such an API, we should at
least make sure we have _some_ GC which allow to pin w/o using GC
locker.</p>
<p>Cheers<br>
Maurizio<br>
</p>
<blockquote type="cite" cite="mid:CAC8PkgF0iZ=cvO9OzOrKbQRxHnFL-hAnMabO8Y63g2uZYH9N+g@mail.gmail.com">
<div dir="ltr">
<div><br>
</div>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>Pedro Lamarão</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>