harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Dmitriev (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4770) [classlib][luni] OSNetworkSystemLinux.c: selectImpl(), local ref removal
Date Mon, 10 Sep 2007 13:15:30 GMT
[classlib][luni] OSNetworkSystemLinux.c: selectImpl(), local ref removal

                 Key: HARMONY-4770
                 URL: https://issues.apache.org/jira/browse/HARMONY-4770
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Linux
            Reporter: Sergey Dmitriev

Currently OSNetworkSystemLinux.c:selectImpl() contains:

  jobject gotFD;
  for (val=0; val<countReadC; val++) {
      gotFD = (*env)->GetObjectArrayElement(env, readFDArray, val);
      hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, gotFD);

      my_pollfds[val].fd = hysocketP->sock;
      my_pollfds[val].events = POLLIN | POLLPRI;
      my_pollfds[val].revents = 0;

  for (val=0; val<countWriteC; val++) {
      gotFD = (*env)->GetObjectArrayElement(env, writeFDArray, val);
      hysocketP = getJavaIoFileDescriptorContentsAsAPointer (env, gotFD);

      my_pollfds[countReadC + val].fd = hysocketP->sock;
      my_pollfds[countReadC + val].events = POLLOUT;
      my_pollfds[countReadC + val].revents = 0;

As you can see we have a local referenec gotFD in both cycles and in both cases corresponding
(*env)->DeleteLocalRef(env, gotFD) should be inserted. For example in case of Oracle OC4J
we deal with couple of thousands of FDs (on injection rate 200) so we create 2000 of local

Please refer to "The Java Native Interface. Programmer's Guide and Specification" for more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message