harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Markov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3148) [Classlib][nio] alloc many DirectByteBuffers may cause memory-out-error
Date Wed, 18 Apr 2007 17:45:15 GMT

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

Mikhail Markov commented on HARMONY-3148:
-----------------------------------------

It seems that after applying Leo's patch i forgot to do 'ant clean' that's why it does not
fix the problem.
Now I fully rebuilded classlib with applied Leo's patch and modified test starts working without
problems.
Sorry for confusions.

So, the results of my patch evaluation (for WinXP) are the following:
The patch should be modified in the following way:
1) The regression test case in the patch should be modified to call not ByteBuffer.allocate()
method but ByteBuffer.allocateDirect() one instead.
2) 'stat.dwLength = sizeof (stat);'  line should be added after 'MEMORYSTATUSEX stat;' line
in OSResourcesMonitorWin32.c (as pointed by Win API help).

The modified regression test case fails with OOM on not-patched version of Harmony after 42nd
iteration (and works very slow after several initial iterations). On RI it passes. And after
applying the modifed version of Leo's patch the testcase starts working on Harmony without
OOM (on WinXP at least).


> [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
>         Assigned To: Tim Ellison
>         Attachments: 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.


Mime
View raw message