JNI referencetable overflow Leakage

Source: Internet
Author: User

Info [225716.880557] (8065: 11668) socket msgid: 0
Warn [225716.880557] (8065: 11669) dalvikvm referencetable overflow (max = 1024)
Warn [225716.880557] (8065: 11669) dalvikvm JNI pinned array reference table (0x76292450) dump:
Warn [225716.880557] (8065: 11669) dalvikvm last 10 entries (of 1024 ):
Warn [225716.880557] (8065: 11669) dalvikvm 1023: 0x44801458 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1022: 0x447be260 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1021: 0x44801908 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1020: 0x4476bb58 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1019: 0x44766680 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1018: 0x44744088 byte [] (128 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1017: 0x44744348 byte [] (128 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1016: 0x44778d38 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1015: 0x44833328 byte [] (233 elements)
Warn [225716.880557] (8065: 11669) dalvikvm 1014: 0x44917c58 byte [] (233 elements)
Error [225716.880557] (8065: 11668) pushconnection get message exception
Info [225716.880557] (8065: 11668) pushconnection receive err, errno: 0
Warn [225716.880557] (8065: 11669) dalvikvm summary:
Warn [225716.880557] (8065: 11669) dalvikvm 404 of byte [] (2 elements) (404 unique instances)
Warn [225716.880557] (8065: 11669) dalvikvm 2 of byte [] (128 elements) (2 unique instances)
Warn [225716.880557] (8065: 11669) dalvikvm 618 of byte [] (233 elements) (618 unique instances)
Error [225716.880557] (8065: 11669) dalvikvm failed adding to JNI pinned array ref table (1024 entries)
Info [225716.880557] (8065: 11669) dalvikvm "pushservice-pushconnection-sendthread" PRIO = 5 tid = 14 runnable
Info [225716.880557] (8065: 11669) dalvikvm | group = "Main" scount = 0 dscount = 0 OBJ = 0x4473b680 self = 0x718111c0
Info [225716.880557] (8065: 11669) dalvikvm | kernel id = 11669 nice = 0 sched = 0/0 MRM = apps/bg_non_interactive handle = 1904689136
Info [225716.880557] (8065: 11669) dalvikvm | state = r schedstat = (4128488 1119325 30) UTM = 0 STM = 0 core = 3

Failed adding to JNI pinned array ref table (1024 entries), cannot add array references pointed to in JNI. The key sentence is referencetable overflow (max = 1024). The reference counter overflows,

The maximum value is 1024. That is, the memory management mechanism of Java is reference-based, and a counter is required to record the number of references. After the overflow statement, when the reference count reaches 1024, dump generates the latest 10 references.

In this case, you need to use setbytearrayregion () in the newbytearray method, and use releasebytearrayelements for release when using getbytearrayelement.

Http://stackoverflow.com/questions/10383458/returning-jbytearray-from-native-c-in-android/10384585#10384585

 

JNI referencetable overflow Leakage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.