harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leo Li (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3148) [Classlib][nio] alloc many DirectByteBuffers may cause memory-out-error
Date Tue, 21 Aug 2007 02:27:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521298

Leo Li commented on HARMONY-3148:

Hi, all
      The problem we encountered before is gc is not  so in time as we expected. So in my
patch, if the memory hits threshold, the thread try to allocate direct byte buffer will sleep
100-200 milli seconds to slow down the velocity of allocation and let gc complete. 
      Both the timespan to sleep and the memory threshold is empiric value and open to discussion.
I have tried running stress tests, including allocating 8M per direct buffer to 64M per block,
for 1000 times, both on windows XP and suse linux 10. And harmony uses similar or even less
time than RI, but on windows XP RI costs less CPU which deserves us for further study.

Good luck!

> [Classlib][nio] alloc many DirectByteBuffers may cause memory-out-error
> -----------------------------------------------------------------------
>                 Key: HARMONY-3148
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3148
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Jimmy, Jing Lv
>            Assignee: Alexey Petrenko
>         Attachments: H-3148_2.patch, patch-3148.zip
> Hi,
>      As discussed on mailing-list, DirectByteBuffer uses native memory which is out of
GC-control, alloc many DirectByteBuffer may cause memory-out-error if they are not GCed, even
they can be GCed at that time. 
>      This happens in Harmony but not in RI. This should be a bug of Harmony.
>      Note: other native memory users, e.g., java.util.zip.Deflater, may cause this problem
as well.

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

View raw message