<div dir="ltr"><div dir="ltr">Em seg., 28 de ago. de 2023 às 11:58, Maurizio Cimadamore <<a href="mailto:maurizio.cimadamore@oracle.com">maurizio.cimadamore@oracle.com</a>> escreveu:<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">
<div>
<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.<br></p>
<p>Support for region-based pinning for G1 (the default) is in the
works:</p>
<p><a href="https://bugs.openjdk.org/browse/JDK-8276094" target="_blank">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></div></blockquote><div><br></div><div>With helpful JFR events, this sounds very reasonable to me. </div><div>Pinning would help hardware security module applications which need to feed memory into native "cryptoki.dll" modules.</div><div>Such calls are not expected to take very long.</div><div>There should be interesting use cases inside SunPKCS11 security provider.</div></div><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>