harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-4770) [classlib][luni] OSNetworkSystemLinux.c: selectImpl(), local ref removal
Date Mon, 10 Sep 2007 14:58:29 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-4770?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tim Ellison resolved HARMONY-4770.
----------------------------------

    Resolution: Fixed

Thanks Sergey,

Patch applied, and corresponding fixes made to Windows code, in LUNI module at repo revision
r574271.

Please check it was applied as expected.


> [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.


Mime
View raw message