int host_count = static_cast<int>(env->GetArrayLength(jhosts));
jdouble* jcomputeDurations = env->GetDoubleArrayElements(jcomputeDurations_arg, 0);
int host_count = static_cast<int>(env->GetArrayLength(jhosts));
jdouble* jcomputeDurations = env->GetDoubleArrayElements(jcomputeDurations_arg, 0);
- msg_host_t* hosts = xbt_new0(msg_host_t, host_count);
- double* computeDurations = xbt_new0(double, host_count);
+ msg_host_t* hosts = new msg_host_t[host_count];
+ double* computeDurations = new double[host_count];
for (int index = 0; index < host_count; index++) {
jobject jhost = env->GetObjectArrayElement(jhosts, index);
hosts[index] = jhost_get_native(env, jhost);
for (int index = 0; index < host_count; index++) {
jobject jhost = env->GetObjectArrayElement(jhosts, index);
hosts[index] = jhost_get_native(env, jhost);
env->ReleaseDoubleArrayElements(jcomputeDurations_arg, jcomputeDurations, 0);
jdouble* jmessageSizes = env->GetDoubleArrayElements(jmessageSizes_arg, 0);
env->ReleaseDoubleArrayElements(jcomputeDurations_arg, jcomputeDurations, 0);
jdouble* jmessageSizes = env->GetDoubleArrayElements(jmessageSizes_arg, 0);
for (int index = 0; index < host_count * host_count; index++) {
messageSizes[index] = jmessageSizes[index];
}
for (int index = 0; index < host_count * host_count; index++) {
messageSizes[index] = jmessageSizes[index];
}
/* associate the java task object and the native task */
jtask_bind(jtask, task, env);
/* associate the java task object and the native task */
jtask_bind(jtask, task, env);
- jxbt_check_res("MSG_task_cancel()", rv, MSG_OK, bprintf("unexpected error , please report this bug"));
+ jxbt_check_res("MSG_task_cancel()", rv, MSG_OK, "unexpected error , please report this bug");
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jtask, jobject jname) {
}
JNIEXPORT void JNICALL Java_org_simgrid_msg_Task_setName(JNIEnv *env, jobject jtask, jobject jname) {
/* There should be a cache here */
jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);
/* There should be a cache here */
jobject jcomm = env->NewObject(comm_class, jtask_method_Comm_constructor);