harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3148) [Classlib][nio] alloc many DirectByteBuffers may cause memory-out-error
Date Wed, 23 May 2007 11:51:16 GMT

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

Alexey Petrenko commented on HARMONY-3148:
------------------------------------------

I had a quick look into the patch and got one question...
The patch creates a new class OSResourcesMonitor with the
isSystemPhysicalMemoryLowDefault native method.
OSMemory.malloc calls this method in the very begining and then call
another native method to allocate memory.

Why do we need two native calls here if we can check the native heap
size in the native method which allocates it? This method can return a
flag to run GC...

Did I miss something?


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


Mime
View raw message