< prev index next >
test/gc/shenandoah/jni/libTestPinnedGarbage.c
Print this page
rev 10790 : [backport] Prefix Shenandoah tests with "Test"
*** 1,7 ****
/*
! * Copyright (c) 2016 Red Hat, Inc. and/or its affiliates.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
--- 1,7 ----
/*
! * Copyright (c) 2016, 2018, Red Hat, Inc. All rights reserved.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
*** 25,37 ****
#include <string.h>
static jint* pinned;
JNIEXPORT void JNICALL
! Java_PinnedGarbage_pin(JNIEnv *env, jclass unused, jintArray a) {
pinned = (*env)->GetPrimitiveArrayCritical(env, a, 0);
}
JNIEXPORT void JNICALL
! Java_PinnedGarbage_unpin(JNIEnv *env, jclass unused, jintArray a) {
(*env)->ReleasePrimitiveArrayCritical(env, a, pinned, 0);
}
--- 25,37 ----
#include <string.h>
static jint* pinned;
JNIEXPORT void JNICALL
! Java_TestPinnedGarbage_pin(JNIEnv *env, jclass unused, jintArray a) {
pinned = (*env)->GetPrimitiveArrayCritical(env, a, 0);
}
JNIEXPORT void JNICALL
! Java_TestPinnedGarbage_unpin(JNIEnv *env, jclass unused, jintArray a) {
(*env)->ReleasePrimitiveArrayCritical(env, a, pinned, 0);
}
< prev index next >