1. JerseyDriver's Avatar
    So I had a very strange thing happen tonight and I couldn't find anything quite the same while searching so I'm posting in General since I have no idea if it's phone/OS/computer related.

    After medium~heavy use of my Bold all day, was down to about 8M of memory (small leak right now, may be OS related) and was about to enter a fantasy draft for the NHL playoffs with my BBM group. We were running the draft via BBM, and my battery was also running low, so I plugged it into my Mac with a USB so it wouldn't run low and die. I also went to Options > Screen/Keyboard and turned my Backlight up to 2 min and Auto Dim to off. I run AutoStandy and had that set to off as well. This was at about 10PM, then we started the draft.

    About 90 min later I happened to check my memory, and it was up to 19.2. I was shocked to say the least, as I was constantly chatting in BBM , got/answered a few texts and emails. It did take about 10-20 seconds to re-open chat if I exited, but I assumed this was because of the heavy chat load. After 2 hours when we had finished, I checked the memory again, and after not using the BB for about 10-15 minutes, it had dropped to 6 or so. Let it go for another 30 minutes but it never went up past that.

    Have since done a battery pull and all is normal running around 20 at start up. I noticed in the period after it had dropped back down I was on EDGE, where I am normally on 3G, but I hadn't checked that during the period where it was increasing memory.

    So the questions.
    1. Has this happened to anyone else? More than once?
    2. Does using EDGE/2G use less memory? (I know it can save battery in bad 3G areas, don't know about memory.)
    3. Is there some way this is computer related? I usually just have it plugged in for a few minutes to backup/sync, never left it plugged in, but will try this again tomorrow.
    4. Any other thoughts/ideas?

    Don't know if this is just a fluke or something else, wanted to get the input of some other Crackberrians. Thanks for any input you may have.
    04-14-10 12:29 AM
  2. Reed McLay's Avatar
    I belive you are seeing the Sun Java garbage collection in progress.

    You BlackBerry contains a multitasking operating system. Resources are allocated on demand, new data sets replace the old in memory.

    One of the tasks monitors the use and determines when is the best time to run the garbage collection. That is what has increased your available memory.
    04-14-10 09:33 AM
  3. Radius's Avatar
    Ya, what Reed said.

    The JVM doesn't have any bad memory leaks like what you described, it's actually quite stable. Think of memory like a long line of boxes, or individual cells. When you put something into the boxes it all goes one after the other. However, remove something from 3 of the boxes in the middle of the chain and you now have a gap 3 boxes wide.

    Now try to put something 5 boxes wide into memory, what happens? You have a hole and you lose some memory.

    Garbage collection compacts everything together to remove those holes but it's a very costly operation on the CPU so it only does it when it is very idle.
    04-14-10 11:22 AM
  4. JerseyDriver's Avatar
    Yeah, I know that basic concept, but I wouldn't think the CPU would be resting when I was continually group chatting on BBM, as well as texting and or emailing. That was the strange thing--that and the fact that it reclaimed that much. Usually if I gain any back it's 3-5 or so, after I've closed something I was using.

    And if it recollected that much and was sitting at 19, after I unplugged it, why did it drop to under 6 in like 10 minutes?

    I did try it again tonight, nothing really happened. Once again, chatting with a group and a few contacts most of the time, stayed about level. I posted because it was something so out of whack.

    Thanks for the replies. Feel free to add.
    04-14-10 09:34 PM