You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Patrick Chung (JIRA)" <ji...@apache.org> on 2016/08/23 00:47:20 UTC

[jira] [Updated] (REEF-1539) Fix memory leak in InteropUtil.cpp

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

Patrick Chung updated REEF-1539:
--------------------------------
    Description: 
{{ManagedByteArrayFromJavaByteArray}} in Org.Apache.REEF.Bridge.InteropUtil.cpp uses JNI {{GetByteArrayElements}} but does not release the bytes. This causes the driver to slowly leak memory over time, which is exacerbated if the driver message is large.

JNI documentation recommends that {{Release<PrimitiveType>ByteArrayElements}} be called after {{Get<PrimitiveTypeType>ByteArrayElements}} to avoid leaking memory, since the returned array may be a copy of the Java array.

  was:
{{ManagedByteArrayFromJavaByteArray}} in Org.Apache.REEF.Bridge.InteropUtil.cpp uses JNI {{GetByteArrayElements}} but does not release the bytes.

JNI documentation recommends that {{Release<PrimitiveType>ByteArrayElements}} be called after {{Get<PrimitiveTypeType>ByteArrayElements}} to avoid leaking memory, since the returned array may be a copy of the Java array.


> Fix memory leak in InteropUtil.cpp
> ----------------------------------
>
>                 Key: REEF-1539
>                 URL: https://issues.apache.org/jira/browse/REEF-1539
>             Project: REEF
>          Issue Type: Bug
>          Components: REEF Bridge
>            Reporter: Patrick Chung
>
> {{ManagedByteArrayFromJavaByteArray}} in Org.Apache.REEF.Bridge.InteropUtil.cpp uses JNI {{GetByteArrayElements}} but does not release the bytes. This causes the driver to slowly leak memory over time, which is exacerbated if the driver message is large.
> JNI documentation recommends that {{Release<PrimitiveType>ByteArrayElements}} be called after {{Get<PrimitiveTypeType>ByteArrayElements}} to avoid leaking memory, since the returned array may be a copy of the Java array.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)