On Fri, 25 Nov 2022 13:09:27 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:

> Hi Matthias,
> 
> But all this is just theoretical, right, since GPAC does not allocate memory 
> in hotspot? Your patch is fine, though I would prefer OOMEs instead of 
> silently omitting code.
> 
> Cheers, Thomas

Hi Thomas, from what I see in Hotspot  (src/hotspot/share/prims/jni.cpp)  ,  
2815  JNI_ENTRY(void*, jni_GetPrimitiveArrayCritical(JNIEnv *env, jarray array, 
jboolean *isCopy))
2816   HOTSPOT_JNI_GETPRIMITIVEARRAYCRITICAL_ENTRY(env, array, (uintptr_t *) 
isCopy);
2817    if (isCopy != NULL) {
2818      *isCopy = JNI_FALSE;
2819    }

isCopy is always set to JNI_FALSE (in case the copy-related parameter is not 
NULL. So I think your observation about memory allocation is correct.

-------------

PR: https://git.openjdk.org/jdk/pull/11361

Reply via email to