You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Leo Li (JIRA)" <ji...@apache.org> on 2007/02/13 04:36:05 UTC
[jira] Updated: (HARMONY-3148) [Classlib][nio] alloc many
DirectByteBuffers may cause memory-out-error
[ https://issues.apache.org/jira/browse/HARMONY-3148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li updated HARMONY-3148:
----------------------------
Attachment: patch-3148.zip
Hi, all:
In the patch, before new memory is allocated to dirrect byte buffer, current system memory status will be queried. And if necessary, a System.gc will be invoked.
And it can prevent the out-of-memory error occured in this jira.
But the real number of threshold is debatable. After some experiments, I found that the necessary free memory required to remain is dependent on the VM and OS we uses.
Will somebody try the patch?
Thanks,
Leo.
> [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.