This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Low RAM Problem : -> Android Jellybean 4.2.2 With TI am335x Starter Kit



Hi,

I am using TI's  am335x Starter Kit For The Development. I have made some Changes For 3g Modem integration in the Android Source and  have built

 the Android . 

With this,3g Modem Gets Connected to Internet and also it Can Browse the Webpages For some time.

But after 3-4 minutes starter kit Gets  hanged and Restarts.

According to Logcat it shows out of Memory Error ,and  Linux Kernel kills the Processes.

What can I do to Avoid this Error . What are the ways to reduce memory usage  and overcome this problem?

How much  RAM is required to work android jellybean 4.2.2 smoothly on any  device since starter kit has  256mb of RAM.


Thanks and Regards

Vinod

  • Hi Vinod Kshirsagar,

    It depends on howmany applications you are trying to execute at single instance. Anyhow 256M is enough for a single app.

    I can advice one thing for you ... For timebieng to verify your 3G module integration, you can disable unwanted applications and libraries in the build/target/product/core.mk and build/target/product/base.mk files.

  • Hello,

    The latest official Android (JB 4.2.2) was thoroughly tested on the AM335x SK and don't have memory problem.
    Since this problem appears after you integrated your modem, the only culprit would be its driver; you should check for a memory leak inside it.

  • Hi Ashok Kumar,
    Thanks for the quick Reply ,
    I analysed RAM usage From Settings App. While Running The Browser I can See 80 to 90 MB of Free RAM Space.
    Still Starter kit becomes unresponsive and gets hanged and restarts.

    From the Logcats , It shows some issue of swap cache. How can I resolve this issue ?How can I increase the swap space or How can I use swap space Efficiently.

    Followings are Logs:->

    [ 799.801239] Mem-info:
    [ 799.803588] Normal per-cpu:
    [ 799.806518] CPU 0: hi: 90, btch: 15 usd: 0
    [ 799.811523] active_anon:30212 inactive_anon:67 isolated_anon:0
    [ 799.811523] active_file:1403 inactive_file:1540 isolated_file:0
    [ 799.811553] unevictable:0 dirty:0 writeback:6 unstable:0
    [ 799.811553] free:511 slab_reclaimable:1029 slab_unreclaimable:2018
    [ 799.811553] mapped:22156 shmem:74 pagetables:1449 bounce:0
    [ 799.841857] Normal free:2044kB min:2036kB low:2544kB high:3052kB active_anon:
    120848kB inactive_anon:268kB active_file:5612kB inactive_file:6160kB unevictable
    :0kB isolated(anon):0kB isolated(file):0kB present:260096kB mlocked:0kB dirty:0k
    B writeback:24kB mapped:88624kB shmem:296kB slab_reclaimable:4116kB slab_unrecla
    imable:8072kB kernel_stack:3528kB pagetables:5796kB unstable:0kB bounce:0kB writ
    eback_tmp:0kB pages_scanned:37608 all_unreclaimable? yes
    [ 799.883361] lowmem_reserve[]: 0 0
    [ 799.886840] Normal: 5*4kB 29*8kB 22*16kB 19*32kB 11*64kB 1*128kB 0*256kB 0*51
    2kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB = 2044kB
    [ 799.898712] 3017 total pagecache pages
    [ 799.902618] 0 pages in swap cache
    [ 799.906066] Swap cache stats: add 0, delete 0, find 0/0
    [ 799.911499] Free swap = 0kB
    [ 799.914520] Total swap = 0kB
    [ 799.927947] 65536 pages of RAM
    [ 799.931152] 1072 free pages
    [ 799.934082] 2954 reserved pages
    [ 799.937377] 3047 slab pages
    [ 799.940277] 71306 pages shared
    [ 799.943450] 0 pages swap cached
    [ 799.946746] [ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj n
    ame
    [ 799.954498] [ 59] 0 59 88 22 0 -16 -941 u
    eventd
    [ 799.962493] [ 67] 1000 67 223 57 0 -16 -941 s
    ervicemanager
    [ 799.971130] [ 68] 0 68 1019 108 0 -16 -941 v
    old
    [ 799.978881] [ 70] 0 70 227 60 0 -16 -941 u
    im-sysfs
    [ 799.987060] [ 71] 0 71 2477 153 0 -16 -941 n
    etd
    [ 799.994781] [ 72] 0 72 679 518 0 -16 -941 d
    ebuggerd
    [ 800.002960] [ 73] 1000 73 7527 4382 0 -16 -941 s
    urfaceflinger
    [ 800.011596] [ 74] 0 74 114617 2975 0 -16 -941 z
    ygote
    [ 800.019500] [ 75] 1019 75 2251 242 0 -16 -941 d
    rmserver
    [ 800.027679] [ 76] 1013 76 6651 458 0 -16 -941 m
    ediaserver
    [ 800.036071] [ 77] 1012 77 229 71 0 -16 -941 i
    nstalld
    [ 800.044128] [ 78] 1017 78 458 103 0 -16 -941 k
    eystore
    [ 800.052246] [ 79] 1001 79 1787 485 0 -16 -941 r
    ild
    [ 800.059967] [ 83] 1023 83 582 72 0 -16 -941 s
    dcard
    [ 800.067871] [ 84] 0 84 206 54 0 -16 -941 s
    h
    [ 800.075439] [ 323] 1000 323 136825 5403 0 -16 -941 s
    ystem_server
    [ 800.083953] [ 405] 10005 405 122482 7394 0 -16 -941 n
    droid.systemui
    [ 800.092681] [ 466] 10026 466 118226 3371 0 -16 -941 d
    .process.media
    [ 800.101409] [ 481] 10039 481 117998 3178 0 -16 -941 p
    utmethod.latin
    [ 800.110137] [ 496] 1001 496 120847 3551 0 -16 -941 m
    .android.phone
    [ 800.118865] [ 508] 10012 508 125824 8852 0 -16 -941 n
    droid.launcher
    [ 800.127593] [ 544] 10031 544 116701 2985 0 -16 -941 .
    location.fused
    [ 800.136291] [ 568] 10006 568 122772 3617 0 -16 -941 d
    .process.acore
    [ 800.145019] [ 587] 10009 587 116750 3004 0 -16 -941 a
    ndroid.smspush
    [ 800.153747] [ 596] 10021 596 117133 3057 0 -16 -941 m
    .android.music
    [ 800.162475] [ 653] 0 653 862 16 0 -16 -941 a
    dbd
    [ 800.170196] [ 660] 10001 660 119349 3227 0 -16 -941 m
    .android.email
    [ 800.178924] [ 700] 10022 700 118264 3066 0 -16 -941 n
    droid.exchange
    [ 800.187652] [ 717] 10025 717 117664 3133 0 -16 -941 d
    roid.deskclock
    [ 800.196380] [ 744] 10042 744 118859 3209 0 -16 -941 v
    iders.calendar
    [ 800.205108] [ 760] 10007 760 121618 3144 0 -16 -941 n
    droid.calendar
    [ 800.213806] [ 800] 10034 800 123166 7028 0 -16 -941 o
    id.development
    [ 800.222534] [ 815] 10002 815 116744 2991 0 -16 -941 a
    ndroid.musicfx
    [ 800.231262] [ 880] 10020 880 117221 3063 0 -16 -941 i
    d.defcontainer
    [ 800.239990] [ 930] 0 930 545 103 0 -16 -941 p
    ppd
    [ 800.247741] [ 1040] 10013 1040 141441 18238 0 -16 -941 a
    ndroid.browser
    [ 800.256439] Out of memory: Kill process 59 (ueventd) score 1 or sacrifice chi
    ld
    [ 800.264068] Killed process 59 (ueventd) total-vm:352kB, anon-rss:84kB, file-r
    ss:4kB




    Thanks and Regards ,
    Vinod
  • Hi Vinod,

    I hope this link may helpful for you.

    forum.xda-developers.com/showthread.php

    Regards
    Ashok
  • Hi Vinod,

    Some more links I found.
    v-kompany.blogspot.in/.../how-to-enable-swap-to-zram-on-android.html
    You can find some useful utilites to find the ram usage in the below pdf.
    2net.co.uk/.../android-lowmemory-abs-2014.pdf

    Regards
    Ashok .K
  • Hello,

    Can you try to disable your modem driver (or use a unmodified TI Android release) and open a local file on the browser? You can use "file:///sdcard/SomeLocalFile.html" in the browser's address bar.
    We would like to make sure where the problem comes from.
  • Hello'

    I tried opening Local File on browser, Local File can be opened with or without 3g modem driver . There is no problem opening single file on browser .

    I also tried using Low RAM Configuration found on the below link:

    https://source.android.com/devices/tech/ram/low-ram.html

    Still device gets hanged after surfing web pages for 3-4 minutes.

    Thanks and Regards

    Vinod Kshirsagar

  • Hello Adeno Embedded Support Team,
    From the Logcats we could see Some issue regarding Heap Memory.Before the Device gets hanged following Logs Are seen:



    I/dalvikvm-heap( 1676): Grow heap (frag case) to 5.446MB for 525136-byte allocation
    D/dalvikvm( 1676): GC_FOR_ALLOC freed 685K, 29% free 4730K/6616K, paused 68ms, total 68ms
    D/dalvikvm( 1676): GC_CONCURRENT freed 52K, 26% free 4920K/6616K, paused 20ms+34ms, total 141ms
    D/dalvikvm( 1676): WAIT_FOR_CONCURRENT_GC blocked 110ms
    I/dalvikvm-heap( 1676): Grow heap (frag case) to 5.353MB for 411152-byte allocation
    D/dalvikvm( 1676): WAIT_FOR_CONCURRENT_GC blocked 106ms
    I/dalvikvm-heap( 1676): Grow heap (frag case) to 5.697MB for 360016-byte allocation
    D/dalvikvm( 1676): WAIT_FOR_CONCURRENT_GC blocked 95ms
    I/dalvikvm-heap( 1676): Grow heap (frag case) to 6.923MB for 1286224-byte allocation
    D/dalvikvm( 1676): GC_FOR_ALLOC freed 544K, 27% free 6384K/8632K, paused 89ms, total 89ms
    D/dalvikvm( 1676): GC_FOR_ALLOC freed 1055K, 30% free 6065K/8632K, paused 84ms, total 86ms



    I think,If device allocates maximum heap memory then it will show out of memory error and device will get hanged.
    How can i resolve this issue regarding heap memory?

    Thanks and Regards,
    Vinod
  • Hello,

    Those dalvik logs are normal, they are just here to inform when it frees memory or when an application request some.

    Can you tell me what you tried to do with the local files? I was thinking to remove the modem from your board, start with a fresh BSP without your driver, save few webpages on your SD card (ideally the same that you browse when you are experiencing the freeze) and open them on different tabs.

    If you can't reproduce the problem like this, it means the problem comes from your driver; there are tools available to help you track memory leaks from drivers.

  • Hello,

    I Tested the device in two ways with  android source  unchanged  .

    1. For Browsing the web pages I used the Ethernet Connection .In this case also Browser can browse the web pages for some time and after that it freezes and sometimes device gets restarted.

    2.I created some html files using touch command and  then tried opening in multiple tabs in the browser.In this case there was no problem of freezing.

    Can you tell what could be the problem or can you suggest any tool to detect  the memory leak.

    Thanks and Regards,

    Vinod