You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Tim Ellison (JIRA)" <ji...@apache.org> on 2007/09/10 16:39:29 UTC
[jira] Assigned: (HARMONY-4770) [classlib][luni]
OSNetworkSystemLinux.c: selectImpl(), local ref removal
[ https://issues.apache.org/jira/browse/HARMONY-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tim Ellison reassigned HARMONY-4770:
------------------------------------
Assignee: Tim Ellison
> [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
> Assignee: Tim Ellison
> Attachments: 4770.patch
>
>
> Currently OSNetworkSystemLinux.c:selectImpl() contains:
> ---cut---
> 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;
> }
> ---cut---
> 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 refs.
> Please refer to "The Java Native Interface. Programmer's Guide and Specification" for more details.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.