<div dir="ltr">Is there a good write up on how the synchronization happen between JNI and GC?<div>I am looking at the NewGlobalRef code but it has assert statement like this:</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:16.25px;white-space:pre">assert(!Universe::heap()->is_gc_active(), </span><span class="" style="color:rgb(0,136,0);font-family:monospace;font-size:medium;line-height:16.25px;white-space:pre">"can't extend the root set during GC"</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:16.25px;white-space:pre">);</span><br>
</div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:16.25px;white-space:pre"><br></span></div>But how is this enforced by the JNI code calling NewGlobalRef?<div><br></div><div>Thanks,</div>
<div>Jungwoo</div></div>